Kahlan\Plugin\Call\Calls::_call PHP Method

_call() public static method

Helper for the log() method.
public static _call ( object | string $reference, string $call )
$reference object | string An instance or a fully-namespaced class name.
$call string The method name.
    public static function _call($reference, $call)
    {
        $static = false;
        if (preg_match('/^::.*/', $call['name'])) {
            $call['name'] = substr($call['name'], 2);
            $call['static'] = true;
        }
        if (is_object($reference)) {
            $call += ['instance' => $reference, 'class' => get_class($reference), 'static' => $static, 'method' => null];
        } elseif ($reference) {
            $call += ['instance' => null, 'class' => $reference, 'static' => $static, 'method' => null];
        } else {
            $call += ['instance' => null, 'class' => null, 'static' => false, 'method' => null];
        }
        return $call;
    }