| Method | Return Value | Parameters | Description |
|---|---|---|---|
| __construct($options = null) | Void |
[list]
[*]
$options:[i]可选[/i]. 配置资源. [/*] [/list] |
|
| setBootstrap(Zend_Application_Bootstrap_Bootstrapper $bootstrap) | Zend_Application_Resource_Resource | [list] [*] $bootstrap:[i]必填[/i]. 初始化资源的父引导类 [/*] [/list] | |
| getBootstrap() | Zend_Application_Bootstrap_Bootstrapper | N/A | |
| setOptions(array $options) | Zend_Application_Resource_Resource | [list] [*] $options:[i]必填[/i]. 配置选项. [/*] [/list] | |
| getOptions() | Array | N/A | |
| init() | Mixed | N/A | 采用策略模式: 运行,初始化资源. |
| Method | Return Value | Parameters | Description |
|---|---|---|---|
| __construct($options = null) | Void |
[list]
[*]
$options:[i]可选[/i]. 配置资源 [/*] [/list] |
|
| setBootstrap(Zend_Application_Bootstrap_Bootstrapper $bootstrap) | Zend_Application_Resource_ResourceAbstract | [list] [*] $bootstrap:[i]必填[/i]. [/*] [/list] | |
| getBootstrap() | Zend_Application_Bootstrap_Bootstrapper | N/A | |
| setOptions(array $options) | Zend_Application_Resource_ResourceAbstract | [list] [*] $options:[i]必填[/i]. [/*] [/list] | |
| getOptions() | Array | N/A |
$app = new Zend_Application(APPLICATION_ENV, array(
'pluginPaths' => array(
'My_Resource' => 'My/Resource/',
),
'resources' => array(
// if the following class exists:
'My_Resource_View' => array(),
// then this is equivalent:
'View' => array(),
),
));
$bootstrap->bootstrap('view');
$view = $bootstrap->getResource('view');
$app = new Zend_Application(APPLICATION_ENV, array(
'resources' => array(
// This will load the standard 'View' resource:
'View' => array(),
// While this loads a resource with a specific class name:
'My_Resource_View' => array(),
),
));
$bootstrap->bootstrap('My_Resource_View');
$view = $bootstrap->getResource('My_Resource_View');
class My_Resource_View extends Zend_Application_Resource_ResourceAbstract
{
public $_explicitType = 'My_View';
public function init()
{
// do some initialization...
}
}
$bootstrap->bootstrap('My_View');
$view = $bootstrap->getResource('My_View');
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有