Jump to content

[SOLVED] basic reflections method invoke help


nadeemshafi9

Recommended Posts

hi guys i just started using reflections and am having trouble invoking a method

 

here is teh error

 

Fatal error: Uncaught exception 'ReflectionException' with message 'Non-object passed to Invoke()' in C:\xampp\htdocs\blah\service.php:9 Stack trace: #0 C:\xampp\htdocs\rabbit\service.php(9): ReflectionMethod->invoke(NULL) #1 {main} thrown in C:\xampp\htdocs\blah\service.php on line 9

 

here is the code service.php?invoke=all (the method pronts "all")

 

include("inc.services.php");

$invoke = $_GET['invoke'];
$args = $_GET['args'];

$method = new ReflectionMethod('Music', $invoke);

var_dump($method->invoke(NULL));

 

any help much appreciated

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.