当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Loader_Autoloader_Resource::addResourceType方法代码示例

本文整理汇总了PHP中Zend_Loader_Autoloader_Resource::addResourceType方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Loader_Autoloader_Resource::addResourceType方法的具体用法?PHP Zend_Loader_Autoloader_Resource::addResourceType怎么用?PHP Zend_Loader_Autoloader_Resource::addResourceType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Loader_Autoloader_Resource的用法示例。


在下文中一共展示了Zend_Loader_Autoloader_Resource::addResourceType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _initAutoloader

 /**
  * Добавляем ресурсы в автолоадер
  */
 protected function _initAutoloader()
 {
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH . '/library', 'namespace' => 'Library'));
     $resourceLoader->addResourceType('helper', 'helpers/', 'Helper_');
     $resourceLoader->addResourceType('class', 'classes/', 'Class_');
     $resourceLoader->addResourceType('interface', 'interfaces/', 'Interface_');
 }
开发者ID:npestcova,项目名称:currencyRate,代码行数:10,代码来源:Bootstrap.php

示例2: _initAutoLoader

 protected function _initAutoLoader()
 {
     $loader = new Zend_Loader_Autoloader_Resource(array("basePath" => APPLICATION_PATH, "namespace" => "App"));
     $loader->addResourceTypes(array("form" => array("path" => "modules/default/forms", "namespace" => "Form"), "formp" => array("path" => "modules/painel/forms", "namespace" => "Painel_Form"), "class" => array("path" => "Class", "namespace" => "Class")));
     $loader->addResourceType("model", "models/", "Model");
     $loader->addResourceType("plugin", "plugins/", "Plugin");
     $loader->addResourceType("class", "Class/", "Class");
 }
开发者ID:alissonpirola,项目名称:site-drandre,代码行数:8,代码来源:Bootstrap.php

示例3: _initAutoloader

 protected function _initAutoloader()
 {
     $loader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => ''));
     $loader->addResourceType('amf', 'amf', 'Amf');
     $loader->addResourceType('model', 'models', 'Model');
     $loader->addResourceType('tool', 'tools', 'Tool');
     return $loader;
 }
开发者ID:rnagrodzki,项目名称:rn-lib,代码行数:8,代码来源:Bootstrap.php

示例4: _initAttributeExOpenIDPath

 protected function _initAttributeExOpenIDPath()
 {
     $autoLoader = Zend_Loader_Autoloader::getInstance();
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => 'My_'));
     $resourceLoader->addResourceType('openidextension', 'openid/extension/', 'OpenId_Extension');
     $resourceLoader->addResourceType('authAdapter', 'auth/adapter', 'Auth_Adapter');
     $autoLoader->pushAutoloader($resourceLoader);
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:8,代码来源:Bootstrap.php

示例5: _initLoader

 protected function _initLoader()
 {
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => 'Reg2'));
     $resourceLoader->addResourceType('model', 'models/', 'Model');
     $resourceLoader->addResourceType('validate', '../library/Validate', 'Validate');
     $resourceLoader->addResourceType('plugin', 'plugins/', 'Plugin');
     $resourceLoader->addResourceType('form', 'forms/', 'Form');
     return $resourceLoader;
 }
开发者ID:smalyshev,项目名称:chgk-teams,代码行数:9,代码来源:Bootstrap.php

示例6: _initAutoload

 protected function _initAutoload()
 {
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $autoloader->setFallbackAutoloader(true);
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array("namespace" => "", "basePath" => APPLICATION_PATH));
     $resourceLoader->addResourceType("filters", "/filters", "Filter_");
     $resourceLoader->addResourceType("forms", "/filters/forms", "Filter_Form_");
     $autoloader->pushAutoloader($resourceLoader);
     return $autoloader;
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:10,代码来源:Bootstrap.php

示例7: setUp

 protected function setUp()
 {
     _SF_Autloader_SetUp();
     Zend_Loader::loadClass('Zend_Session_Namespace');
     // configure the resource loader atuo load models
     $loader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH . '/modules/storefront', 'namespace' => 'Storefront'));
     $loader->addResourceType('Model', 'models', 'Model');
     $loader->addResourceType('ModelResource', 'models/resources', 'Resource');
     $loader->addResourceType('Form', 'forms', 'Form');
     $loader->addResourceType('Service', 'services', 'Service');
     $mockNS = $this->getMock('Zend_Session_Namespace');
     $this->_model = new Storefront_Model_Cart(array('sessionNs' => $mockNS));
 }
开发者ID:AkimBolushbek,项目名称:zendframeworkstorefront,代码行数:13,代码来源:CartTest.php

示例8: _initAutoloader

 /**
  * Initialize auto loader and add resource loaders(for models)
  */
 public function _initAutoloader()
 {
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH . '/models', 'namespace' => 'Model'));
     $resourceLoader->addResourceType('DbTable', 'DbTable/', 'DbTable');
     $resourceLoader->addResourceType('DbRow', 'DbRow/', 'DbRow');
     $resourceLoader->addResourceType('Static', 'Static/', 'Static');
     $Dir = dirname(APPLICATION_PATH) . '/library/';
     $D = opendir($Dir);
     while ($LibraryDir = readdir($D)) {
         if ($LibraryDir != '.' && $LibraryDir != '..' && $LibraryDir != 'Zend') {
             $resourceLoader->addResourceType(strtolower($LibraryDir), dirname(APPLICATION_PATH) . '/library/' . $LibraryDir, $LibraryDir);
         }
     }
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:18,代码来源:Bootstrap.php

示例9: _initDoctype

 protected function _initDoctype()
 {
     $this->bootstrap('view');
     $view = $this->getResource('view');
     $view->doctype('XHTML1_STRICT');
     //Pre - Load up the custom validators and forms etc.
     $loader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => 'Application'));
     $loader->addResourceType('model', 'models', 'Model');
     $loader->addResourceType('form', 'forms', 'Form');
     //        $loader = new Zend_Loader_Autoloader_Resource (array (
     //          'basePath' => APPLICATION_PATH,
     //          'namespace' => 'Application',
     //        ));
     //        $loader -> addResourceType ( 'model', 'models', 'Model');
     //        $loader -> addResourceType ( 'form', 'forms', 'Form');
 }
开发者ID:revpriest,项目名称:webace,代码行数:16,代码来源:Bootstrap.php

示例10: _initResourceLoader

 /**
  * 
  */
 protected function _initResourceLoader()
 {
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('namespace' => '', 'basePath' => APPLICATION_PATH));
     $resourceLoader->addResourceType('phrets', 'plugins/phrets/', 'Rets');
     //        $resourceLoader->addResourceType('helper', 'plugins/helper/', 'Helper');
     return $resourceLoader;
 }
开发者ID:santhyk,项目名称:reso_demo,代码行数:10,代码来源:Bootstrap.php

示例11: _initAutoload

 protected function _initAutoload()
 {
     // Inicializa o Resource do DB
     $this->bootstrap('db');
     // Recupera o Resource do DB
     $dbAdapter = $this->getResource('db');
     // Adicionar as configuracoes de Resource
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => ''));
     $resourceLoader->addResourceType('model', 'models/', 'Model');
     $resourceLoader->addResourceType('acl', 'acls/', 'Acl');
     $resourceLoader->addResourceType('plugin', 'plugins/', 'Plugin');
     // Registra o plugin de autenticação
     //$frontController = Zend_Controller_Front::getInstance();
     //$frontController->registerPlugin(new Plugin_Autenticacao($dbAdapter));
     return $resourceLoader;
 }
开发者ID:vilmarsitio,项目名称:registrodeprecos,代码行数:16,代码来源:Bootstrap.php

示例12: run

 public function run()
 {
     // Lade Konfig
     $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
     Zend_Registry::set('config', $config);
     // Erstelle DB Adapter
     $db = Zend_Db::factory($config->db);
     Zend_Registry::set('db', $db);
     Zend_Db_Table_Abstract::setDefaultAdapter(Zend_Registry::get('db'));
     if (APPLICATION_ENV !== 'production') {
         $profiler = new Zend_Db_Profiler_Firebug('All Database Queries:');
         $profiler->setEnabled(true);
         $db->setProfiler($profiler);
     }
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => ''));
     $resourceLoader->addResourceType('plugins', 'plugins', 'Plugins');
     if (PHP_SAPI != 'cli') {
         $front = Zend_Controller_Front::getInstance();
         $front->registerPlugin(new Plugins_Stats());
         if (APPLICATION_ENV == 'production') {
             $front->registerPlugin(new Plugins_Cache());
         }
     }
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('_partials/controls.phtml');
     parent::run();
 }
开发者ID:network-splash,项目名称:prepaidvergleich24.info,代码行数:26,代码来源:Bootstrap.php

示例13: setUp

 protected function setUp()
 {
     _SF_Autloader_SetUp();
     // configure the resource loader atuo load models
     $loader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH . '/modules/storefront', 'namespace' => 'Storefront'));
     $loader->addResourceType('Model', 'models', 'Model');
     // configure another loader so we can replace Model Resources
     $loader = new Zend_Loader_Autoloader_Resource(array('basePath' => dirname(__FILE__), 'namespace' => 'Storefront'));
     $loader->addResourceType('modelResource', 'TestResources', 'Resource');
     $this->_model = new Storefront_Model_Catalog();
 }
开发者ID:AkimBolushbek,项目名称:zendframeworkstorefront,代码行数:11,代码来源:CatalogTest.php

示例14: _initAutoloader

 /**
  * Initialize auto loader and add resource loaders
  */
 public function _initAutoloader()
 {
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH . '/models', 'namespace' => 'Model'));
     $Dir = dirname(APPLICATION_PATH) . '/library/';
     $D = opendir($Dir);
     while ($LibraryDir = readdir($D)) {
         if ($LibraryDir != '.' && $LibraryDir != '..' && $LibraryDir != 'Zend') {
             $resourceLoader->addResourceType(strtolower($LibraryDir), dirname(APPLICATION_PATH) . '/library/' . $LibraryDir, $LibraryDir);
         }
     }
     return $resourceLoader;
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:15,代码来源:AdminBootstrap.php

示例15: _initModules

 protected function _initModules()
 {
     $frontController = Zend_Controller_Front::getInstance();
     //$frontController->addModuleDirectory(APPLICATION_PATH . '/modules');
     // action helpers
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     // autoloaders
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $modules = $frontController->getControllerDirectory();
     $default = $frontController->getDefaultModule();
     foreach (array_keys($modules) as $module) {
         $autoloader->pushAutoloader(new Zend_Application_Module_Autoloader(array('namespace' => ucwords($module), 'basePath' => $frontController->getModuleDirectory($module))));
     }
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => ''));
     $resourceLoader->addResourceType('form', 'forms/', 'Form')->addResourceType('model', 'models/', 'Model')->addResourceType('model_table', 'models/Table/', 'Model_Table');
     //$frontController->getRouter()
     //->addroute('logout',new Zend_Controller_Router_Route('admin/logout',array('module'=>'admin', 'controller'=>'index', 'action'=>'logout')))
 }
开发者ID:rahulreghu,项目名称:shreeimpex,代码行数:18,代码来源:Bootstrap.php


注:本文中的Zend_Loader_Autoloader_Resource::addResourceType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。