Example #1
0
 /**
  * Delays retriveing the object to the last moment by checking the property.
  *
  * @return mixed
  */
 public function __get($key)
 {
     if (!isset($this->_object) && $key == $this->_property) {
         return $this->_value;
     }
     return parent::__get($key);
 }
 protected function _initialize(KConfig $config)
 {
     if (is_string($config->params)) {
         $config->object = new JParameter($config->params);
     } else {
         $config->object = $config->params;
     }
     parent::_initialize($config);
 }
 /**
  * Decorate Notifier
  *
  * Automatically attach the decorate toolbar if the delegate has previously already been attached. This will
  * subscribe the decorator to the event dispatcher.
  *
  * @param object $delegate The object being decorated
  * @return void
  * @throws  \InvalidArgumentException If the delegate is not an object
  * @see ControllerToolbarMixin::attachToolbar()
  */
 public function onDecorate($delegate)
 {
     $controller = $delegate->getController();
     if ($controller->inherits('KControllerToolbarMixin')) {
         if ($controller->hasToolbar($delegate->getType())) {
             $controller->removeToolbar($delegate);
             $controller->addToolbar($this);
         }
     }
     parent::onDecorate($delegate);
 }
Example #4
0
 /**
  * Get the decorated object
  *
  * @return KTranslatorCache
  */
 public function getDelegate()
 {
     return parent::getDelegate();
 }