If I have a set of functions
private function create() { echo "create...."; }
private function read() { echo "read...."; }
private function edit() { echo "edit...."; }
..
And how to use
if(is_callable($this,"create")) {
call_user_func(array($this, "createe"), 'Hello World');
} else {
echo "not found";
}
Also if I have a set of static functions
private static function create() { echo "create...."; }
private static function read() { echo "read...."; }
private static function edit() { echo "edit...."; }
..
How to use this variant?
if(functon_exists("self::create")) {
call_user_func(array($this, "createe"), 'Hello World');
} else {
echo "not found";
}
Thanks