Public Member Functions | Data Fields

ilMailOptions Class Reference

Public Member Functions

 ilMailOptions ($a_user_id)
 Constructor setup an mail object.
 createMailOptionsEntry ()
 create entry in table_mail_options for a new user this method should only be called from createUser() public
 getOptions ()
 get options of user and set variables $signature and $linebreak this method shouldn't bew called from outside use getSignature() and getLinebreak() private
 updateOptions ($a_signature, $a_linebreak, $a_incoming_type)
 update user options
 getLinebreak ()
 get linebreak of user public
 getSignature ()
 get signature of user public
 getIncomingType ()

Data Fields

 $ilias
 $LOCAL = 0
 $EMAIL = 1
 $BOTH = 2
 $linebreak
 $signature
 $incoming_type

Detailed Description

Definition at line 35 of file class.ilMailOptions.php.


Member Function Documentation

ilMailOptions::createMailOptionsEntry (  ) 

create entry in table_mail_options for a new user this method should only be called from createUser() public

Returns:
boolean

Definition at line 84 of file class.ilMailOptions.php.

References $query, and $res.

    {
        $query = "INSERT INTO $this->table_mail_options " .
                "VALUES('" . $this->user_id . "','" . DEFAULT_LINEBREAK . "','',2)";

        $res = $this->ilias->db->query($query);
        return true;
    }

ilMailOptions::getIncomingType (  ) 

Definition at line 155 of file class.ilMailOptions.php.

        {
                return $this->incoming_type;
        }

ilMailOptions::getLinebreak (  ) 

get linebreak of user public

Returns:
array mails

Definition at line 140 of file class.ilMailOptions.php.

        {
                return $this->linebreak;
        }

ilMailOptions::getOptions (  ) 

get options of user and set variables $signature and $linebreak this method shouldn't bew called from outside use getSignature() and getLinebreak() private

Returns:
boolean

Definition at line 100 of file class.ilMailOptions.php.

References $query, and $row.

Referenced by ilMailOptions().

        {
                $query = "SELECT * FROM $this->table_mail_options ".
                        "WHERE user_id = '".$this->user_id."'";

                $row = $this->ilias->db->getRow($query,DB_FETCHMODE_OBJECT);
                
                $this->signature = stripslashes($row->signature);
                $this->linebreak = stripslashes($row->linebreak);
                $this->incoming_type = $row->incoming_type;

                return true;
        }

Here is the caller graph for this function:

ilMailOptions::getSignature (  ) 

get signature of user public

Returns:
array mails

Definition at line 150 of file class.ilMailOptions.php.

        {
                return $this->signature;
        }

ilMailOptions::ilMailOptions ( a_user_id  ) 

Constructor setup an mail object.

Parameters:
int user_id public

Definition at line 65 of file class.ilMailOptions.php.

References $ilias, and getOptions().

        {
                global $ilias;

                define("DEFAULT_LINEBREAK",60);

                $this->ilias =& $ilias;
                $this->table_mail_options = 'mail_options';

                $this->user_id = $a_user_id;
                $this->getOptions();
        }

Here is the call graph for this function:

ilMailOptions::updateOptions ( a_signature,
a_linebreak,
a_incoming_type 
)

update user options

Parameters:
string Signature
int linebreak
Returns:
boolean

Definition at line 120 of file class.ilMailOptions.php.

References $query, and $res.

        {
                $query = "UPDATE $this->table_mail_options ".
                        "SET signature = '".addslashes($a_signature)."',".
                        "linebreak = '".addslashes($a_linebreak)."', ".
                        "incoming_type = '".$a_incoming_type."' ".
                        "WHERE user_id = '".$this->user_id."'";

                $res = $this->ilias->db->query($query);

                $this->signature = $a_signature;
                $this->linebreak = $a_linebreak;

                return true;
        }


Field Documentation

ilMailOptions::$BOTH = 2

Definition at line 42 of file class.ilMailOptions.php.

ilMailOptions::$EMAIL = 1

Definition at line 41 of file class.ilMailOptions.php.

ilMailOptions::$ilias

Definition at line 37 of file class.ilMailOptions.php.

Referenced by ilMailOptions().

ilMailOptions::$incoming_type

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

ilMailOptions::$linebreak

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

ilMailOptions::$LOCAL = 0

Definition at line 40 of file class.ilMailOptions.php.

ilMailOptions::$signature

Definition at line 56 of file class.ilMailOptions.php.


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