Symfony\Component\DependencyInjection\ContainerInterface::isScopeActive PHP Method

isScopeActive() public method

It does however not check if the scope actually exists.
public isScopeActive ( string $name ) : boolean
$name string
return boolean
    function isScopeActive($name);

Usage Example

 /**
  * @return string
  */
 public function getLocale()
 {
     if ($this->container !== null && $this->container->isScopeActive('request')) {
         return $this->container->get('request')->getLocale();
     }
     return $this->locale;
 }
All Usage Examples Of Symfony\Component\DependencyInjection\ContainerInterface::isScopeActive