Merge file:///media/external_data/workspace/web/sport-group
[sport-group.git] / library / Zend / Application / Module / Autoloader.php
blob651bdd55090fb6e14166b577ee75a69cd28fe76c
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Application
17 * @subpackage Module
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @version $Id: Autoloader.php 16541 2009-07-07 06:59:03Z bkarwin $
20 * @license http://framework.zend.com/license/new-bsd New BSD License
23 /** Zend_Loader_Autoloader_Resource */
24 require_once 'Zend/Loader/Autoloader/Resource.php';
26 /**
27 * Resource loader for application module classes
29 * @uses Zend_Loader_Autoloader_Resource
30 * @package Zend_Application
31 * @subpackage Module
32 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
33 * @license http://framework.zend.com/license/new-bsd New BSD License
35 class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource
37 /**
38 * Constructor
40 * @param array|Zend_Config $options
41 * @return void
43 public function __construct($options)
45 parent::__construct($options);
46 $this->initDefaultResourceTypes();
49 /**
50 * Initialize default resource types for module resource classes
52 * @return void
54 public function initDefaultResourceTypes()
56 $basePath = $this->getBasePath();
57 $this->addResourceTypes(array(
58 'dbtable' => array(
59 'namespace' => 'Model_DbTable',
60 'path' => 'models/DbTable',
62 'form' => array(
63 'namespace' => 'Form',
64 'path' => 'forms',
66 'model' => array(
67 'namespace' => 'Model',
68 'path' => 'models',
70 'plugin' => array(
71 'namespace' => 'Plugin',
72 'path' => 'plugins',
74 'service' => array(
75 'namespace' => 'Service',
76 'path' => 'services',
78 'viewhelper' => array(
79 'namespace' => 'View_Helper',
80 'path' => 'views/helpers',
82 'viewfilter' => array(
83 'namespace' => 'View_Filter',
84 'path' => 'views/filters',
86 ));
87 $this->setDefaultResourceType('model');