public function get($alias, $fallback = '_michaels_no_fallback')
    {
        // If this is a link, just go back to the master
        $link = $this->getIfExists("$alias");
        if (is_string($link) && strpos($link, '_michaels_link_') !== false) {
            return $this->get(str_replace('_michaels_link_', '', $link));
        }

        // Otherwise, continue
        $shared = $this->getIfExists("_singletons.$alias");

        if ($shared instanceof NoItemFoundMessage) {
            // This is not a shared item. We want a new one each time
            return $this->produceDependency($alias, $fallback);
        } else {
            // This is shared, and object has already been cached
            if (is_object($shared)) {
                return $shared;

            // This is shared, but we must produce and cache it
            } else {
                $object = $this->produceDependency($alias, $fallback);
                $this->set("_singletons.$alias", $object);
                return $object;
            }
        }
    }
public function get($alias, $fallback = '_michaels_no_fallback')
    {
        // If this is a link, just go back to the master
        $link = $this->getIfExists("$alias");
        if (is_string($link) && strpos($link, '_michaels_link_') !== false) {
            return $this->get(str_replace('_michaels_link_', '', $link));
        }

        // Otherwise, continue
        $shared = $this->getIfExists("_singletons.$alias");

        if ($shared instanceof NoItemFoundMessage) {
            // This is not a shared item. We want a new one each time
            return $this->produceDependency($alias, $fallback);
        } else {
            // This is shared, and object has already been cached
            if (is_object($shared)) {
                return $shared;

            // This is shared, but we must produce and cache it
            } else {
                $object = $this->produceDependency($alias, $fallback);
                $this->set("_singletons.$alias", $object);
                return $object;
            }
        }
    }
public function get ( $ alias , $ fallback = '_michaels_no_fallback' ) { // If this is a link, just go back to the master $ link = $ this -> getIfExists ( "$alias" ) ; if ( is_string ( $ link ) && strpos ( $ link , '_michaels_link_' ) !== false ) { return $ this -> get ( str_replace ( '_michaels_link_' , '' , $ link ) ) ; } // Otherwise, continue $ shared = $ this -> getIfExists ( "_singletons.$alias" ) ; if ( $ shared instanceof NoItemFoundMessage ) { // This is not a shared item. We want a new one each time return $ this -> produceDependency ( $ alias , $ fallback ) ; } else { // This is shared, and object has already been cached if ( is_object ( $ shared ) ) { return $ shared ; // This is shared, but we must produce and cache it } else { $ object = $ this -> produceDependency ( $ alias , $ fallback ) ; $ this -> set ( "_singletons.$alias" , $ object ) ; return $ object ; } } }
Returns the request object with all dependencies

Overrides the `get()` method on ManagesItemsTrait
Use getRaw() to return the raw value

string      Full class name for a new object each time
callable    Factory to create new object (passed manager)
object      The exact object to be returned

@param string $alias
@param string|mixed $fallback
@return mixed
@throws \Exception
Returns the request object with all dependencies