getConnection() 공개 메소드

Get the LDAP connection resource.
public getConnection ( ) : resource
리턴 resource
예제 #1
0
 /**
  * Resets the paging control so that read operations work after a paging operation is used.
  *
  * @throws LdapConnectionException
  */
 public function resetPagingControl()
 {
     // Per RFC 2696, to abandon a paged search you should send a size of 0 along with the cookie used in the search.
     // However, testing this it doesn't seem to completely work. Perhaps a PHP bug?
     if (!@ldap_control_paged_result($this->connection->getConnection(), 0, false, $this->cookie)) {
         throw new LdapConnectionException(sprintf('Unable to reset paged results control for read operation: %s', $this->connection->getLastError()));
     }
 }
 function let(LdapConnectionInterface $connection, EventDispatcherInterface $dispatcher, LdapLoggerInterface $logger)
 {
     $connection->getConfig()->willReturn(new DomainConfiguration('example.local'));
     $connection->getConnection()->willReturn(null);
     $connection->isBound()->willReturn(true);
     $connection->getServer()->willReturn('foo');
     $connection->getIdleTime()->willReturn(1);
     $this->setConnection($connection);
     $this->setEventDispatcher($dispatcher);
     $this->setLogger($logger);
 }