public function callMethod(Core $dwoo, $obj, $method, $args)
    {
        foreach ($this->allowedMethods as $class => $methods) {
            if (!isset($methods[$method])) {
                continue;
            }
            if ($obj instanceof $class) {
                return call_user_func_array(array($obj, $method), $args);
            }
        }
        $dwoo->triggerError('The current security policy prevents you from calling ' . get_class($obj) . '::' . $method . '()');

        return null;
    }
public function callMethod(Core $dwoo, $obj, $method, $args)
    {
        foreach ($this->allowedMethods as $class => $methods) {
            if (!isset($methods[$method])) {
                continue;
            }
            if ($obj instanceof $class) {
                return call_user_func_array(array($obj, $method), $args);
            }
        }
        $dwoo->triggerError('The current security policy prevents you from calling ' . get_class($obj) . '::' . $method . '()');

        return null;
    }
public function callMethod ( Core $ dwoo , $ obj , $ method , $ args ) { foreach ( $ this -> allowedMethods as $ class => $ methods ) { if ( ! isset ( $ methods [ $ method ] ) ) { continue ; } if ( $ obj instanceof $ class ) { return call_user_func_array ( array ( $ obj , $ method ) , $ args ) ; } } $ dwoo -> triggerError ( 'The current security policy prevents you from calling ' . get_class ( $ obj ) . '::' . $ method . '()' ) ; return null ; }
This is used at run time to check whether method calls are allowed or not.

@param Core   $dwoo   dwoo instance that calls this
@param object $obj    any object on which the method must be called
@param string $method lowercased method name
@param array  $args   arguments array

@return mixed result of method call or unll + E_USER_NOTICE if not allowed
This is used at run time to check whether method calls are allowed or not .