Kronolith_Resource_Base::set PHP Method

set() public method

Allow setting of properties
public set ( string $property, mixed $value ) : void
$property string The property to set
$value mixed The value to set to
return void
    public function set($property, $value)
    {
        if ($property == 'members') {
            $value = serialize($value);
        }
        $this->_share->set($property, $value);
    }

Usage Example

Example #1
0
 /**
  * Adds a new resource to storage
  *
  * @param Kronolith_Resource_Base $resource
  *
  * @return unknown_type
  */
 public static function addResource(Kronolith_Resource_Base $resource)
 {
     // Create a new calendar id.
     $calendar = uniqid(mt_rand());
     $resource->set('calendar', $calendar);
     $driver = Kronolith::getDriver('Resource');
     return $driver->save($resource);
 }
All Usage Examples Of Kronolith_Resource_Base::set