Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 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');
 }
Ejemplo n.º 3
0
 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');
 }
Ejemplo n.º 4
0
 function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Security_Token');
     $this->add_mixin('Mixin_Security_Token');
     $this->add_mixin('Mixin_Security_Token_Property');
 }
Ejemplo n.º 5
0
 /**
  * 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();
 }
 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);
     }
 }
Ejemplo n.º 7
0
 /**
  * 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);
 }
Ejemplo n.º 8
0
 /**
  * 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();
 }
 /**
  * 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;
     }
 }
 function define($context = false)
 {
     parent::define($context);
     $this->implement('I_NextGen_API_XMLRPC');
 }
 function define($context = FALSE)
 {
     parent::define($context);
     $this->add_mixin('Mixin_Cache');
     $this->implement('I_Cache');
 }
Ejemplo n.º 12
0
 function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Security_Actor');
     $this->add_mixin('Mixin_Security_Actor');
     $this->add_mixin('Mixin_Security_Actor_Entity');
 }
 /**
  * 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');
 }
Ejemplo n.º 14
0
 function initialize()
 {
     parent::initialize();
     $this->_request_method = $_SERVER['REQUEST_METHOD'];
 }
 public function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Dynamic_Thumbnails_Manager');
     $this->add_mixin('Mixin_Dynamic_Thumbnails_Manager');
 }
 function initialize()
 {
     parent::initialize();
     $this->lookup_columns();
 }
 function define($context = FALSE)
 {
     parent::define($context);
     $this->add_mixin('Mixin_Legacy_Template_Locator');
     $this->implement('I_Legacy_Template_Locator');
 }
Ejemplo n.º 18
0
 function initialize()
 {
     parent::initialize();
     $this->setting_name = C_NextGen_Settings::get_instance()->frame_communication_option_name;
 }
 function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Nextgen_Mail_Manager');
     $this->add_mixin('Mixin_Nextgen_Mail_Manager');
 }
Ejemplo n.º 20
0
 /**
  * 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;
 }
 function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Component_Factory');
 }
Ejemplo n.º 22
0
 function initialize()
 {
     parent::initialize();
     if ($this->has_method('define_columns')) {
         $this->define_columns();
     }
     $this->lookup_columns();
 }
 function initialize()
 {
     parent::initialize();
     $this->setting_name = C_NextGen_Settings::get_instance()->frame_event_cookie_name;
 }
 function define()
 {
     parent::define();
     $this->implement('I_Component_Factory');
 }
 /**
  * Defines the instance of the Page Manager
  * @param type $context
  */
 public function define($context = FALSE)
 {
     parent::define($context);
     $this->add_mixin('Mixin_Page_Manager');
     $this->implement('I_Page_Manager');
 }
 function define($context = FALSE)
 {
     parent::define($context);
     $this->implement('I_Image_Protection_Manager');
     $this->add_mixin('Mixin_Image_Protection_Manager');
 }
Ejemplo n.º 27
0
 function initialize()
 {
     parent::initialize();
     $this->_document_root = $this->set_document_root($_SERVER['DOCUMENT_ROOT']);
 }
Ejemplo n.º 28
0
 function initialize()
 {
     parent::initialize();
     $this->_settings = $this->object->get_routing_settings();
 }
Ejemplo n.º 29
0
 function initialize()
 {
     parent::initialize();
     $this->_document_root = $this->set_document_root(ABSPATH);
 }
Ejemplo n.º 30
0
 function define($context = FALSE)
 {
     parent::define($context);
     $this->add_mixin('Mixin_Lzo_Instance_Methods');
     $this->implement('I_Lzw');
 }