protected function handlerToString($handler, $name = '')
    {
        if (is_array($handler)) {
            if (is_object($handler[0])) {
                $class = get_class($handler[0]);
                $call = '->';

            } else {
                $class = $handler[0];
                $call = '::';
            }
            $result = "{$class}{$call}{$handler[1]}";
        } else {
            $result = 'function' . ('' != $handler ? " {$handler}" : '');
        }
        $result .= "({$name})";

        return $result;
    }