• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Loader_Autoloader_Resource类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了Zend_Loader_Autoloader_Resource类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


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


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


示例18: testAutoloadShouldAllowEmptyNamespacing

 public function testAutoloadShouldAllowEmptyNamespacing()
 {
     $loader = new Zend_Loader_Autoloader_Resource(array('namespace' => '', 'basePath' => realpath(dirname(__FILE__) . '/_files')));
     $loader->addResourceTypes(array('service' => array('path' => 'services', 'namespace' => 'Service')));
     $test = $loader->load('ZendLoaderAutoloaderResourceTest', 'service');
     $this->assertTrue($test instanceof Service_ZendLoaderAutoloaderResourceTest);
 }
开发者ID:travisj,项目名称:zf,代码行数:7,代码来源:ResourceTest.php


示例19: define

<?php

define('ROOT_PATH', realpath(dirname(__FILE__)));
define('APP_ENV', getenv('APP_ENV') ? getenv('APP_ENV') : 'production');
define('APP_PATH', ROOT_PATH . '/application');
define('LIB_PATH', ROOT_PATH . '/library');
define('MODULE_PATH', APP_PATH . '/modules');
define('CONFIG_PATH', APP_PATH . '/configs');
define('LANGUAGES_PATH', ROOT_PATH . '/languages');
set_include_path(implode(PATH_SEPARATOR, array(LIB_PATH, get_include_path())));
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader = new Zend_Loader_Autoloader_Resource(array('namespace' => '', 'basePath' => APP_PATH));
$loader->addResourceType('model', 'models/', 'Model');
$loader->addResourceType('mybaseForm', 'modules/mybase/forms/', 'Mybase_Form');
//$loader->addResourceType('Form', 'modules/frontend/forms/', 'Form');
$sessName = "PHPSESSID";
$sessOptions = array('name' => $sessName);
if (stripos($_SERVER['REQUEST_URI'], '__tkn') !== false && preg_match('#__tkn=([a-z\\d]{25,30})#si', $_SERVER['REQUEST_URI'], $matches) && stripos($_SERVER["HTTP_COOKIE"], $matches[1]) === false) {
    $sid = $matches[1];
    $prefix = '';
    if (!empty($_SERVER["HTTP_COOKIE"])) {
        $prefix = '; ';
    }
    $_SERVER["HTTP_COOKIE"] .= $prefix . $sessName . '=' . $sid;
    $_COOKIE[$sessName] = $sid;
    Zend_Session::setId($sid);
}
Zend_Session::setOptions($sessOptions);
$application = new Zend_Application(APP_ENV, CONFIG_PATH . '/application.ini');
function d($data, $label = null)
开发者ID:besters,项目名称:My-Base,代码行数:31,代码来源:index.php


示例20: _initAutoload

 protected function _initAutoload()
 {
     $autoloader = new Zend_Loader_Autoloader_Resource(array('namespace' => 'Backend', 'basePath' => APPLICATION_PATH . DS . 'modules' . DS . 'backend'));
     $autoloader->addResourceType('controllers', '/controllers', 'Controller');
 }
开发者ID:phamhungvx,项目名称:biker,代码行数:5,代码来源:Bootstrapsss.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Loader_PluginLoader类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Loader_Autoloader类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap