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


PHP C_Component类代码示例

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


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

示例1: foreach

 /**
  * Apply adapters registered for the component
  * @param C_Component $component
  * @return C_Component
  */
 function &apply_adapters(C_Component &$component)
 {
     // Iterate through each adapted interface. If the component implements
     // the interface, then apply the adapters
     foreach ($this->_adapters as $interface => $contexts) {
         if ($component->implements_interface($interface)) {
             // Determine what context apply to the current component
             $applied_contexts = array('all');
             if ($component->context) {
                 $applied_contexts[] = $component->context;
                 $applied_contexts = $this->_flatten_array($applied_contexts);
             }
             // Iterate through each of the components contexts and apply the
             // registered adapters
             foreach ($applied_contexts as $context) {
                 if (isset($contexts[$context])) {
                     foreach ($contexts[$context] as $adapter) {
                         $component->add_mixin($adapter, TRUE);
                     }
                 }
             }
         }
     }
     return $component;
 }
开发者ID:ayoayco,项目名称:upbeat,代码行数:30,代码来源:class.component_registry.php

示例2: initialize

 /**
  * Initialize the view with some parameters
  * @param array $params
  * @param context $context
  */
 function initialize($template, $params = array(), $engine = 'php', $context = FALSE)
 {
     parent::initialize($context);
     $this->_template = $template;
     $this->_params = (array) $params;
     $this->_engine = $engine;
 }
开发者ID:bensethro,项目名称:runcyb,代码行数:12,代码来源:class.mvc_view.php

示例3: define

 function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Security_Manager');
     $this->add_mixin('Mixin_Security_Manager');
     $this->add_mixin('Mixin_Security_Manager_Request');
 }
开发者ID:ayoayco,项目名称:upbeat,代码行数:7,代码来源:class.security_manager.php

示例4: define

 function define($context = FALSE)
 {
     parent::define($context);
     $this->add_mixin('Mixin_MVC_Controller_Defaults');
     $this->add_mixin('Mixin_MVC_Controller_Instance_Methods');
     $this->implement('I_MVC_Controller');
 }
开发者ID:ayoayco,项目名称:upbeat,代码行数:7,代码来源:class.mvc_controller.php

示例5: initialize

 /**
  * Creates a new entity for the specified mapper
  * @param C_DataMapper_Driver_Base $mapper
  * @param array|stdClass $properties
  * @param string $context
  */
 function initialize($mapper = NULL, $properties = FALSE)
 {
     $this->_mapper = $mapper;
     $this->_stdObject = $properties ? (object) $properties : new stdClass();
     parent::initialize();
     $this->set_defaults();
 }
开发者ID:ayoayco,项目名称:upbeat,代码行数:13,代码来源:class.datamapper_model.php

示例6:

 function __call($method, $args)
 {
     if (!$this->get_mixin_providing($method)) {
         return call_user_func_array(array(&$this->wrapper, $method), $args);
     } else {
         return parent::__call($method, $args);
     }
 }
开发者ID:lcw07r,项目名称:productcampamsterdam.org,代码行数:8,代码来源:class.settings_model.php

示例7:

 /**
  * Gets the url or path of an image of a particular size
  * @param string $method
  * @param array $args
  */
 function __call($method, $args)
 {
     if (preg_match("/^get_(\\w+)_(abspath|url|dimensions|html|size_params)\$/", $method, $match)) {
         if (isset($match[1]) && isset($match[2]) && !$this->has_method($method)) {
             $method = 'get_image_' . $match[2];
             $args[] = $match[1];
             // array($image, $size)
             return parent::__call($method, $args);
         }
     }
     return parent::__call($method, $args);
 }
开发者ID:ayoayco,项目名称:upbeat,代码行数:17,代码来源:class.gallerystorage_base.php

示例8: define

 /**
  * Defines the module
  */
 function define($id = 'pope-module', $name = 'Pope Module', $description = '', $version = '', $uri = '', $author = '', $author_uri = '', $context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Pope_Module');
     $this->module_id = $id;
     $this->module_name = $name;
     $this->module_description = $description;
     $this->module_version = $version;
     $this->module_uri = $uri;
     $this->module_author = $author;
     $this->module_author_uri = $author_uri;
     $this->get_registry()->add_module($this->module_id, $this);
     $this->_register_utilities();
     $this->_register_adapters();
     $this->_register_hooks();
 }
开发者ID:jeanpage,项目名称:ca_learn,代码行数:19,代码来源:class.base_module.php

示例9: initialize

 /**
  * Creates a new entity for the specified mapper
  * @param C_DataMapper_Driver_Base $mapper
  * @param array|stdClass $properties
  * @param string $context
  */
 function initialize($mapper = NULL, $properties = FALSE)
 {
     $this->_mapper = $mapper;
     $this->_stdObject = $properties ? (object) $properties : new stdClass();
     parent::initialize();
     if (!$this->has_default_values()) {
         $this->set_defaults();
         $this->_stdObject->__defaults_set = TRUE;
     }
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:16,代码来源:package.module.datamapper.php

示例10: define

 function define($context = false)
 {
     parent::define($context);
     $this->implement('I_NextGen_API_XMLRPC');
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:5,代码来源:package.module.nextgen_xmlrpc.php

示例11: define

 function define($context = FALSE)
 {
     parent::define($context);
     $this->add_mixin('Mixin_Cache');
     $this->implement('I_Cache');
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:6,代码来源:package.module.cache.php

示例12: define

 /**
  * Defines the object
  * @param bool $context
  */
 function define($context = FALSE)
 {
     parent::define($context);
     $this->add_mixin('Mixin_Displayed_Gallery_Renderer');
     $this->implement('I_Displayed_Gallery_Renderer');
 }
开发者ID:bensethro,项目名称:runcyb,代码行数:10,代码来源:class.displayed_gallery_renderer.php

示例13: initialize

 function initialize()
 {
     parent::initialize();
     $this->_request_method = $_SERVER['REQUEST_METHOD'];
 }
开发者ID:bensethro,项目名称:runcyb,代码行数:5,代码来源:class.router.php

示例14: define

 public function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Dynamic_Thumbnails_Manager');
     $this->add_mixin('Mixin_Dynamic_Thumbnails_Manager');
 }
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:6,代码来源:package.module.dynamic_thumbnails.php

示例15: initialize

 function initialize()
 {
     parent::initialize();
     $this->lookup_columns();
 }
开发者ID:jeanpage,项目名称:ca_learn,代码行数:5,代码来源:class.datamapper_driver_base.php


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