Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function (Index())->Index() does not exist
- ReflectionMethod Object
- (
- [name] => Index
- [class] => Index
- )
- $call = new ReflectionMethod( "ExampleClass", "exampleMethod" );
- $call->invokeArgs( new ExampleClass(), ["argument1", "argument2"] );
- print_r( $call );
- $type = 'ExampleClass';
- $reflector = new ReflectionClass( $type );
- if ( !$reflector->isInstantiable() )
- throw new Exception( "Resolution target [$type] is not instantiable." );
- $constructor = $reflector->getConstructor();
- $parameters = $constructor->getParameters();
- $call = new ReflectionMethod( "ExampleClass", "exampleMethod" );
- $call->invokeArgs( new ExampleClass(), ["argument1", "argument2"] );
- Argument 1: argument1
- Argument 2: argument2
Add Comment
Please, Sign In to add comment