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


PHP Zend_Loader_Autoloader_Resource类代码示例

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


在下文中一共展示了Zend_Loader_Autoloader_Resource类的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

 /**
  * Initialize pseudo-namespaces,
  * auto-loader and resource groups
  *
  * @return void
  */
 protected function _initAutoloader()
 {
     $moduleLoader = new Zend_Application_Module_Autoloader(['namespace' => ucfirst('Default'), 'basePath' => APPLICATION_PATH . '/modules/default']);
     $moduleLoader->addResourceTypes(['controller' => ['namespace' => 'Controller', 'path' => 'controllers']]);
     $appResources = new Zend_Loader_Autoloader_Resource(['basePath' => APPLICATION_PATH, 'namespace' => 'App']);
     $appResources->addResourceTypes(['models' => ['namespace' => 'Model', 'path' => 'models']]);
 }
开发者ID:execrot,项目名称:sender-server,代码行数:13,代码来源:Bootstrap.php

示例3: 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

示例4: _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

示例5: _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

示例6: _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

示例7: _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

示例8: _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

示例9: _initAutoloader

 /**
  * Initialize pseudo-namespaces,
  * auto-loader and resource groups
  *
  * @return void
  */
 protected function _initAutoloader()
 {
     $modules = ['default'];
     foreach ($modules as $module) {
         $moduleLoader = new Zend_Application_Module_Autoloader(['namespace' => ucfirst($module), 'basePath' => APPLICATION_PATH . '/modules/' . $module]);
         $moduleLoader->addResourceTypes(['controller' => ['namespace' => 'Controller', 'path' => 'controllers']]);
     }
     $appResources = new Zend_Loader_Autoloader_Resource(['basePath' => APPLICATION_PATH, 'namespace' => 'App']);
     $appResources->addResourceTypes(['exceptions' => ['namespace' => 'Exception', 'path' => 'exceptions'], 'mappers' => ['namespace' => 'Map', 'path' => 'mappers'], 'helpers' => ['namespace' => 'Helper', 'path' => 'helpers'], 'models' => ['namespace' => 'Model', 'path' => 'models'], 'plugins' => ['namespace' => 'Plugin', 'path' => 'plugins'], 'services' => ['namespace' => 'Service', 'path' => 'services']]);
 }
开发者ID:execrot,项目名称:storage-server,代码行数:16,代码来源:Bootstrap.php

示例10: 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

示例11: _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

示例12: 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

示例13: _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

示例14: _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

示例15: _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


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