web/lib/Zend/Tool/Project/Context/Zf/ApplicationDirectory.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: ApplicationDirectory.php 20851 2010-02-02 21:45:51Z ralph $
    20  * @version    $Id: ApplicationDirectory.php 24593 2012-01-05 20:35:02Z matthew $
    21  */
    21  */
    22 
    22 
    23 /**
    23 /**
    24  * @see Zend_Tool_Project_Context_Filesystem_Directory
    24  * @see Zend_Tool_Project_Context_Filesystem_Directory
    25  */
    25  */
    31  * 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
    32  * items within a specific project.
    32  * items within a specific project.
    33  *
    33  *
    34  * @category   Zend
    34  * @category   Zend
    35  * @package    Zend_Tool
    35  * @package    Zend_Tool
    36  * @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)
    37  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    37  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    38  */
    38  */
    39 class Zend_Tool_Project_Context_Zf_ApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
    39 class Zend_Tool_Project_Context_Zf_ApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
    40 {
    40 {
    41 
    41 
    42     protected $_filesystemName = 'application';
    42     protected $_filesystemName = 'application';
    43 
    43 
    44     protected $_classNamePrefix = 'Application_';
    44     protected $_classNamePrefix = 'Application_';
    45     
    45 
    46     public function init()
    46     public function init()
    47     {
    47     {
    48         if ($this->_resource->hasAttribute('classNamePrefix')) {
    48         if ($this->_resource->hasAttribute('classNamePrefix')) {
    49             $this->_classNamePrefix = $this->_resource->getAttribute('classNamePrefix');
    49             $this->_classNamePrefix = $this->_resource->getAttribute('classNamePrefix');
    50         }
    50         }
    51         parent::init();
    51         parent::init();
    52     }
    52     }
    53     
    53 
    54     /**
    54     /**
    55      * getPersistentAttributes
    55      * getPersistentAttributes
    56      *
    56      *
    57      * @return array
    57      * @return array
    58      */
    58      */
    60     {
    60     {
    61         return array(
    61         return array(
    62             'classNamePrefix' => $this->getClassNamePrefix()
    62             'classNamePrefix' => $this->getClassNamePrefix()
    63             );
    63             );
    64     }
    64     }
    65     
    65 
    66     public function getName()
    66     public function getName()
    67     {
    67     {
    68         return 'ApplicationDirectory';
    68         return 'ApplicationDirectory';
    69     }
    69     }
    70     
    70 
    71     public function setClassNamePrefix($classNamePrefix)
    71     public function setClassNamePrefix($classNamePrefix)
    72     {
    72     {
    73         $this->_classNamePrefix = $classNamePrefix;
    73         $this->_classNamePrefix = $classNamePrefix;
    74     }
    74     }
    75     
    75 
    76     public function getClassNamePrefix()
    76     public function getClassNamePrefix()
    77     {
    77     {
    78         return $this->_classNamePrefix;
    78         return $this->_classNamePrefix;
    79     }
    79     }
    80 
    80