Lsrur\Inspector\inspector::__call PHP 메소드

__call() 공개 메소드

Magic methods
public __call ( [type] $method, [type] $args ) : [type]
$method [type]
$args [type]
리턴 [type]
    public function __call($method, $args)
    {
        if (!$this->isOn()) {
            return;
        }
        // if the called is a MessageCollector method, redirect to MessageCollector->add
        if (in_array($method, ['table', 'info', 'warning', 'error', 'log', 'success'])) {
            $collector = $this->collectorMan->get('MessageCollector');
            array_unshift($args, $method);
            $method = 'add';
        } elseif ($collector = $this->collectorMan->getMethod($method)) {
            $method = 'b_' . $method;
        } else {
            die("Method {$method} not found in collector classes");
        }
        return call_user_func_array(array(&$collector, $method), $args);
    }