/** * @param ConfiguredInstance $instance * * @return bool whether the instance exists in the database */ public function hasInstance(ConfiguredInstance $instance) { return $this->findPk($instance->getName()) !== null; }