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

Class ilMailAutoCompleteUserProvider. More...

+ Inheritance diagram for ilMailAutoCompleteUserProvider:
+ Collaboration diagram for ilMailAutoCompleteUserProvider:

Public Member Functions

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

Protected Member Functions

 getSelectPart ()
 getOrderByPart ()
 getFields ()
 Get searchable fields.

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

ilMailAutoCompleteUserProvider::__construct (   $quoted_term,
  $term 
)

Member Function Documentation

ilMailAutoCompleteUserProvider::current ( )

"Current" implementation of iterator interface

Returns
array

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

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

Get searchable fields.

Returns
array

Definition at line 221 of file class.ilMailAutoCompleteUserProvider.php.

References ilUserSearchOptions\_isEnabled().

{
$available_fields = array();
foreach(array('login', 'firstname', 'lastname') as $field)
{
include_once 'Services/Search/classes/class.ilUserSearchOptions.php';
{
$available_fields[] = $field;
}
}
return $available_fields;
}

+ Here is the call graph for this function:

ilMailAutoCompleteUserProvider::getOrderByPart ( )
protected
Returns
string

Definition at line 197 of file class.ilMailAutoCompleteUserProvider.php.

Referenced by rewind().

{
return 'login ASC';
}

+ Here is the caller graph for this function:

ilMailAutoCompleteUserProvider::getSelectPart ( )
protected
Returns
string

Definition at line 80 of file class.ilMailAutoCompleteUserProvider.php.

Referenced by rewind().

{
$fields = array(
'login',
'firstname',
'lastname',
'email'
);
$fields[] = 'profpref.value profile_value';
$fields[] = 'pubemail.value email_value';
return implode(', ', $fields);
}

+ Here is the caller graph for this function:

ilMailAutoCompleteUserProvider::key ( )

"Key" implementation of iterator interface

Returns
boolean true/false

Definition at line 49 of file class.ilMailAutoCompleteUserProvider.php.

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

"Rewind "implementation of iterator interface

Definition at line 57 of file class.ilMailAutoCompleteUserProvider.php.

References $query, getOrderByPart(), and getSelectPart().

{
if($this->res)
{
$this->db->free($this->res);
$this->res = null;
}
$select_part = $this->getSelectPart();
$where_part = $this->getWherePart($this->quoted_term);
$order_by_part = $this->getOrderByPart();
$query = implode(" ", array(
'SELECT ' . $select_part,
'FROM ' . $this->getFromPart(),
$where_part ? 'WHERE ' . $where_part : '',
$order_by_part ? 'ORDER BY ' . $order_by_part : ''
));
$this->res = $this->db->query($query);
}

+ Here is the call graph for this function:

ilMailAutoCompleteUserProvider::valid ( )

"Valid" implementation of iterator interface

Returns
boolean true/false

Reimplemented from ilMailAutoCompleteRecipientProvider.

Definition at line 25 of file class.ilMailAutoCompleteUserProvider.php.

{
$this->data = $this->db->fetchAssoc($this->res);
return is_array($this->data);
}

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