public function has($id)
    {

        // load the object manager instance
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getNamingDirectory()->search(
            sprintf('php:global/%s/%s', $this->getApplication()->getUniqueName(), ObjectManagerInterface::IDENTIFIER)
        );

        // query whether or not a object descriptor or the class definition exists
        return class_exists($id) || $objectManager->hasObjectDescriptor($id) || Environment::singleton()->hasAttribute($id);
    }
public function has($id)
    {

        // load the object manager instance
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getNamingDirectory()->search(
            sprintf('php:global/%s/%s', $this->getApplication()->getUniqueName(), ObjectManagerInterface::IDENTIFIER)
        );

        // query whether or not a object descriptor or the class definition exists
        return class_exists($id) || $objectManager->hasObjectDescriptor($id) || Environment::singleton()->hasAttribute($id);
    }
public function has ( $ id ) { // load the object manager instance /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */ $ objectManager = $ this -> getNamingDirectory ( ) -> search ( sprintf ( 'php:global/%s/%s' , $ this -> getApplication ( ) -> getUniqueName ( ) , ObjectManagerInterface :: IDENTIFIER ) ) ; // query whether or not a object descriptor or the class definition exists return class_exists ( $ id ) || $ objectManager -> hasObjectDescriptor ( $ id ) || Environment :: singleton ( ) -> hasAttribute ( $ id ) ; }
Returns TRUE if the container can return an entry for the given identifier.
Returns FALSE otherwise.

`has($id)` returning TRUE does not mean that `get($id)` will not throw an exception.
It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.

@param string $id Identifier of the entry to look for.

@return boolean TRUE if an entry for the given identifier exists, else FALSE
Returns TRUE if the container can return an entry for the given identifier . Returns FALSE otherwise .