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


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 17.1

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;
        // 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;