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. |
Résultat | Nag_Search |
public function __construct($search, $mask, array $options = array())
{
$options = array_merge(array('completed' => 0, 'due' => array(), 'tags' => array(), 'tasklists' => $GLOBALS['display_tasklists']), $options);
$this->_search = $search;
$this->_mask = $mask;
$this->_completed = $options['completed'];
$this->_due = $options['due'];
$this->_tags = $options['tags'];
$this->_tasklists = $options['tasklists'];
}