Exemplo n.º 1
0
 /**
  * Checks if a property value is null.
  * Do not call this method. This is a PHP magic method that we override
  * to allow using isset() to detect if a component property is set or not.
  * @param string $name the property name
  * @return boolean
  */
 public function __isset($name)
 {
     $getter = 'get' . $name;
     if (property_exists($this->getClient(), $name)) {
         return true;
     } elseif (method_exists($this->getClient(), $getter)) {
         return true;
     }
     return parent::__isset($name);
 }
Exemplo n.º 2
0
 public function __isset($name)
 {
     if ($this->hasState($name)) {
         return $this->getState($name) !== null;
     } else {
         return parent::__isset($name);
     }
 }
Exemplo n.º 3
0
 /**
  * Magic isset function. Checks if an attribute is set
  *
  * @param string $name
  * @return boolean
  */
 public function __isset($name)
 {
     $name = str_replace('_', '', $name);
     return parent::__isset($name);
 }