public function singleton($id, callable $resolver)
    {
        $this->innerSet($id, $resolver);
        unset($this->resolved[$id]);
        $this->singletons[$id] = true;
        return $this;
    }
public function singleton($id, callable $resolver)
    {
        $this->innerSet($id, $resolver);
        unset($this->resolved[$id]);
        $this->singletons[$id] = true;
        return $this;
    }
public function singleton ( $ id , callable $ resolver ) { $ this -> innerSet ( $ id , $ resolver ) ; unset ( $ this -> resolved [ $ id ] ) ; $ this -> singletons [ $ id ] = true ; return $ this ; }
Sets a resolver for entry of the container by its identifier as singleton.

@param string $id Identifier of the entry to look for.
@param callable $resolver Function that resolves the entry and returns it.

@return $this.
Sets a resolver for entry of the container by its identifier as singleton .