public function create($serviceId)
    {
        try {
            return $this->container->get($serviceId, Container::NULL_ON_INVALID_REFERENCE);
        } catch (\Exception $e) {
            if ($this->isCausedBySyntheticServiceRequest($e)) {
                // Ignore errors that are caused by synthetic services. It is simply not
                // possible to create them in a reliable way.
                return null;
            }
            throw new CannotInstantiateServiceException($serviceId, 0, $e);
        }
    }
public function create($serviceId)
    {
        try {
            return $this->container->get($serviceId, Container::NULL_ON_INVALID_REFERENCE);
        } catch (\Exception $e) {
            if ($this->isCausedBySyntheticServiceRequest($e)) {
                // Ignore errors that are caused by synthetic services. It is simply not
                // possible to create them in a reliable way.
                return null;
            }
            throw new CannotInstantiateServiceException($serviceId, 0, $e);
        }
    }
public function create ( $ serviceId ) { try { return $ this -> container -> get ( $ serviceId , Container :: NULL_ON_INVALID_REFERENCE ) ; } catch ( \ Exception $ e ) { if ( $ this -> isCausedBySyntheticServiceRequest ( $ e ) ) { // Ignore errors that are caused by synthetic services. It is simply not // possible to create them in a reliable way. return null ; } throw new CannotInstantiateServiceException ( $ serviceId , 0 , $ e ) ; } }
Creates the service with the given ID.

@param string $serviceId
@return object|null The service object or null if it cannot be created (for comprehensible reasons).
@throws CannotInstantiateServiceException If it is not possible to create the service.
Creates the service with the given ID .