Neos\Flow\ObjectManagement\ObjectManager::getScope PHP Method

getScope() public method

Returns the scope of the specified object.
public getScope ( string $objectName ) : integer
$objectName string The object name
return integer One of the Configuration::SCOPE_ constants
    public function getScope($objectName)
    {
        if (!isset($this->objects[$objectName])) {
            $hint = $objectName[0] === '\\' ? ' Hint: You specified an object name with a leading backslash!' : '';
            throw new Exception\UnknownObjectException('Object "' . $objectName . '" is not registered.' . $hint, 1265367590);
        }
        return $this->objects[$objectName]['s'];
    }