\Nag_Search

Nag_Search:: Interface for performing task searches.

Copyright 2001-2017 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.

Summary

Methods
Properties
Constants
__construct()
getSlice()
getVars()
serialize()
unserialize()
No public properties found
MASK_NAME
MASK_DESC
MASK_TAGS
MASK_ALL
_search()
$_search
$_mask
$_completed
$_tasklists
$_due
$_tags
N/A
No private methods found
No private properties found
N/A

Constants

MASK_NAME

MASK_NAME

Search bit masks

MASK_DESC

MASK_DESC

MASK_TAGS

MASK_TAGS

MASK_ALL

MASK_ALL

Properties

$_search

$_search : array

Search criteria

Type

array

$_mask

$_mask : integer

The search mask

Type

integer

$_completed

$_completed : integer

The completed/view value.

Type

integer

$_tasklists

$_tasklists : array

The tasks lists to search.

Type

array

$_due

$_due : array

Duedate criteria

Type

array

$_tags

$_tags : array

Tag search criteria

Type

array

Methods

__construct()

__construct(string  $search, integer  $mask, array  $options = array()) : \Nag_Search

Constructor

Parameters

string $search

The search string.

integer $mask

A bitmask to indicate the fields to search.

array $options

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.

Returns

\Nag_Search

getSlice()

getSlice(integer  $page, integer  $perpage) : \Nag_Task

Get a result slice.

Parameters

integer $page

The page number

integer $perpage

The number of results per page.

Returns

\Nag_Task

The result list.

getVars()

getVars(\Horde_Variables  $vars) 

Populate a Horde_Variables instance with the search values for this search.

Parameters

\Horde_Variables $vars

The Horde_Variables object.

serialize()

serialize() : array

Serialize method

Returns

array —

The unserialized data.

unserialize()

unserialize(string  $data) 

Unserialize method

Parameters

string $data

The serialized data.

_search()

_search(integer  $page, integer  $perpage) : \Nag_Task

Perform the search

Parameters

integer $page

The page number

integer $perpage

The number of results per page.

Returns

\Nag_Task