123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438 |
- --TEST--
- ReflectionClass::__toString()
- --CREDITS--
- Robin Fernandes <robinf@php.net>
- Steve Seear <stevseea@php.net>
- --FILE--
- <?php
- $rc = new ReflectionClass("ReflectionClass");
- echo $rc;
- ?>
- --EXPECT--
- Class [ <internal:Reflection> class ReflectionClass implements Stringable, Reflector ] {
- - Constants [3] {
- Constant [ public int IS_IMPLICIT_ABSTRACT ] { 16 }
- Constant [ public int IS_EXPLICIT_ABSTRACT ] { 64 }
- Constant [ public int IS_FINAL ] { 32 }
- }
- - Static properties [0] {
- }
- - Static methods [0] {
- }
- - Properties [1] {
- Property [ public string $name ]
- }
- - Methods [55] {
- Method [ <internal:Reflection> private method __clone ] {
- - Parameters [0] {
- }
- - Return [ void ]
- }
- Method [ <internal:Reflection, ctor> public method __construct ] {
- - Parameters [1] {
- Parameter #0 [ <required> object|string $objectOrClass ]
- }
- }
- Method [ <internal:Reflection, prototype Stringable> public method __toString ] {
- - Parameters [0] {
- }
- - Return [ string ]
- }
- Method [ <internal:Reflection> public method getName ] {
- - Parameters [0] {
- }
- - Tentative return [ string ]
- }
- Method [ <internal:Reflection> public method isInternal ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method isUserDefined ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method isAnonymous ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method isInstantiable ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method isCloneable ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getFileName ] {
- - Parameters [0] {
- }
- - Tentative return [ string|false ]
- }
- Method [ <internal:Reflection> public method getStartLine ] {
- - Parameters [0] {
- }
- - Tentative return [ int|false ]
- }
- Method [ <internal:Reflection> public method getEndLine ] {
- - Parameters [0] {
- }
- - Tentative return [ int|false ]
- }
- Method [ <internal:Reflection> public method getDocComment ] {
- - Parameters [0] {
- }
- - Tentative return [ string|false ]
- }
- Method [ <internal:Reflection> public method getConstructor ] {
- - Parameters [0] {
- }
- - Tentative return [ ?ReflectionMethod ]
- }
- Method [ <internal:Reflection> public method hasMethod ] {
- - Parameters [1] {
- Parameter #0 [ <required> string $name ]
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getMethod ] {
- - Parameters [1] {
- Parameter #0 [ <required> string $name ]
- }
- - Tentative return [ ReflectionMethod ]
- }
- Method [ <internal:Reflection> public method getMethods ] {
- - Parameters [1] {
- Parameter #0 [ <optional> ?int $filter = null ]
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method hasProperty ] {
- - Parameters [1] {
- Parameter #0 [ <required> string $name ]
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getProperty ] {
- - Parameters [1] {
- Parameter #0 [ <required> string $name ]
- }
- - Tentative return [ ReflectionProperty ]
- }
- Method [ <internal:Reflection> public method getProperties ] {
- - Parameters [1] {
- Parameter #0 [ <optional> ?int $filter = null ]
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method hasConstant ] {
- - Parameters [1] {
- Parameter #0 [ <required> string $name ]
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getConstants ] {
- - Parameters [1] {
- Parameter #0 [ <optional> ?int $filter = null ]
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method getReflectionConstants ] {
- - Parameters [1] {
- Parameter #0 [ <optional> ?int $filter = null ]
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method getConstant ] {
- - Parameters [1] {
- Parameter #0 [ <required> string $name ]
- }
- - Tentative return [ mixed ]
- }
- Method [ <internal:Reflection> public method getReflectionConstant ] {
- - Parameters [1] {
- Parameter #0 [ <required> string $name ]
- }
- - Tentative return [ ReflectionClassConstant|false ]
- }
- Method [ <internal:Reflection> public method getInterfaces ] {
- - Parameters [0] {
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method getInterfaceNames ] {
- - Parameters [0] {
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method isInterface ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getTraits ] {
- - Parameters [0] {
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method getTraitNames ] {
- - Parameters [0] {
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method getTraitAliases ] {
- - Parameters [0] {
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method isTrait ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method isEnum ] {
- - Parameters [0] {
- }
- - Return [ bool ]
- }
- Method [ <internal:Reflection> public method isAbstract ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method isFinal ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getModifiers ] {
- - Parameters [0] {
- }
- - Tentative return [ int ]
- }
- Method [ <internal:Reflection> public method isInstance ] {
- - Parameters [1] {
- Parameter #0 [ <required> object $object ]
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method newInstance ] {
- - Parameters [1] {
- Parameter #0 [ <optional> mixed ...$args ]
- }
- - Tentative return [ object ]
- }
- Method [ <internal:Reflection> public method newInstanceWithoutConstructor ] {
- - Parameters [0] {
- }
- - Tentative return [ object ]
- }
- Method [ <internal:Reflection> public method newInstanceArgs ] {
- - Parameters [1] {
- Parameter #0 [ <optional> array $args = [] ]
- }
- - Tentative return [ ?object ]
- }
- Method [ <internal:Reflection> public method getParentClass ] {
- - Parameters [0] {
- }
- - Tentative return [ ReflectionClass|false ]
- }
- Method [ <internal:Reflection> public method isSubclassOf ] {
- - Parameters [1] {
- Parameter #0 [ <required> ReflectionClass|string $class ]
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getStaticProperties ] {
- - Parameters [0] {
- }
- - Tentative return [ ?array ]
- }
- Method [ <internal:Reflection> public method getStaticPropertyValue ] {
- - Parameters [2] {
- Parameter #0 [ <required> string $name ]
- Parameter #1 [ <optional> mixed $default = <default> ]
- }
- - Tentative return [ mixed ]
- }
- Method [ <internal:Reflection> public method setStaticPropertyValue ] {
- - Parameters [2] {
- Parameter #0 [ <required> string $name ]
- Parameter #1 [ <required> mixed $value ]
- }
- - Tentative return [ void ]
- }
- Method [ <internal:Reflection> public method getDefaultProperties ] {
- - Parameters [0] {
- }
- - Tentative return [ array ]
- }
- Method [ <internal:Reflection> public method isIterable ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method isIterateable ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method implementsInterface ] {
- - Parameters [1] {
- Parameter #0 [ <required> ReflectionClass|string $interface ]
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getExtension ] {
- - Parameters [0] {
- }
- - Tentative return [ ?ReflectionExtension ]
- }
- Method [ <internal:Reflection> public method getExtensionName ] {
- - Parameters [0] {
- }
- - Tentative return [ string|false ]
- }
- Method [ <internal:Reflection> public method inNamespace ] {
- - Parameters [0] {
- }
- - Tentative return [ bool ]
- }
- Method [ <internal:Reflection> public method getNamespaceName ] {
- - Parameters [0] {
- }
- - Tentative return [ string ]
- }
- Method [ <internal:Reflection> public method getShortName ] {
- - Parameters [0] {
- }
- - Tentative return [ string ]
- }
- Method [ <internal:Reflection> public method getAttributes ] {
- - Parameters [2] {
- Parameter #0 [ <optional> ?string $name = null ]
- Parameter #1 [ <optional> int $flags = 0 ]
- }
- - Return [ array ]
- }
- }
- }
|