public function getByClassname(string $classname)
    {
        foreach ($this->container as $value) {
            if (is_object($value) && $value instanceof $classname) {
                return $value;
            }
        }

        return null;
    }
public function getByClassname(string $classname)
    {
        foreach ($this->container as $value) {
            if (is_object($value) && $value instanceof $classname) {
                return $value;
            }
        }

        return null;
    }
public function getByClassname ( string $ classname ) { foreach ( $ this -> container as $ value ) { if ( is_object ( $ value ) && $ value instanceof $ classname ) { return $ value ; } } return null ; }
Get registered value by class name. If not found, will return null.

@param string $classname

@return mixed|null
Get registered value by class name . If not found will return null .