/** * Sets a property. * * This method is called when an property is to be set. * * @param string $propertyName The name of the property to set. * @param mixed $propertyValue The property value. * @return void * @ignore * * @throws ezcBasePropertyNotFoundException * if the given property does not exist. * @throws ezcBaseValueException * if the value to be assigned to a property is invalid. * @throws ezcBasePropertyPermissionException * if the property to be set is a read-only property. */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'length': if ((!is_string($propertyValue) || !is_numeric($propertyValue)) && $propertyValue !== null) { return $this->hasError($propertyName, $propertyValue, 'string of digits'); } $this->properties[$propertyName] = $propertyValue; break; default: parent::__set($propertyName, $propertyValue); } }
/** * Sets a property. * * This method is called when an property is to be set. * * @param string $propertyName The name of the property to set. * @param mixed $propertyValue The property value. * @return void * @ignore * * @throws ezcBasePropertyNotFoundException * if the given property does not exist. * @throws ezcBaseValueException * if the value to be assigned to a property is invalid. * @throws ezcBasePropertyPermissionException * if the property to be set is a read-only property. */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'type': if ($propertyValue !== self::TYPE_RESOURCE && $propertyValue !== self::TYPE_COLLECTION && $propertyValue !== null) { return $this->hasError($propertyName, $propertyValue, 'ezcWebdavResourceTypeProperty::TYPE_RESOURCE, ezcWebdavResourceTypeProperty::TYPE_COLLECTION or null'); } $this->properties[$propertyName] = $propertyValue; break; default: parent::__set($propertyName, $propertyValue); } }
/** * Sets a property. * * This method is called when an property is to be set. * * @param string $propertyName The name of the property to set. * @param mixed $propertyValue The property value. * @return void * @ignore * * @throws ezcBasePropertyNotFoundException * if the given property does not exist. * @throws ezcBaseValueException * if the value to be assigned to a property is invalid. * @throws ezcBasePropertyPermissionException * if the property to be set is a read-only property. */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'date': if (!$propertyValue instanceof ezcWebdavDateTime && $propertyValue !== null) { return $this->hasError($propertyName, $propertyValue, 'ezcWebdavDateTime'); } $this->properties[$propertyName] = $propertyValue; break; default: parent::__set($propertyName, $propertyValue); } }
/** * Sets a property. * * This method is called when an property is to be set. * * @param string $propertyName The name of the property to set. * @param mixed $propertyValue The property value. * @return void * @ignore * * @throws ezcBasePropertyNotFoundException * if the given property does not exist. * @throws ezcBaseValueException * if the value to be assigned to a property is invalid. * @throws ezcBasePropertyPermissionException * if the property to be set is a read-only property. */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'lockEntries': if (!is_object($propertyValue) || !$propertyValue instanceof ArrayObject) { return $this->hasError($propertyName, $propertyValue, 'ArrayObject(ezcWebdavSupportedLockPropertyLockentry)'); } $this->properties[$propertyName] = $propertyValue; break; default: parent::__set($propertyName, $propertyValue); } }
/** * Sets a property. * * This method is called when an property is to be set. * * @param string $propertyName The name of the property to set. * @param mixed $propertyValue The property value. * @return void * @ignore * * @throws ezcBasePropertyNotFoundException * if the given property does not exist. * @throws ezcBaseValueException * if the value to be assigned to a property is invalid. * @throws ezcBasePropertyPermissionException * if the property to be set is a read-only property. */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'displayName': if (!is_string($propertyValue) && $propertyValue !== null) { return $this->hasError($propertyName, $propertyValue, 'string'); } $this->properties[$propertyName] = $propertyValue; break; default: parent::__set($propertyName, $propertyValue); } }
/** * Sets a property. * * This method is called when an property is to be set. * * @param string $propertyName The name of the property to set. * @param mixed $propertyValue The property value. * @return void * @ignore * * @throws ezcBasePropertyNotFoundException * if the given property does not exist. * @throws ezcBaseValueException * if the value to be assigned to a property is invalid. * @throws ezcBasePropertyPermissionException * if the property to be set is a read-only property. */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'activeLock': if (!is_object($propertyValue) || !$propertyValue instanceof ArrayObject) { return $this->hasError($propertyName, $propertyValue, 'ArrayObject(ezcWebdavLockDiscoveryPropertyActiveLock)'); } $this->properties[$propertyName] = $propertyValue; break; default: parent::__set($propertyName, $propertyValue); } }
/** * Removes all contents from a property. * * Clear the property, so that it will be recognized as empty later. * * @return void */ public function clear() { parent::clear(); $this->properties['links'] = array(); }
/** * Removes all contents from a property. * * Clears the property, so that it will be recognized as empty later. * * @return void */ public function clear() { parent::clear(); $this->properties['lockType'] = ezcWebdavLockRequest::TYPE_READ; $this->properties['lockScope'] = ezcWebdavLockRequest::SCOPE_SHARED; }