diff --git a/lib/api/ktcmis/classes/Enum.inc.php b/lib/api/ktcmis/classes/Enum.inc.php index c22abb9..9b1c01c 100644 --- a/lib/api/ktcmis/classes/Enum.inc.php +++ b/lib/api/ktcmis/classes/Enum.inc.php @@ -9,15 +9,19 @@ abstract class Enum { // actual implementation of these will be in child classes - static private $values; - static private $value; - static private $name; + static protected $name; + static protected $values; + static protected $value; /** * Sets the value of the enumerator * * @param unknown_type $value * @throws invalidArgumentException if the given value does not match one of the allowed values + * + * Extending classes may override this function to add their own additional rules for how an enum may be set, + * but they should always call this parent function afterward to invoke the base rule that the value must be + * one of the defined values */ static protected function set($value) { @@ -31,6 +35,7 @@ abstract class Enum { /** * Returns the currently set value, or null if unset * + * @return $value the currently set value */ static protected function get() { diff --git a/lib/api/ktcmis/enums/EnumCapabilityACL.inc.php b/lib/api/ktcmis/enums/EnumCapabilityACL.inc.php index 64e5b82..91a26f9 100644 --- a/lib/api/ktcmis/enums/EnumCapabilityACL.inc.php +++ b/lib/api/ktcmis/enums/EnumCapabilityACL.inc.php @@ -11,8 +11,21 @@ require_once(CMIS_DIR . '/classes/Enum.inc.php'); class EnumCapabilityACL extends Enum { - static private $values = array('none', 'discover', 'manage'); - static private $name = 'capabilityACL'; + static protected $name = 'capabilityACL'; + static protected $values = array('none', 'discover', 'manage'); + + /** + * Sets the value of the enumerator + * + * @param unknown_type $value + * @throws invalidArgumentException if the given value does not match one of the allowed values + * (exception is thrown in parent class function) + */ + static protected function set($value) + { + parent::set($value); + } + } ?> \ No newline at end of file diff --git a/lib/api/ktcmis/enums/EnumCapabilityChanges.inc.php b/lib/api/ktcmis/enums/EnumCapabilityChanges.inc.php index 7e3c565..e734cc0 100644 --- a/lib/api/ktcmis/enums/EnumCapabilityChanges.inc.php +++ b/lib/api/ktcmis/enums/EnumCapabilityChanges.inc.php @@ -11,8 +11,21 @@ require_once(CMIS_DIR . '/classes/Enum.inc.php'); class EnumCapabilityChanges extends Enum { - static private $values = array('none', 'objectidsonly', 'properties', 'all'); - static private $name = 'capabilityChanges'; + static protected $name = 'capabilityChanges'; + static protected $values = array('none', 'objectidsonly', 'properties', 'all'); + + /** + * Sets the value of the enumerator + * + * @param unknown_type $value + * @throws invalidArgumentException if the given value does not match one of the allowed values + * (exception is thrown in parent class function) + */ + static protected function set($value) + { + parent::set($value); + } + } ?> \ No newline at end of file diff --git a/lib/api/ktcmis/enums/EnumCapabilityContentStreamUpdatability.inc.php b/lib/api/ktcmis/enums/EnumCapabilityContentStreamUpdatability.inc.php index bc84a52..bade25d 100644 --- a/lib/api/ktcmis/enums/EnumCapabilityContentStreamUpdatability.inc.php +++ b/lib/api/ktcmis/enums/EnumCapabilityContentStreamUpdatability.inc.php @@ -11,8 +11,21 @@ require_once(CMIS_DIR . '/classes/Enum.inc.php'); class EnumCapabilityContentStreamUpdatability extends Enum { - static private $values = array('none', 'anytime', 'pwconly'); - static private $name = 'capabilityContentStreamUpdatability'; + static protected $name = 'capabilityContentStreamUpdatability'; + static protected $values = array('none', 'anytime', 'pwconly'); + + /** + * Sets the value of the enumerator + * + * @param unknown_type $value + * @throws invalidArgumentException if the given value does not match one of the allowed values + * (exception is thrown in parent class function) + */ + static protected function set($value) + { + parent::set($value); + } + } ?> \ No newline at end of file diff --git a/lib/api/ktcmis/enums/EnumCapabilityJoin.inc.php b/lib/api/ktcmis/enums/EnumCapabilityJoin.inc.php index 61c8f00..2c168c9 100644 --- a/lib/api/ktcmis/enums/EnumCapabilityJoin.inc.php +++ b/lib/api/ktcmis/enums/EnumCapabilityJoin.inc.php @@ -11,8 +11,21 @@ require_once(CMIS_DIR . '/classes/Enum.inc.php'); class EnumCapabilityJoin extends Enum { - static private $values = array('none', 'inneronly', 'innerandouter'); - static private $name = 'capabilityJoin'; + static protected $name = 'capabilityJoin'; + static protected $values = array('none', 'inneronly', 'innerandouter'); + + /** + * Sets the value of the enumerator + * + * @param unknown_type $value + * @throws invalidArgumentException if the given value does not match one of the allowed values + * (exception is thrown in parent class function) + */ + static protected function set($value) + { + parent::set($value); + } + } ?> \ No newline at end of file diff --git a/lib/api/ktcmis/enums/EnumCapabilityQuery.inc.php b/lib/api/ktcmis/enums/EnumCapabilityQuery.inc.php index 08c9360..61a4cae 100644 --- a/lib/api/ktcmis/enums/EnumCapabilityQuery.inc.php +++ b/lib/api/ktcmis/enums/EnumCapabilityQuery.inc.php @@ -11,8 +11,21 @@ require_once(CMIS_DIR . '/classes/Enum.inc.php'); class EnumCapabilityQuery extends Enum { - static private $values = array('none', 'metadataonly', 'fulltextonly', 'bothseparate', 'bothcombined'); - static private $name = 'capabilityQuery'; + static protected $name = 'capabilityQuery'; + static protected $values = array('none', 'metadataonly', 'fulltextonly', 'bothseparate', 'bothcombined'); + + /** + * Sets the value of the enumerator + * + * @param unknown_type $value + * @throws invalidArgumentException if the given value does not match one of the allowed values + * (exception is thrown in parent class function) + */ + static protected function set($value) + { + parent::set($value); + } + } ?> \ No newline at end of file diff --git a/lib/api/ktcmis/enums/EnumCapabilityRenditions.inc.php b/lib/api/ktcmis/enums/EnumCapabilityRenditions.inc.php index 406bde3..f4d553e 100644 --- a/lib/api/ktcmis/enums/EnumCapabilityRenditions.inc.php +++ b/lib/api/ktcmis/enums/EnumCapabilityRenditions.inc.php @@ -11,8 +11,21 @@ require_once(CMIS_DIR . '/classes/Enum.inc.php'); class EnumCapabilityRenditions extends Enum { - static private $values = array('none', 'objectidsonly', 'properties', 'all'); - static private $name = 'capabilityRenditions'; + static protected $name = 'capabilityRenditions'; + static protected $values = array('none', 'objectidsonly', 'properties', 'all'); + + /** + * Sets the value of the enumerator + * + * @param unknown_type $value + * @throws invalidArgumentException if the given value does not match one of the allowed values + * (exception is thrown in parent class function) + */ + static protected function set($value) + { + parent::set($value); + } + } ?> \ No newline at end of file