PHP Class LdapTools\Connection\PageControl

Author: Chad Sikorra ([email protected])
Show file Open project: ldaptools/ldaptools

Protected Properties

Property Type Description
$connection LdapTools\Connection\LdapConnectionInterface
$cookie null | string
$isEnabled Whether or not paging is actually active for the connection.
$pageSize The page size for the paging operation.
$resultNumber The result set number the paging operation is currently on.
$sizeLimit The size limit for the paging operation.

Public Methods

Method Description
__construct ( LdapTools\Connection\LdapConnectionInterface $connection )
end ( ) End a paging operation.
isActive ( ) : boolean Returns whether or not a paging operation is active based on the status of the paging cookie (omnomnom).
isEnabled ( ) : boolean Check whether or not paging is active. If it is not active, the controls methods will not actually do anything.
next ( ) Signifies to the connection to expect the next paged result with the current cookie and page size.
resetPagingControl ( ) Resets the paging control so that read operations work after a paging operation is used.
setIsEnabled ( boolean $enabled ) Set whether or not paging is active and should be used.
start ( integer $pageSize, integer $sizeLimit ) Start a paging operation by setting up the cookie and the page size. Optionally set a size limit.
update ( resource $result ) Updating the paging operation based on the result resource returned from a query.

Method Details

__construct() public method

public __construct ( LdapTools\Connection\LdapConnectionInterface $connection )
$connection LdapTools\Connection\LdapConnectionInterface

end() public method

End a paging operation.
public end ( )

isActive() public method

Returns whether or not a paging operation is active based on the status of the paging cookie (omnomnom).
public isActive ( ) : boolean
return boolean

isEnabled() public method

Check whether or not paging is active. If it is not active, the controls methods will not actually do anything.
public isEnabled ( ) : boolean
return boolean

next() public method

Signifies to the connection to expect the next paged result with the current cookie and page size.
public next ( )

resetPagingControl() public method

Resets the paging control so that read operations work after a paging operation is used.
public resetPagingControl ( )

setIsEnabled() public method

Set whether or not paging is active and should be used.
public setIsEnabled ( boolean $enabled )
$enabled boolean

start() public method

Start a paging operation by setting up the cookie and the page size. Optionally set a size limit.
public start ( integer $pageSize, integer $sizeLimit )
$pageSize integer
$sizeLimit integer

update() public method

Updating the paging operation based on the result resource returned from a query.
public update ( resource $result )
$result resource

Property Details

$connection protected property

protected LdapConnectionInterface,LdapTools\Connection $connection
return LdapTools\Connection\LdapConnectionInterface

$isEnabled protected property

Whether or not paging is actually active for the connection.
protected $isEnabled

$pageSize protected property

The page size for the paging operation.
protected $pageSize

$resultNumber protected property

The result set number the paging operation is currently on.
protected $resultNumber

$sizeLimit protected property

The size limit for the paging operation.
protected $sizeLimit