You are here

class FakeQuery in Lightweight Directory Access Protocol (LDAP) 8.4

Simulate the query response.

Hierarchy

  • class \Drupal\ldap_servers_dummy\FakeQuery implements \Symfony\Component\Ldap\Adapter\QueryInterface

Expanded class hierarchy of FakeQuery

File

ldap_servers/tests/modules/ldap_servers_dummy/src/FakeQuery.php, line 13

Namespace

Drupal\ldap_servers_dummy
View source
class FakeQuery implements QueryInterface {

  /**
   * Result.
   *
   * @var mixed
   */
  protected $result;

  /**
   * Executes a query and returns the list of Ldap entries.
   *
   * @return \Symfony\Component\Ldap\Adapter\CollectionInterface|\Symfony\Component\Ldap\Entry[]
   *   Record.
   *
   * @throws \Symfony\Component\Ldap\Exception\NotBoundException
   * @throws \Symfony\Component\Ldap\Exception\LdapException
   */
  public function execute() {
    return $this->result;
  }

  /**
   * Set result.
   *
   * @param mixed $result
   *   Result.
   */
  public function setResult($result) : void {
    $this->result = $result;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FakeQuery::$result protected property Result.
FakeQuery::execute public function Executes a query and returns the list of Ldap entries.
FakeQuery::setResult public function Set result.