PHP Class Nag_Search, horde

Copyright 2001-2016 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (BSD). If you did not did not receive this file, see http://www.horde.org/licenses/bsdl.php.
Author: Michael J Rubinsky ([email protected])
Inheritance: implements Serializable
Mostra file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_completed integer The completed/view value.
$_due array Duedate criteria
$_mask integer The search mask
$_search array Search criteria
$_tags array Tag search criteria
$_tasklists array The tasks lists to search.

Public Methods

Method Description
__construct ( string $search, integer $mask, array $options = [] ) : Nag_Search Constructor
getSlice ( integer $page, integer $perpage ) : Nag_Task Get a result slice.
getVars ( Horde_Variables &$vars ) Populate a Horde_Variables instance with the search values for this search.
serialize ( ) : array Serialize method
unserialize ( string $data ) Unserialize method

Protected Methods

Method Description
_search ( integer $page, integer $perpage ) : Nag_Task Perform the search

Method Details

__construct() public method

Constructor
public __construct ( string $search, integer $mask, array $options = [] ) : Nag_Search
$search string The search string.
$mask integer A bitmask to indicate the fields to search.
$options array Additional options: - completed: (integer) Which tasks to include. A NAG::VIEW_* constant. DEFAULT: Nag::VIEW_INCOMPLETE - due: (array) An array describing the due date portion of the search. EXAMPLE: array('5', 'tomorrow') would be all tasks due within 5 days of tomorrow. DEFAULT: No date filters. - tags: (array) An array of tags to filter on. - tasklists: (array) An array of tasklist ids to filter on. DEFAULT: The current display_tasklists value is used.
return Nag_Search

getSlice() public method

Get a result slice.
public getSlice ( integer $page, integer $perpage ) : Nag_Task
$page integer The page number
$perpage integer The number of results per page.
return Nag_Task The result list.

getVars() public method

Populate a Horde_Variables instance with the search values for this search.
public getVars ( Horde_Variables &$vars )
$vars Horde_Variables The Horde_Variables object.

serialize() public method

Serialize method
public serialize ( ) : array
return array The unserialized data.

unserialize() public method

Unserialize method
public unserialize ( string $data )
$data string The serialized data.

Property Details

$_completed protected_oe property

The completed/view value.
protected int $_completed
return integer

$_due protected_oe property

Duedate criteria
protected array $_due
return array

$_mask protected_oe property

The search mask
protected int $_mask
return integer

$_tags protected_oe property

Tag search criteria
protected array $_tags
return array

$_tasklists protected_oe property

The tasks lists to search.
protected array $_tasklists
return array