function has($nameOrAlias)
    {
        if (!(strpos($nameOrAlias, self::SEPARATOR) !== false))
            $nameOrAlias = $this->getExtended($nameOrAlias);

        # check if we have alias to nested service:
        if (strpos($nameOrAlias, self::SEPARATOR) !== false) {
            // shared alias for nested container
            /* @see Container::extend */

            $xService = explode(self::SEPARATOR, $nameOrAlias);
            $nameOrAlias = array_pop($xService);

            $x = implode(self::SEPARATOR, $xService);
            if ($x === '') $x = self::SEPARATOR;

            if ( false === $nestContainer = $this->from($x) )
                return false;

            return $nestContainer->has($nameOrAlias);
        }

        #! If ServiceName is Alias then Extended Service must Exists
        return false !== $this->_attainCService($nameOrAlias);
    }
function has($nameOrAlias)
    {
        if (!(strpos($nameOrAlias, self::SEPARATOR) !== false))
            $nameOrAlias = $this->getExtended($nameOrAlias);

        # check if we have alias to nested service:
        if (strpos($nameOrAlias, self::SEPARATOR) !== false) {
            // shared alias for nested container
            /* @see Container::extend */

            $xService = explode(self::SEPARATOR, $nameOrAlias);
            $nameOrAlias = array_pop($xService);

            $x = implode(self::SEPARATOR, $xService);
            if ($x === '') $x = self::SEPARATOR;

            if ( false === $nestContainer = $this->from($x) )
                return false;

            return $nestContainer->has($nameOrAlias);
        }

        #! If ServiceName is Alias then Extended Service must Exists
        return false !== $this->_attainCService($nameOrAlias);
    }
function has ( $ nameOrAlias ) { if ( ! ( strpos ( $ nameOrAlias , self :: SEPARATOR ) !== false ) ) $ nameOrAlias = $ this -> getExtended ( $ nameOrAlias ) ; # check if we have alias to nested service: if ( strpos ( $ nameOrAlias , self :: SEPARATOR ) !== false ) { // shared alias for nested container /* @see Container::extend */ $ xService = explode ( self :: SEPARATOR , $ nameOrAlias ) ; $ nameOrAlias = array_pop ( $ xService ) ; $ x = implode ( self :: SEPARATOR , $ xService ) ; if ( $ x === '' ) $ x = self :: SEPARATOR ; if ( false === $ nestContainer = $ this -> from ( $ x ) ) return false ; return $ nestContainer -> has ( $ nameOrAlias ) ; } #! If ServiceName is Alias then Extended Service must Exists return false !== $ this -> _attainCService ( $ nameOrAlias ) ; }
Check for a registered instance
! It also check for extend aliases

@param string $nameOrAlias Service Name

@return bool
Check for a registered instance ! It also check for extend aliases