diff --git a/reference/reflection/book.xml b/reference/reflection/book.xml index 8692229bdd..ff87ed50d7 100644 --- a/reference/reflection/book.xml +++ b/reference/reflection/book.xml @@ -29,6 +29,7 @@ &reference.reflection.extending; &reference.reflection.reflection; &reference.reflection.reflectionclass; + &reference.reflection.reflectionclassconstant; &reference.reflection.reflectionzendextension; &reference.reflection.reflectionextension; &reference.reflection.reflectionfunction; diff --git a/reference/reflection/reflection/getmodifiernames.xml b/reference/reflection/reflection/getmodifiernames.xml index e1988b9fef..767ee77ac2 100644 --- a/reference/reflection/reflection/getmodifiernames.xml +++ b/reference/reflection/reflection/getmodifiernames.xml @@ -95,6 +95,7 @@ public ReflectionClass::getModifiers + ReflectionClassConstant::getModifiers ReflectionMethod::getModifiers ReflectionProperty::getModifiers diff --git a/reference/reflection/reflectionclass/getreflectionconstant.xml b/reference/reflection/reflectionclass/getreflectionconstant.xml new file mode 100644 index 0000000000..1083b870a1 --- /dev/null +++ b/reference/reflection/reflectionclass/getreflectionconstant.xml @@ -0,0 +1,76 @@ + + + + + + ReflectionClass::getReflectionConstant + Gets a ReflectionClassConstant for a class's constant + + + + &reftitle.description; + + public ReflectionClassConstantReflectionClass::getReflectionConstant + stringname + + + Gets a ReflectionClassConstant for a class's property. + + + + + + &reftitle.parameters; + + + + name + + + The class constant name. + + + + + + + + + &reftitle.returnvalues; + + A ReflectionClassConstant. + + + + + &reftitle.seealso; + + + ReflectionClass::getClassConstants + ReflectionClassConstant + + + + + + + diff --git a/reference/reflection/reflectionclass/getreflectionconstants.xml b/reference/reflection/reflectionclass/getreflectionconstants.xml new file mode 100644 index 0000000000..8d31d6f76e --- /dev/null +++ b/reference/reflection/reflectionclass/getreflectionconstants.xml @@ -0,0 +1,125 @@ + + + + + + ReflectionClass::getReflectionConstants + Gets class constants + + + + &reftitle.description; + + public arrayReflectionClass::getReflectionConstants + + + + Retrieves reflected constants. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + An array of ReflectionClassConstant objects. + + + + + &reftitle.examples; + + Basic <function>ReflectionClass::getReflectionConstants</function> example + +getReflectionConstants(); + +foreach ($consts as $const) { + print $const->getName() . "\n"; +} + +var_dump($consts); + +?> +]]> + + &example.outputs.similar; + + + object(ReflectionClassConstant)#3 (2) { + ["name"]=> + string(3) "FOO" + ["class"]=> + string(3) "Foo" + } + [1]=> + object(ReflectionClassConstant)#4 (2) { + ["name"]=> + string(3) "BAR" + ["class"]=> + string(3) "Foo" + } + [2]=> + object(ReflectionClassConstant)#5 (2) { + ["name"]=> + string(3) "BAZ" + ["class"]=> + string(3) "Foo" + } +} +]]> + + + + + + &reftitle.seealso; + + + ReflectionClass::getClassConstant + ReflectionClassConstant + + + + + + + diff --git a/reference/reflection/reflectionclassconstant.xml b/reference/reflection/reflectionclassconstant.xml new file mode 100644 index 0000000000..23ee503ad9 --- /dev/null +++ b/reference/reflection/reflectionclassconstant.xml @@ -0,0 +1,109 @@ + + + + + + The ReflectionClassConstant class + ReflectionClassConstant + + + + +
+ &reftitle.intro; + + The ReflectionClassConstant class reports + information about a class constant. + +
+ + +
+ &reftitle.classsynopsis; + + + + ReflectionClassConstant + + + + + ReflectionClassConstant + + + + Reflector + + + + &Properties; + + public + name + + + public + class + + + + &Methods; + + + + +
+ + + +
+ &reftitle.properties; + + + name + + + Name of the class constant. Read-only, throws + ReflectionException in attempt to write. + + + + + class + + + Name of the class where the class constant is defined. Read-only, throws + ReflectionException in attempt to write. + + + + +
+ + +
+ + &reference.reflection.entities.reflectionclassconstant; + +
+ + diff --git a/reference/reflection/reflectionclassconstant/construct.xml b/reference/reflection/reflectionclassconstant/construct.xml new file mode 100644 index 0000000000..d00ff91b55 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/construct.xml @@ -0,0 +1,91 @@ + + + + + + ReflectionClassConstant::__construct + Constructs a ReflectionClassConstant + + + + &reftitle.description; + + public ReflectionClassConstant::__construct + mixedclass + stringname + + + Constructs a new ReflectionClassConstant object. + + + + + &reftitle.parameters; + + + + class + + + Either a string containing the name of the class to + reflect, or an object. + + + + + name + + + The name of the class constant. + + + + + + + + + &reftitle.returnvalues; + + Returns constructed ReflectionClassConstant instance. + + + + + &reftitle.errors; + + Throws an Exception in case the given class constant does not exist. + + + + + &reftitle.seealso; + + + Constructors + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/export.xml b/reference/reflection/reflectionclassconstant/export.xml new file mode 100644 index 0000000000..2f5d37b23a --- /dev/null +++ b/reference/reflection/reflectionclassconstant/export.xml @@ -0,0 +1,95 @@ + + + + + + ReflectionClassConstant::export + Export + + + + &reftitle.description; + + public static stringReflectionClassConstant::export + mixedclass + stringname + boolreturn + + + Exports a reflection. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + class + + + &reflection.export.param.name; + + + + + name + + + The class constant name. + + + + + return + + + &reflection.export.param.return; + + + + + + + + + &reftitle.returnvalues; + + + + + + + &reftitle.seealso; + + + ReflectionClassConstant::__toString + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/getdeclaringclass.xml b/reference/reflection/reflectionclassconstant/getdeclaringclass.xml new file mode 100644 index 0000000000..9091890681 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/getdeclaringclass.xml @@ -0,0 +1,63 @@ + + + + + + ReflectionClassConstant::getDeclaringClass + Gets declaring class + + + + &reftitle.description; + + public ReflectionClassReflectionClassConstant::getDeclaringClass + + + + Gets the declaring class. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A ReflectionClass object. + + + + + &reftitle.seealso; + + + ReflectionClassConstant::getName + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/getdoccomment.xml b/reference/reflection/reflectionclassconstant/getdoccomment.xml new file mode 100644 index 0000000000..073ee336c4 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/getdoccomment.xml @@ -0,0 +1,63 @@ + + + + + + ReflectionClassConstant::getDocComment + Gets doc comments + + + + &reftitle.description; + + public stringReflectionClassConstant::getDocComment + + + + Gets doc comments from a class constant. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The doc comment if it exists, otherwise &false; + + + + + &reftitle.seealso; + + + ReflectionClassConstant::getName + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/getmodifiers.xml b/reference/reflection/reflectionclassconstant/getmodifiers.xml new file mode 100644 index 0000000000..910c460cc1 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/getmodifiers.xml @@ -0,0 +1,65 @@ + + + + + + ReflectionClassConstant::getModifiers + Gets the class constant modifiers + + + + &reftitle.description; + + public intReflectionClassConstant::getModifiers + + + + Returns a bitfield of the access modifiers for this class constant. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A numeric representation of the modifiers. + The actual meanings of these modifiers are described in the + predefined constants. + + + + + &reftitle.seealso; + + + Reflection::getModifierNames + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/getvalue.xml b/reference/reflection/reflectionclassconstant/getvalue.xml new file mode 100644 index 0000000000..1c98566a48 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/getvalue.xml @@ -0,0 +1,54 @@ + + + + + + ReflectionClassConstant::getValue + Gets value + + + + &reftitle.description; + + public mixedReflectionClassConstant::getValue + + + + Gets the class constant's value. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The value of the class constant. + + + + + + diff --git a/reference/reflection/reflectionclassconstant/isprivate.xml b/reference/reflection/reflectionclassconstant/isprivate.xml new file mode 100644 index 0000000000..fbd3300128 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/isprivate.xml @@ -0,0 +1,64 @@ + + + + + + ReflectionClassConstant::isPrivate + Checks if class constant is private + + + + &reftitle.description; + + public boolReflectionClassConstant::isPrivate + + + + Checks if the class constant is private. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &true; if the class constant is private, otherwise &false; + + + + + &reftitle.seealso; + + + ReflectionClassConstant::isPublic + ReflectionClassConstant::isProtected + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/isprotected.xml b/reference/reflection/reflectionclassconstant/isprotected.xml new file mode 100644 index 0000000000..e87ee22979 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/isprotected.xml @@ -0,0 +1,64 @@ + + + + + + ReflectionClassConstant::isProtected + Checks if class constant is protected + + + + &reftitle.description; + + public boolReflectionClassConstant::isProtected + + + + Checks if the class constant is protected. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &true; if the class constant is protected, otherwise &false; + + + + + &reftitle.seealso; + + + ReflectionClassConstant::isPublic + ReflectionClassConstant::isPrivate + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/ispublic.xml b/reference/reflection/reflectionclassconstant/ispublic.xml new file mode 100644 index 0000000000..37d7ee068e --- /dev/null +++ b/reference/reflection/reflectionclassconstant/ispublic.xml @@ -0,0 +1,64 @@ + + + + + + ReflectionClassConstant::isPublic + Checks if class constant is public + + + + &reftitle.description; + + public boolReflectionClassConstant::isPublic + + + + Checks if the class constant is public. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &true; if the class constant is public, otherwise &false; + + + + + &reftitle.seealso; + + + ReflectionClassConstant::isPrivate + ReflectionClassConstant::isProtected + + + + + + + diff --git a/reference/reflection/reflectionclassconstant/tostring.xml b/reference/reflection/reflectionclassconstant/tostring.xml new file mode 100644 index 0000000000..ac17a981e2 --- /dev/null +++ b/reference/reflection/reflectionclassconstant/tostring.xml @@ -0,0 +1,65 @@ + + + + + + ReflectionClassConstant::__toString + Returns the string representation of the ReflectionClassConstant object. + + + + &reftitle.description; + + public stringReflectionClassConstant::__toString + + + + Returns the string representation of the ReflectionClassConstant object. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A string representation of this ReflectionClassConstant instance. + + + + + &reftitle.seealso; + + + ReflectionClassConstant::export + __toString() + + + + + + + diff --git a/reference/reflection/versions.xml b/reference/reflection/versions.xml index 0f51384830..9853ba7e92 100644 --- a/reference/reflection/versions.xml +++ b/reference/reflection/versions.xml @@ -200,7 +200,9 @@ - + + + @@ -247,6 +249,19 @@ + + + + + + + + + + + + +