/** * 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 'links': if (!is_array($propertyValue)) { return $this->hasError($propertyName, $propertyValue, 'array(ezcWebdavSourcePropertyLink)'); } $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 '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 'languages': if (!is_array($propertyValue)) { 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 '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); } }
/** * 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 'lockType': if ($propertyValue !== ezcWebdavLockRequest::TYPE_READ && $propertyValue !== ezcWebdavLockRequest::TYPE_WRITE) { return $this->hasError($propertyName, $propertyValue, 'ezcWebdavLockRequest::TYPE_*'); } $this->properties[$propertyName] = $propertyValue; break; case 'lockScope': if ($propertyValue !== ezcWebdavLockRequest::SCOPE_SHARED && $propertyValue !== ezcWebdavLockRequest::SCOPE_EXCLUSIVE) { return $this->hasError($propertyName, $propertyValue, 'ezcWebdavLockRequest::SCOPE_*'); } $this->properties[$propertyName] = $propertyValue; break; default: parent::__set($propertyName, $propertyValue); } }