src/Register.php
public function destroySingleton($name = null)
    {
        if (is_null($name)) {
            $this->singletons = [];
        }

        if (isset($this->singletons[$name])) {
            unset($this->singletons[$name]);
        }

        $this->makeLog('Destroy singleton: ' . (is_null($name) ? 'all' : $name));

        return $this;
    }
public function destroySingleton($name = null)
    {
        if (is_null($name)) {
            $this->singletons = [];
        }

        if (isset($this->singletons[$name])) {
            unset($this->singletons[$name]);
        }

        $this->makeLog('Destroy singleton: ' . (is_null($name) ? 'all' : $name));

        return $this;
    }
public function destroySingleton ( $ name = null ) { if ( is_null ( $ name ) ) { $ this -> singletons = [ ] ; } if ( isset ( $ this -> singletons [ $ name ] ) ) { unset ( $ this -> singletons [ $ name ] ) ; } $ this -> makeLog ( 'Destroy singleton: ' . ( is_null ( $ name ) ? 'all' : $ name ) ) ; return $ this ; }
destroy called object

@param string $name
@return $this
destroy called object