Example #1
0
 public function __get($key)
 {
     if (isset($this->data[$key])) {
         return $this->data[$key];
     }
     if ('component' == $key) {
         $this->set($key, mpp_get_object_component($this->id));
         return $this->data[$key];
     } elseif ('type' == $key) {
         $this->set($key, mpp_get_object_type($this->id));
         return $this->data[$key];
     } elseif ('status' == $key) {
         $this->set($key, mpp_get_object_status($this->id));
         return $this->data[$key];
     }
     $value = mpp_get_gallery_meta($this->id, '_mpp_' . $key, true);
     return $value;
 }
Example #2
0
 public function __get($key)
 {
     if ('status' == $key) {
         return mpp_get_object_status($this->id);
     }
     if ('type' == $key) {
         return mpp_get_object_type($this->id);
     }
     if ('component' == $key) {
         return mpp_get_object_component($this->id);
     }
     $value = mpp_get_gallery_meta($this->id, '_mpp_' . $key, true);
     return $value;
 }