CacheTool\CacheTool::__call PHP Method

__call() public method

Calls proxy functions
public __call ( string $name, array $arguments ) : mixed
$name string
$arguments array
return mixed
    public function __call($name, $arguments)
    {
        $this->logger->notice(sprintf('Executing: %s(%s)', $name, implode(', ', array_map('json_encode', $arguments))));
        if ($this->getFunction($name)) {
            return call_user_func_array($this->getFunction($name), $arguments);
        }
    }

Usage Example

Beispiel #1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testInexistentWithMagicCallFunction()
 {
     $cachetool = new CacheTool(null, $this->getLogger());
     $cachetool->__call('doesNotExist', array());
 }