Download the PHP package syberisle/filereflection without Composer
On this page you can find all versions of the php package syberisle/filereflection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download syberisle/filereflection
More information about syberisle/filereflection
Files in syberisle/filereflection
Package filereflection
Short Description Complements the PHP reflection API with the missing ReflectionFile class
License LGPL-3.0+
Informations about the package filereflection
syberisle/filereflection
This library complements the PHP reflection API with the missing ReflectionFile class.
A few other libraries were available to do this already, but this one implements an important feature missing from other implementations that could be found: resolution of local type-names according to the name resolution rules.
Install
Via Composer
Usage
The interface is very simple:
ReflectionFile {
public __construct( string $path )
public string getPath ( void )
public string getNamespaceName ( void )
public string resolveName ( string $name )
public ReflectionClass getClass ( string $name )
public ReflectionClass[] getClasses ( void )
}
Usage of course is straight forward too:
use SyberIsle\FileReflection\ReflectionFile;
$file = new ReflectionFile('/path/to/MyNamespace/MyClass.php');
var_dump($file->resolveName('MyOtherClass')); // => '\MyNamespace\MyOtherClass'
Note that this library currently omits reflection/enumeration of functions, constants, etc.
Contributing
Please see CONTRIBUTING for details.
Credits
- Rasmus Schultz
- David Lundgren
- All Contributors
License
The LGPL 3.0+ License. Please see License File for more information.