public function exists($id)
    {
        if (array_key_exists($id, $this->components)) {
            return true;
        }

        if (isset($this->instances[$id])) {
            return true;
        }

        return false;
    }
public function exists($id)
    {
        if (array_key_exists($id, $this->components)) {
            return true;
        }

        if (isset($this->instances[$id])) {
            return true;
        }

        return false;
    }
public function exists ( $ id ) { if ( array_key_exists ( $ id , $ this -> components ) ) { return true ; } if ( isset ( $ this -> instances [ $ id ] ) ) { return true ; } return false ; }
Returns true if component exists in container

@param string $id

@return bool
Returns true if component exists in container