Пример #1
0
 public function __get($key)
 {
     switch ($key) {
         case 'name':
             return $this->category;
         case 'id':
             return $this->categoryid;
         case 'parent':
             return ProductCategory($this->parent);
         case 'children':
             return $this->children;
         default:
             return $this->ambient[$key];
     }
 }
Пример #2
0
 static function getCategories()
 {
     return ProductCategory(0);
 }