lib/TItemContainer.php
public function getItem(string $name)
    {
        if (isset($this->__delayItems[$name])) {

            return $this->__delayItems[$name];
        }

        if (!is_callable($this->__delayCtors[$name] ?? false)) {

            throw new Exception(
                "Item {$name} not found.",
                Exception::ITEM_NOT_FOUND
            );
        }

        return $this->__delayItems[$name] = $this->__delayCtors[$name](
            ...$this->__delayCtorArgs
        );
    }
public function getItem(string $name)
    {
        if (isset($this->__delayItems[$name])) {

            return $this->__delayItems[$name];
        }

        if (!is_callable($this->__delayCtors[$name] ?? false)) {

            throw new Exception(
                "Item {$name} not found.",
                Exception::ITEM_NOT_FOUND
            );
        }

        return $this->__delayItems[$name] = $this->__delayCtors[$name](
            ...$this->__delayCtorArgs
        );
    }
public function getItem ( string $ name ) { if ( isset ( $ this -> __delayItems [ $ name ] ) ) { return $ this -> __delayItems [ $ name ] ; } if ( ! is_callable ( $ this -> __delayCtors [ $ name ] ?? false ) ) { throw new Exception ( "Item {$name} not found." , Exception :: ITEM_NOT_FOUND ) ; } return $ this -> __delayItems [ $ name ] = $ this -> __delayCtors [ $ name ] ( ... $ this -> __delayCtorArgs ) ; }
Get a delay-initialized item by name.

@param string $name  name of item
@return mixed
@throws Exception
Get a delay - initialized item by name .