private function getServiceConditionals($value)
    {
        $conditions = array();
        foreach (ContainerBuilder::getInitializedConditionals($value) as $service) {
            if (!$this->container->hasDefinition($service)) {
                return 'false';
            }
            $conditions[] = sprintf("isset(\$this->services['%s'])", $service);
        }
        foreach (ContainerBuilder::getServiceConditionals($value) as $service) {
            if ($this->container->hasDefinition($service) && !$this->container->getDefinition($service)->isPublic()) {
                continue;
            }

            $conditions[] = sprintf("\$this->has('%s')", $service);
        }

        if (!$conditions) {
            return '';
        }

        return implode(' && ', $conditions);
    }
private function getServiceConditionals($value)
    {
        $conditions = array();
        foreach (ContainerBuilder::getInitializedConditionals($value) as $service) {
            if (!$this->container->hasDefinition($service)) {
                return 'false';
            }
            $conditions[] = sprintf("isset(\$this->services['%s'])", $service);
        }
        foreach (ContainerBuilder::getServiceConditionals($value) as $service) {
            if ($this->container->hasDefinition($service) && !$this->container->getDefinition($service)->isPublic()) {
                continue;
            }

            $conditions[] = sprintf("\$this->has('%s')", $service);
        }

        if (!$conditions) {
            return '';
        }

        return implode(' && ', $conditions);
    }
private function getServiceConditionals ( $ value ) { $ conditions = array ( ) ; foreach ( ContainerBuilder :: getInitializedConditionals ( $ value ) as $ service ) { if ( ! $ this -> container -> hasDefinition ( $ service ) ) { return 'false' ; } $ conditions [ ] = sprintf ( "isset(\$this->services['%s'])" , $ service ) ; } foreach ( ContainerBuilder :: getServiceConditionals ( $ value ) as $ service ) { if ( $ this -> container -> hasDefinition ( $ service ) && ! $ this -> container -> getDefinition ( $ service ) -> isPublic ( ) ) { continue ; } $ conditions [ ] = sprintf ( "\$this->has('%s')" , $ service ) ; } if ( ! $ conditions ) { return '' ; } return implode ( ' && ' , $ conditions ) ; }
Get the conditions to execute for conditional services.

@param string $value

@return null|string
Get the conditions to execute for conditional services .