web/lib/Zend/Application/Module/Autoloader.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    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_Application
    16  * @package    Zend_Application
    17  * @subpackage Module
    17  * @subpackage Module
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @version    $Id: Autoloader.php 24593 2012-01-05 20:35:02Z matthew $
    19  * @version    $Id$
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    21  */
    21  */
    22 
    22 
    23 /** @see Zend_Loader_Autoloader_Resource */
    23 /** @see Zend_Loader_Autoloader_Resource */
    24 require_once 'Zend/Loader/Autoloader/Resource.php';
    24 require_once 'Zend/Loader/Autoloader/Resource.php';
    28  *
    28  *
    29  * @uses       Zend_Loader_Autoloader_Resource
    29  * @uses       Zend_Loader_Autoloader_Resource
    30  * @category   Zend
    30  * @category   Zend
    31  * @package    Zend_Application
    31  * @package    Zend_Application
    32  * @subpackage Module
    32  * @subpackage Module
    33  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    35  */
    35  */
    36 class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource
    36 class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource
    37 {
    37 {
    38     /**
    38     /**
    39      * Constructor
    39      * Constructor
    40      *
    40      *
    41      * @param  array|Zend_Config $options
    41      * @param  array|Zend_Config $options
    42      * @return void
       
    43      */
    42      */
    44     public function __construct($options)
    43     public function __construct($options)
    45     {
    44     {
    46         parent::__construct($options);
    45         parent::__construct($options);
    47         $this->initDefaultResourceTypes();
    46         $this->initDefaultResourceTypes();
    53      * @return void
    52      * @return void
    54      */
    53      */
    55     public function initDefaultResourceTypes()
    54     public function initDefaultResourceTypes()
    56     {
    55     {
    57         $basePath = $this->getBasePath();
    56         $basePath = $this->getBasePath();
    58         $this->addResourceTypes(array(
    57         $this->addResourceTypes(
    59             'dbtable' => array(
    58             array(
    60                 'namespace' => 'Model_DbTable',
    59                 'dbtable'    => array(
    61                 'path'      => 'models/DbTable',
    60                     'namespace' => 'Model_DbTable',
    62             ),
    61                     'path'      => 'models/DbTable',
    63             'mappers' => array(
    62                 ),
    64                 'namespace' => 'Model_Mapper',
    63                 'mappers'    => array(
    65                 'path'      => 'models/mappers',
    64                     'namespace' => 'Model_Mapper',
    66             ),
    65                     'path'      => 'models/mappers',
    67             'form'    => array(
    66                 ),
    68                 'namespace' => 'Form',
    67                 'form'       => array(
    69                 'path'      => 'forms',
    68                     'namespace' => 'Form',
    70             ),
    69                     'path'      => 'forms',
    71             'model'   => array(
    70                 ),
    72                 'namespace' => 'Model',
    71                 'model'      => array(
    73                 'path'      => 'models',
    72                     'namespace' => 'Model',
    74             ),
    73                     'path'      => 'models',
    75             'plugin'  => array(
    74                 ),
    76                 'namespace' => 'Plugin',
    75                 'plugin'     => array(
    77                 'path'      => 'plugins',
    76                     'namespace' => 'Plugin',
    78             ),
    77                     'path'      => 'plugins',
    79             'service' => array(
    78                 ),
    80                 'namespace' => 'Service',
    79                 'service'    => array(
    81                 'path'      => 'services',
    80                     'namespace' => 'Service',
    82             ),
    81                     'path'      => 'services',
    83             'viewhelper' => array(
    82                 ),
    84                 'namespace' => 'View_Helper',
    83                 'viewhelper' => array(
    85                 'path'      => 'views/helpers',
    84                     'namespace' => 'View_Helper',
    86             ),
    85                     'path'      => 'views/helpers',
    87             'viewfilter' => array(
    86                 ),
    88                 'namespace' => 'View_Filter',
    87                 'viewfilter' => array(
    89                 'path'      => 'views/filters',
    88                     'namespace' => 'View_Filter',
    90             ),
    89                     'path'      => 'views/filters',
    91         ));
    90                 ),
       
    91             )
       
    92         );
    92         $this->setDefaultResourceType('model');
    93         $this->setDefaultResourceType('model');
    93     }
    94     }
    94 }
    95 }