ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMailAutoCompleteAddressbookEmailProvider Class Reference

Class ilMailAutoCompleteAddressbookEmailProvider. More...

+ Inheritance diagram for ilMailAutoCompleteAddressbookEmailProvider:
+ Collaboration diagram for ilMailAutoCompleteAddressbookEmailProvider:

Public Member Functions

 current ()
 "Current" implementation of iterator interface
 key ()
 "Key" implementation of iterator interface
 rewind ()
 "Rewind "implementation of iterator interface
- Public Member Functions inherited from ilMailAutoCompleteRecipientProvider
 valid ()
 "Valid" implementation of iterator interface
 next ()
 "Next" implementation of iterator interface
 __destruct ()
 Destructor Free the result.

Additional Inherited Members

- Protected Attributes inherited from ilMailAutoCompleteRecipientProvider
 $db
 $res
 $data = array()
 $quoted_term = ''
 $term = ''
 $user_id = 0

Detailed Description

Member Function Documentation

ilMailAutoCompleteAddressbookEmailProvider::current ( )

"Current" implementation of iterator interface

Returns
array

Definition at line 15 of file class.ilMailAutoCompleteAddressbookEmailProvider.php.

{
return array(
'login' => $this->data['login'],
'firstname' => $this->data['firstname'],
'lastname' => $this->data['lastname']
);
}
ilMailAutoCompleteAddressbookEmailProvider::key ( )

"Key" implementation of iterator interface

Returns
boolean true/false

Definition at line 28 of file class.ilMailAutoCompleteAddressbookEmailProvider.php.

{
return $this->data['login'];
}
ilMailAutoCompleteAddressbookEmailProvider::rewind ( )

"Rewind "implementation of iterator interface

Definition at line 36 of file class.ilMailAutoCompleteAddressbookEmailProvider.php.

References $query.

{
if($this->res)
{
$this->db->free($this->res);
$this->res = null;
}
$query = "
SELECT DISTINCT
abook.email login,
abook.firstname firstname,
abook.lastname lastname
FROM addressbook abook
WHERE abook.user_id = " . $this->db->quote($this->user_id, 'integer') . "
AND abook.login IS NULL
AND (" .
$this->db->like('abook.email', 'text', $this->quoted_term) . " OR " .
$this->db->like('abook.firstname', 'text', $this->quoted_term) . " OR " .
$this->db->like('abook.lastname', 'text', $this->quoted_term) . " )";
$this->res = $this->db->query($query);
}

The documentation for this class was generated from the following file: