Trace function by name.

@param  string|array $name          name of function or pair [class, method]
@param  bool         $deep          show inside function trace too
@param  bool         $showInternals show internals in inside function trace
353776
public function traceFunction($name, $deep = false, $showInternals = false)
    {
        if (\is_array($name)) {
            $name1 = \implode('::', $name);
            $name2 = \implode('->', $name);
        } else {
            $name1 = $name2 = (string) $name;
        }

        $cb = function (\stdClass $record, $isEntry) use ($name1, $name2, $deep, $showInternals) {
            static $cnt = 0;

            if ($record->function === $name1 || $record->function === $name2) {
                $cnt += $isEntry ? 1 : -1;

                return null;
            }

            return ($deep && $cnt && ($showInternals || !$record->isInternal)) ? null : self::SKIP;
        };

        $this->setFilterCallback($cb, self::FILTER_BOTH);
    }
344070
def show(recursively=false, out=STDOUT, depth=0)
      max_name_length = names.inject(5){|max_len, name| [max_len, name.length].max}
      if names.size > 0
        out.puts "#{" " * (depth*2)}*#{"-" * 80}"
      end
      names.each do |name|
        out.puts sprintf("#{" " * (depth*2)}%-#{max_name_length}s  Pos: %6s  Len: %6s  Type: %10s  Cont: %s",
                         name.to_s,
                         @scope.eval_bit_position(name),
                         @scope.eval_bit_length(name),
                         self[name].class.name.split("::").last,
                         self[name] ? self[name].content_description : "Nil")
        self[name].show(true, out, depth + 1) if recursively && self[name]
      end
    end
387440
public static function mark($name, $context = null, $data = [])
    {
        if ($context) {
            $name .= ' / ' . $context;
        }

        $name .= sprintf('(%s)', uniqid());

        try {
            static::getInstance()->mark($name, $data);
        } catch (\Exception $e) {
            return;
        }
    }
1069425
public static function full_func_name($item, $showArgs = false, $argCharLimit = 10000)
    {
        $funcName = '';
        if (isset($item['class'])) {
            $funcName .= $item['class'];
        }
        if (isset($item['type'])) {
            $funcName .= $item['type'];
        }
        if (isset($item['function'])) {
            $funcName .= $item['function'];
        }

        if ($showArgs && isset($item['args'])) {
            $args = array();
            foreach ($item['args'] as $arg) {
                if (!is_object($arg) || method_exists($arg, '__toString')) {
                    $sarg = is_array($arg) ? 'Array' : strval($arg);
                    $args[] = (strlen($sarg) > $argCharLimit) ? substr($sarg, 0, $argCharLimit) . '...' : $sarg;
                } else {
                    $args[] = get_class($arg);
                }
            }

            $funcName .= "(" . implode(", ", $args) . ")";
        }

        return $funcName;
    }
649710
protected function _classesImplements($names, array $interfaces, $must_implement_all = false, array &$logs = array())
    {
        if (!is_array($names)) {
            $names = array($names);
        }
        $ok = false;
        foreach ($names as $_name) {
            foreach ($interfaces as $_interface) {
                if (interface_exists($_interface)) {
                    if (CodeHelper::impelementsInterface($_name, $_interface)) {
                        $ok = true;
                    } elseif ($must_implement_all) {
                        $ok = false;
                    }
                } else {
                    $logs[] = $this->_getErrorMessage('Interface "%s" not found!', $_interface);
                }
            }
        }
        return $ok;
    }
188474
public function push(callable $middleware, $name = '')
    {
        $this->stack[] = [$middleware, $name];
        $this->cached = null;
    }
1147161
public static function show($val, $showHeader = true, HTTPRequest $request = null)
    {
        // Don't show on live
        if (Director::isLive()) {
            return;
        }

        echo static::create_debug_view($request)
            ->debugVariable($val, static::caller(), $showHeader);
    }
705493
public function getFavouriteShow(string $name): Stream
    {
        $roughMatch = false;

        $shows = $this->getFavouriteShows();
        foreach ($shows as $show) {
            if ($show->getTitle() === $name) {
                return $show;
            }
            if (strtolower($show->getTitle()) === strtolower($name)) {
                $roughMatch = $show;
            }
        }

        if ($roughMatch) {
            return $roughMatch;
        }

        throw new NotFoundException("Unable to find a radio show by the name '{$name}'");
    }
509337
public function markComponentSuccessfullyUninstalled($name)
    {
        try {
            Option::delete(self::getNameInOptionTable($name));
        } catch (\Exception $e) {
            // case when the option table is not yet created (before 0.2.10)
        }

        /**
         * Event triggered after a component has been uninstalled.
         *
         * @param string $name The component that has been uninstalled.
         */
        Piwik::postEvent('Updater.componentUninstalled', array($name));
    }
661557
public function viewHelper($context, $name = null)
    {
        if ($name !== null && isset($context['this'])) {
            $this->call($context['this'], Inflector::variablize($name));
        }
    }
131056
public static function debugLog(string $name, array $arguments)
    {
        $logger = Config::getLogger();
        if ($logger) {
            $logger->debug($name, $arguments);
        }
    }
303442
public static function operation($name, $signatures, $fn = null)
    {
        if (! is_array($signatures)) {
            $signatures = [$signatures];
        }
        foreach ($signatures as $signature) {
            self::$operations[] = _stream_operation($name, $signature, $fn);
        }
    }
7989
protected static function _isCallablePluginData($name, $plugin, $callback)
    {
        if (Arr::in($name, self::$_manifestEvents) &&
            !isset(self::$_eventList[$name][$plugin]) &&
            is_callable($callback)
        ) {
            return true;
        }

        return false;
    }
639393
public function runCallbacks($name, $recursive = true)
    {
        $instances = $recursive ? $this->parents(true) : [$this];
        if (strncmp($name, 'after', 5) === 0) {
            $instances = array_reverse($instances);
        }
        foreach ($instances as $instance) {
            foreach ($instance->_callbacks[$name] as $closure) {
                $this->_suite->runBlock($this, $closure, $name);
            }
        }
    }
310376
public function hasConcreteMethod($name) {
    if (!array_key_exists($name,$this->methods)) {
      return FALSE;
    }
    $method = $this->getMethod($name);
    
    return !$method->getDeclaringClass()->isInterface();
  }
1304642
public function getShowFieldDescription($name)
    {
        $this->buildShow();

        return $this->hasShowFieldDescription($name) ? $this->showFieldDescriptions[$name] : null;
    }
784202
public function register_function($name, $callback, $cacheable = true, $cache_attrs = null)
    {
        if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_FUNCTION) {
            throw new Exception('Multiple plugins of different types can not share the same name');
        }
        $this->plugins[$name] = array(
            'type'     => self::SMARTY_FUNCTION,
            'callback' => $callback
        );
    }