WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

YoastSEO_Vendor\Symfony\Component\DependencyInjection

Container::has() public Yoast 1.0

Returns true if the given service is defined.

{} Это метод класса: Container{}

Хуков нет.

Возвращает

true/false. true if the service is defined, false otherwise

Использование

$Container = new Container();
$Container->has( $id );
$id(строка) (обязательный)
The service identifier

Код Container::has() Yoast 15.1.1

<?php
public function has($id)
{
    for ($i = 2;;) {
        if (isset($this->privates[$id])) {
            @\trigger_error(\sprintf('The "%s" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0.', $id), \E_USER_DEPRECATED);
        }
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }
        if (isset($this->services[$id])) {
            return \true;
        }
        if ('service_container' === $id) {
            return \true;
        }
        if (isset($this->fileMap[$id]) || isset($this->methodMap[$id])) {
            return \true;
        }
        if (--$i && $id !== ($normalizedId = $this->normalizeId($id))) {
            $id = $normalizedId;
            continue;
        }
        // We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder,
        // and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper)
        if (!$this->methodMap && !$this instanceof \YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerBuilder && __CLASS__ !== static::class && \method_exists($this, 'get' . \strtr($id, $this->underscoreMap) . 'Service')) {
            @\trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', \E_USER_DEPRECATED);
            return \true;
        }
        return \false;
    }
}