src/Container.php
public function share(string $abstract) : ContainerInterface
    {
        $object = $this->get($abstract);

        $this->collection[$abstract] = $object;

        return $this;
    }
public function share(string $abstract) : ContainerInterface
    {
        $object = $this->get($abstract);

        $this->collection[$abstract] = $object;

        return $this;
    }
public function share ( string $ abstract ) : ContainerInterface { $ object = $ this -> get ( $ abstract ) ; $ this -> collection [ $ abstract ] = $ object ; return $ this ; }
Makes an resolvable element an singleton.

@param  string $abstract The alias name that will be used to call the element.

@throws NotFoundException  When no element was found with $abstract key.
@throws ContainerException When the element on $abstract key is not resolvable.

@return ContainerInterface
Makes an resolvable element an singleton .