public function invokeAnyMethod($name, array $args = array(), $object = null)
    {
        $method = $this->getMethod($name);
        $method->setAccessible(true);
        $value = $method->invokeArgs($this->getObject($object), $args);

        return $value;
    }
public function invokeAnyMethod($name, array $args = array(), $object = null)
    {
        $method = $this->getMethod($name);
        $method->setAccessible(true);
        $value = $method->invokeArgs($this->getObject($object), $args);

        return $value;
    }
public function invokeAnyMethod ( $ name , array $ args = array ( ) , $ object = null ) { $ method = $ this -> getMethod ( $ name ) ; $ method -> setAccessible ( true ) ; $ value = $ method -> invokeArgs ( $ this -> getObject ( $ object ) , $ args ) ; return $ value ; }
Invoke method in any case, if the method is not accessible, it will change the accessibility and restore
it before return.

@param string      $name   Method name
@param array       $args   The parameters to be passed to the function, as an array
@param object|null $object If object was not given at construction time, it needs to be passed here

@return mixed
Invoke method in any case if the method is not accessible it will change the accessibility and restore it before return .