1. Go to this page and download the library: Download yep/reflection library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yep / reflection example snippets
php composer.phar
class SomeClass {
private $someProperty;
protected function someMethod($someArgument) {
return $someArgument;
}
public function getSomeProperty() {
return $this->someProperty;
}
public function setSomeProperty($someProperty) {
$this->someProperty = $someProperty;
}
}
class SomeClass2 extends SomeClass {
}
$someClass = new SomeClass();
$reflection = \Yep\Reflection\ReflectionClass::from($class = $someClass);