Kronolith_Resource_Base::get PHP Method

get() public method

Implemented to stand in as a share object.
public get ( string $property ) : mixed
$property string The property to get
return mixed The value of $property
    public function get($property)
    {
        $property = str_replace('resource_', '', $property);
        if ($property == 'type' && empty($this->_params['type'])) {
            return $this instanceof Kronolith_Resource_Single ? 'Single' : 'Group';
        }
        $value = $this->_share->get($property);
        return $property == 'members' ? unserialize($value) : $value;
    }

Usage Example

Example #1
0
 /**
  * Override the get method to see if we have a selected resource. If so,
  * return the resource's property value, otherwise, return the group's
  * property value.
  *
  * @param string $property  The property to get.
  *
  * @return mixed  The requested property's value.
  */
 public function get($property)
 {
     if (empty($this->_selectedResource)) {
         return parent::get($property);
     } else {
         return $this->_selectedResource->get($property);
     }
 }
All Usage Examples Of Kronolith_Resource_Base::get