public function hasInstance(string $class, string $selector = Injector::DEFAULT_SELECTOR)
    {
        return isset($this->objects[$class][$selector]);
    }
public function hasInstance(string $class, string $selector = Injector::DEFAULT_SELECTOR)
    {
        return isset($this->objects[$class][$selector]);
    }
public function hasInstance ( string $ class , string $ selector = Injector :: DEFAULT_SELECTOR ) { return isset ( $ this -> objects [ $ class ] [ $ selector ] ) ; }
Check if an instance for the class is available.

@param string $class The class to check for an instance
@param string $selector The selector to use to find an instance. Defaults to DEFAULT_SELECTOR
@return bool True if an instance is available, false if not
Check if an instance for the class is available .