Esempio n. 1
0
 /**
  * @param string $key
  * @return mixed
  */
 public function __get($key)
 {
     if ($this->exists($key)) {
         return $this->get($key);
     }
     return parent::__get($key);
 }
Esempio n. 2
0
 public function __get($name)
 {
     if (in_array($name, EFileMetaData::$attributeLabels)) {
         return $this->getMetaData()->getAttribute($name);
     }
     return parent::__get($name);
 }
 /**
  * Getter magic method.
  * This method is overridden to support accessing application components
  * like reading module properties.
  * @param string $name application component or property name
  * @return mixed the named property value
  */
 public function __get($name)
 {
     if ($this->hasComponent($name)) {
         return $this->getComponent($name);
     } else {
         return parent::__get($name);
     }
 }
Esempio n. 4
0
 /**
  * PHP getter magic method.
  * This method is overridden so that service attributes can be accessed like properties.
  *
  * @param string $name property name.
  * @return mixed property value.
  * @see getAttribute
  */
 public function __get($name)
 {
     if ($this->hasAttribute($name)) {
         return $this->getAttribute($name);
     } else {
         return parent::__get($name);
     }
 }
Esempio n. 5
0
 /**
  * Any requests to set or get attributes or call methods on this class that 
  * are not found are redirected to the {@link Swift_Mime_Message} object.
  * @param string the attribute name
  */
 public function __get($name)
 {
     try {
         return parent::__get($name);
     } catch (CException $e) {
         $getter = 'get' . $name;
         if (method_exists($this->message, $getter)) {
             return $this->message->{$getter}();
         } else {
             throw $e;
         }
     }
 }
Esempio n. 6
0
 public function __get($name)
 {
     try {
         return parent::__get($name);
     } catch (CException $e) {
         $method_name = Yii::app()->text->underscoreToCamelcase($name);
         $method_name = 'get' . ucfirst($method_name);
         if (method_exists($this, $method_name)) {
             return $this->{$method_name}();
         } else {
             throw new CException($e->getMessage());
         }
     }
 }
Esempio n. 7
0
 public function __get($name)
 {
     return parent::__get($name);
 }
Esempio n. 8
0
 public function __get($name)
 {
     if (isset($this->_attributes[$name])) {
         return $this->_attributes[$name];
     } else {
         if (isset($this->_match[$name])) {
             return $this->_match[$name];
         } else {
             return parent::__get($name);
         }
     }
 }
Esempio n. 9
0
 /**
  * Overrides the default magic method defined at the CComponent level in order to
  * return a metadata value if parent method fails.
  *
  * @see CComponent::__get()
  */
 public function __get($name)
 {
     try {
         return parent::__get($name);
     } catch (CException $e) {
         if (isset($this->_metadata[$name])) {
             return $this->_metadata[$name];
         } else {
             throw new SWException('Property "' . $name . '" is not found.', SWException::SW_ERR_ATTR_NOT_FOUND);
         }
     }
 }
 public function __get($name)
 {
     $getter = 'get' . $name;
     if (false !== method_exists($this, $getter)) {
         return call_user_func(array($this, $getter));
     } else {
         if (false !== property_exists($this, $name)) {
             return $this->{$name};
         } else {
             if (false !== $this->getIsProxy() && false !== method_exists($this->_instance, $getter)) {
                 return call_user_func(array($this->_instance, $getter));
             } else {
                 if (false !== $this->getIsProxy() && false !== property_exists($this->_instance, $name)) {
                     return $this->_instance->{$name};
                 } else {
                     if (false === $this->getIsProxy() && false !== array_key_exists($name, $this->abstract)) {
                         return $this->abstract[$name];
                     }
                 }
             }
         }
     }
     return parent::__get($name);
 }
Esempio n. 11
0
 public function __get($strName)
 {
     switch ($strName) {
         case 'Name':
             return $this->name();
         case 'AdminName':
             return $this->adminName();
         case 'DefaultName':
             return $this->defaultName;
         case 'advancedMode':
             return $this->advancedMode;
         case 'modulename':
             return $this->getModuleName();
         case 'uses_credit_card':
             return $this->uses_credit_card;
         case 'uses_jumper':
             return $this->uses_jumper;
         default:
             return parent::__get($strName);
     }
 }
Esempio n. 12
0
 /**
  * Overrides the default magic method defined at the CComponent level in order to
  * return a metadata value if parent method fails.
  *
  * @see CComponent::__get()
  */
 public function __get($name)
 {
     try {
         return parent::__get($name);
     } catch (CException $e) {
         if (isset($this->_metadata[$name])) {
             return $this->_metadata[$name];
         } else {
             throw new SWException(Yii::t('yii', 'Property "{property}" is not found.', array('{property}' => $name)), SWException::SW_ERR_ATTR_NOT_FOUND);
         }
     }
 }
Esempio n. 13
0
 /**
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     $parts = explode(self::ATTRIBUTE_NAME_PREFIX, $name);
     if (count($parts) == 2 && $parts[1] != null) {
         return $this->resolveValueFromModel($parts[1]);
     }
     //Not using isset, because a null value would not resolve correctly
     if (array_key_exists($name, $this->selectedColumnNamesAndValues)) {
         return $this->selectedColumnNamesAndValues[$name];
     }
     return parent::__get($name);
 }
Esempio n. 14
0
 /**
  * (non-PHPdoc)
  * @see CComponent::__get()
  */
 public function __get($name)
 {
     if (null !== $this->_results && isset($this->_results[$name])) {
         return $this->_results[$name];
     }
     return parent::__get($name);
 }
 public function __get($name)
 {
     if ($name == 'magic_get_prop' || $name == 'other_magic_get_prop') {
         return 'foo';
     }
     return parent::__get($name);
 }