Exemplo n.º 1
0
 /**
  * Check if this attribute is loaded, and if not, then return null
  */
 public function __get($name)
 {
     if ($this->_partial && $this->hasEmbeddedDocuments() && isset(self::$_embeddedConfig[get_class($this)][$name]) && !in_array($name, $this->_loadedFields)) {
         return null;
     } else {
         return parent::__get($name);
     }
 }
Exemplo n.º 2
0
 /**
  * Adds soft attributes support to magic __get method
  * @see EMongoEmbeddedDocument::__get()
  * @since v1.3.4
  */
 public function __get($name)
 {
     if (array_key_exists($name, $this->softAttributes)) {
         return $this->softAttributes[$name];
     } else {
         return parent::__get($name);
     }
 }
Exemplo n.º 3
0
 /**
  * Adds soft attributes support to magic __get method
  * @see EMongoEmbeddedDocument::__get()
  * @since v1.3.4
  */
 public function __get($name)
 {
     if (array_key_exists($name, $this->softAttributes)) {
         // Use of array_key_exists is mandatory !!!
         return $this->softAttributes[$name];
     } else {
         return parent::__get($name);
     }
 }