PHP Class IMP_Search_Query, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements Serializable
Show file Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$enabled boolean Is this query enabled?

Protected Properties

Property Type Description
$_cache array Cache results.
$_canEdit boolean Can this query be edited?
$_criteria array The search criteria (IMP_Search_Element objects).
$_id string The search ID.
$_label string The virtual folder label.
$_mboxes array The mailbox list.
$_nosave array List of serialize entries not to save.

Public Methods

Method Description
__construct ( array $opts = [] ) Constructor.
__get ( $name )
__toString ( ) : string String representation of this object: the mailbox ID.
add ( IMP_Search_Element $elt ) Add a search query element.
replace ( array $criteria = [] ) Replace the search query with the given query.
runElementCallbacks ( IMP_Mailbox $mbox, array $ids ) : array Reduce the sorted return ID list by running search element callbacks.
serialize ( ) : string Serialization.
unserialize ( string $data ) Unserialization.

Method Details

__construct() public method

Constructor.
public __construct ( array $opts = [] )
$opts array

__get() public method

public __get ( $name )

__toString() public method

String representation of this object: the mailbox ID.
public __toString ( ) : string
return string Mailbox ID.

add() public method

Add a search query element.
public add ( IMP_Search_Element $elt )
$elt IMP_Search_Element The search element to add.

replace() public method

Replace the search query with the given query.
public replace ( array $criteria = [] )
$criteria array A list of criteria to add (Horde_Search_Element objects).

runElementCallbacks() public method

.
public runElementCallbacks ( IMP_Mailbox $mbox, array $ids ) : array
$mbox IMP_Mailbox Mailbox.
$ids array Sorted ID list.
return array Sorted ID list.

serialize() public method

Serialization.
public serialize ( ) : string
return string Serialized data.

unserialize() public method

Unserialization.
public unserialize ( string $data )
$data string Serialized data.

Property Details

$_cache protected property

Cache results.
protected array $_cache
return array

$_canEdit protected property

Can this query be edited?
protected bool $_canEdit
return boolean

$_criteria protected property

The search criteria (IMP_Search_Element objects).
protected array $_criteria
return array

$_id protected property

The search ID.
protected string $_id
return string

$_label protected property

The virtual folder label.
protected string $_label
return string

$_mboxes protected property

The mailbox list.
protected array $_mboxes
return array

$_nosave protected property

List of serialize entries not to save.
protected array $_nosave
return array

$enabled public property

Is this query enabled?
public bool $enabled
return boolean