web/lib/Zend/Tool/Project/Context/Zf/AbstractClassFile.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Tool
    16  * @package    Zend_Tool
    17  * @subpackage Framework
    17  * @subpackage Framework
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: AbstractClassFile.php 23417 2010-11-20 16:24:35Z ramon $
    20  * @version    $Id: AbstractClassFile.php 24593 2012-01-05 20:35:02Z matthew $
    21  */
    21  */
       
    22 
       
    23 /**
       
    24  * Zend_Tool_Project_Context_Filesystem_File
       
    25  */
       
    26 require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
    22 
    27 
    23 /**
    28 /**
    24  * This class is the front most class for utilizing Zend_Tool_Project
    29  * This class is the front most class for utilizing Zend_Tool_Project
    25  *
    30  *
    26  * A profile is a hierarchical set of resources that keep track of
    31  * A profile is a hierarchical set of resources that keep track of
    27  * items within a specific project.
    32  * items within a specific project.
    28  *
    33  *
    29  * @category   Zend
    34  * @category   Zend
    30  * @package    Zend_Tool
    35  * @package    Zend_Tool
    31  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    36  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    37  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    33  */
    38  */
    34 abstract class Zend_Tool_Project_Context_Zf_AbstractClassFile extends Zend_Tool_Project_Context_Filesystem_File
    39 abstract class Zend_Tool_Project_Context_Zf_AbstractClassFile extends Zend_Tool_Project_Context_Filesystem_File
    35 {
    40 {
    36 
    41 
    37     /**
    42     /**
    38      * getFullClassName()
    43      * getFullClassName()
    39      *
    44      *
    40      * @param $localClassName
    45      * @param string $localClassName
    41      * @param $classContextName
    46      * @param string $classContextName
    42      */
    47      */
    43     public function getFullClassName($localClassName, $classContextName = null)
    48     public function getFullClassName($localClassName, $classContextName = null)
    44     {
    49     {
    45 
    50 
    46         // find the ApplicationDirectory OR ModuleDirectory
    51         // find the ApplicationDirectory OR ModuleDirectory
    60         if (isset($containingResource)) {
    65         if (isset($containingResource)) {
    61             if ($containingResource->getName() == 'ApplicationDirectory') {
    66             if ($containingResource->getName() == 'ApplicationDirectory') {
    62                 $prefix = $containingResource->getAttribute('classNamePrefix');
    67                 $prefix = $containingResource->getAttribute('classNamePrefix');
    63                 $fullClassName = $prefix;
    68                 $fullClassName = $prefix;
    64             } elseif ($containingResource->getName() == 'ModuleDirectory') {
    69             } elseif ($containingResource->getName() == 'ModuleDirectory') {
    65                 $prefix = ucfirst($containingResource->getAttribute('moduleName')) . '_';
    70                 $filter = new Zend_Filter_Word_DashToCamelCase();
       
    71                 $prefix = $filter->filter(ucfirst($containingResource->getAttribute('moduleName'))) . '_';
    66                 $fullClassName = $prefix;
    72                 $fullClassName = $prefix;
    67             }
    73             }
    68         }
    74         }
    69 
    75 
    70         if ($classContextName) {
    76         if ($classContextName) {