public static function getInstance($type, $connection) { if (LdapConnection::TYPE_AD == $type) { return new ADLastErrorStrategy($connection); } else { return new self($connection); } }
/** * {@inheritdoc} */ public function getDiagnosticMessage() { return LastErrorStrategy::getInstance($this->config->getLdapType(), $this->connection)->getDiagnosticMessage(); }