/** * Return from the parent object if it's not in here... * * @see sapphire/core/ViewableData#__get($property) */ function __get($prop) { $val = $this->cmisObject ? $this->cmisObject->getProperty($prop) : null; // added to handle the change to lowercase first property names for v1.0 of cmis if (!$val) { $val = $this->cmisObject ? $this->cmisObject->getProperty(lcfirst($prop)) : null; } if (!$val) { $val = parent::__get($prop); if (!$val) { if ($this->source) { // get it from there return $this->source->{$prop}; } } } if (stripos($prop, 'date') !== false) { $time = strtotime($val); if ($time) { // convert to a date object return DBField::create_field('SS_DateTime', $val); } } return $val; }
/** * Return from the parent object if it's not in here... * * @see sapphire/core/ViewableData#__get($property) */ function __get($prop) { $val = $this->cmisObject ? $this->cmisObject->getProperty($prop) : null; if (!$val) { $val = parent::__get($prop); if (!$val) { if ($this->source) { // get it from there return $this->source->{$prop}; } } } return $val; }