public function set(string $id, string $class = null): void
    {
        $this->autoResolvable[$id] = $class ?? $id;
    }
public function set(string $id, string $class = null): void
    {
        $this->autoResolvable[$id] = $class ?? $id;
    }
public function set ( string $ id , string $ class = null ) : void { $ this -> autoResolvable [ $ id ] = $ class ?? $ id ; }
Add to available services a class which can be construct by the container resolve method.

@param string      $id    The service identifier.
@param string|null $class The class name, null if it can $id as a class name.
Add to available services a class which can be construct by the container resolve method .