Ejemplo n.º 1
0
 public function __get($property)
 {
     switch ($property) {
         case 'id':
             return $this->getContentInfo()->id;
     }
     return parent::__get($property);
 }
Ejemplo n.º 2
0
 /**
  * Magic getter for retrieving convenience properties.
  *
  * @param string $property The name of the property to retrieve
  *
  * @return mixed
  */
 public function __get($property)
 {
     switch ($property) {
         case 'contentId':
             return $this->contentInfo->id;
         case 'path':
             if ($this->path !== null) {
                 return $this->path;
             }
             if (isset($this->pathString[1]) && $this->pathString[0] === '/') {
                 return $this->path = explode('/', trim($this->pathString, '/'));
             }
             return $this->path = array();
     }
     return parent::__get($property);
 }