protected function getObjectByClass(/*# string */ $classname)
    {
        if ($this->getResolver()->hasService($classname)) {
            $serviceId = ObjectResolver::getServiceId($classname);
            return $this->getResolver()->get($serviceId);
        }
        throw new LogicException(
            Message::get(Message::DI_CLASS_UNKNOWN, $classname),
            Message::DI_CLASS_UNKNOWN
        );
    }
protected function getObjectByClass(/*# string */ $classname)
    {
        if ($this->getResolver()->hasService($classname)) {
            $serviceId = ObjectResolver::getServiceId($classname);
            return $this->getResolver()->get($serviceId);
        }
        throw new LogicException(
            Message::get(Message::DI_CLASS_UNKNOWN, $classname),
            Message::DI_CLASS_UNKNOWN
        );
    }
protected function getObjectByClass ( /*# string */ $ classname ) { if ( $ this -> getResolver ( ) -> hasService ( $ classname ) ) { $ serviceId = ObjectResolver :: getServiceId ( $ classname ) ; return $ this -> getResolver ( ) -> get ( $ serviceId ) ; } throw new LogicException ( Message :: get ( Message :: DI_CLASS_UNKNOWN , $ classname ) , Message :: DI_CLASS_UNKNOWN ) ; }
Get an object base on provided classname or interface name

@param  string $classname class or interface name
@return object
@throws \Exception if something goes wrong
@access protected
Get an object base on provided classname or interface name