class FakeCollection in Lightweight Directory Access Protocol (LDAP) 8.4
Simulate the collection response.
Hierarchy
- class \Drupal\ldap_servers_dummy\FakeCollection implements \Symfony\Component\Ldap\Adapter\CollectionInterface
Expanded class hierarchy of FakeCollection
1 file declares its use of FakeCollection
- LoginTest.php in ldap_authentication/
tests/ src/ Kernel/ LoginTest.php
File
- ldap_servers/
tests/ modules/ ldap_servers_dummy/ src/ FakeCollection.php, line 13
Namespace
Drupal\ldap_servers_dummyView source
class FakeCollection implements CollectionInterface {
/**
* Result.
*
* @var \ArrayObject
*/
protected $result;
/**
* New FakeCollection.
*
* @param \Symfony\Component\Ldap\Entry[] $result
* Entries.
*/
public function __construct(array $result) {
$this->result = new \ArrayObject($result);
}
/**
* {@inheritdoc}
*/
public function toArray() : array {
return (array) $this->result;
}
/**
* {@inheritdoc}
*/
public function getIterator() {
return $this->result
->getIterator();
}
/**
* {@inheritdoc}
*/
public function offsetExists($offset) : bool {
return $this->result
->offsetExists($offset);
}
/**
* {@inheritdoc}
*/
public function offsetGet($offset) {
return $this->result
->offsetGet($offset);
}
/**
* {@inheritdoc}
*/
public function offsetSet($offset, $value) : void {
$this->result
->offsetSet($offset, $value);
}
/**
* {@inheritdoc}
*/
public function offsetUnset($offset) : void {
$this->result
->offsetUnset($offset);
}
/**
* {@inheritdoc}
*/
public function count() : int {
return $this->result
->count();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FakeCollection:: |
protected | property | Result. | |
FakeCollection:: |
public | function | ||
FakeCollection:: |
public | function | ||
FakeCollection:: |
public | function | ||
FakeCollection:: |
public | function | ||
FakeCollection:: |
public | function | ||
FakeCollection:: |
public | function | ||
FakeCollection:: |
public | function | ||
FakeCollection:: |
public | function | New FakeCollection. |