Public Member Functions | Data Fields

ilPaymentBillVendor Class Reference

Public Member Functions

 ilPaymentBillVendor ($a_pobject_id)
 Constructor public.
 getMessage ()
 setMessage ($a_message)
 appendMessage ($a_message)
 delete ()
 getPobjectId ()
 hasData ()
 setGender ($a_gender)
 getGender ()
 setFirstname ($a_firstname)
 getFirstname ()
 setLastname ($a_lastname)
 getLastname ()
 getTitle ()
 setTitle ($a_title)
 getInstitution ()
 setInstitution ($a_institution)
 getDepartment ()
 setDepartment ($a_department)
 getStreet ()
 setStreet ($a_street)
 getZipcode ()
 setZipcode ($a_zipcode)
 getCity ()
 setCity ($a_city)
 getCountry ()
 setCountry ($a_country)
 getPhone ()
 setPhone ($a_phone)
 getFax ()
 setFax ($a_fax)
 getEmail ()
 setEmail ($a_email)
 getAccountNumber ()
 setAccountNumber ($a_account_number)
 getBankcode ()
 setBankcode ($a_bankcode)
 getIban ()
 setIban ($a_iban)
 getBic ()
 setBic ($a_bic)
 getBankname ()
 setBankname ($a_bankname)
 validate ()
 update ()
 __read ()

Data Fields

 $db = null
 $lang = null
 $pobject_id = null
 $has_data = false

Detailed Description

Definition at line 34 of file class.ilPaymentBillVendor.php.


Member Function Documentation

ilPaymentBillVendor::__read (  ) 

Definition at line 327 of file class.ilPaymentBillVendor.php.

References $query, $res, $row, setAccountNumber(), setBankcode(), setBankname(), setBic(), setCity(), setCountry(), setDepartment(), setEmail(), setFax(), setFirstname(), setGender(), setIban(), setInstitution(), setLastname(), setPhone(), setStreet(), setTitle(), and setZipcode().

Referenced by ilPaymentBillVendor(), and update().

        {
                $query = "SELECT * FROM payment_bill_vendor ".
                        "WHERE pobject_id = '".$this->getPobjectId()."'";

                $res = $this->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $this->has_data = true;

                        $this->setGender($row->gender);
                        $this->setFirstname($row->firstname);
                        $this->setLastname($row->lastname);
                        $this->setTitle($row->title);
                        $this->setInstitution($row->institution);
                        $this->setDepartment($row->department);
                        $this->setStreet($row->street);
                        $this->setZipcode($row->zipcode);
                        $this->setCity($row->city);
                        $this->setCountry($row->country);
                        $this->setPhone($row->phone);
                        $this->setFax($row->fax);
                        $this->setEmail($row->email);
                        $this->setAccountNumber($row->account_number);
                        $this->setBankcode($row->bankcode);
                        $this->setIban($row->iban);
                        $this->setBic($row->bic);
                        $this->setBankname($row->bankname);
                }
                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPaymentBillVendor::appendMessage ( a_message  ) 

Definition at line 67 of file class.ilPaymentBillVendor.php.

Referenced by validate().

        {
                $this->message .= "<br />".$a_message;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::delete (  ) 

Definition at line 72 of file class.ilPaymentBillVendor.php.

References $query.

        {
                $query = "DELETE FROM payment_bill_vendor ".
                        "WHERE pobject_id = '".$this->pobject_id."'";

                $this->db->query($query);

                return true;
        }

ilPaymentBillVendor::getAccountNumber (  ) 

Definition at line 198 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->account_number;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getBankcode (  ) 

Definition at line 206 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->bankcode;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getBankname (  ) 

Definition at line 230 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->bankname;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getBic (  ) 

Definition at line 222 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return $this->bic;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getCity (  ) 

Definition at line 158 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->city;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getCountry (  ) 

Definition at line 166 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->country;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getDepartment (  ) 

Definition at line 134 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return $this->department;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getEmail (  ) 

Definition at line 190 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->email;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getFax (  ) 

Definition at line 182 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return $this->fax;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getFirstname (  ) 

Definition at line 106 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->firstname;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getGender (  ) 

Definition at line 98 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->gender;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getIban (  ) 

Definition at line 214 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return $this->iban;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getInstitution (  ) 

Definition at line 126 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return $this->institution;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getLastname (  ) 

Definition at line 114 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->lastname;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getMessage (  ) 

Definition at line 59 of file class.ilPaymentBillVendor.php.

Referenced by validate().

        {
                return $this->message;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getPhone (  ) 

Definition at line 174 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return $this->phone;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getPobjectId (  ) 

Definition at line 86 of file class.ilPaymentBillVendor.php.

        {
                return $this->pobject_id;
        }

ilPaymentBillVendor::getStreet (  ) 

Definition at line 142 of file class.ilPaymentBillVendor.php.

Referenced by update(), and validate().

        {
                return $this->street;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getTitle (  ) 

Definition at line 118 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return $this->title;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::getZipcode (  ) 

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

Referenced by update(), and validate().

        {
                return $this->zipcode;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::hasData (  ) 

Definition at line 90 of file class.ilPaymentBillVendor.php.

Referenced by update().

        {
                return (bool) $this->has_data;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::ilPaymentBillVendor ( a_pobject_id  ) 

Constructor public.

Definition at line 47 of file class.ilPaymentBillVendor.php.

References $lng, and __read().

        {
                global $ilDB,$lng;

                $this->db =& $ilDB;
                $this->lng =& $lng;
                $this->pobject_id = $a_pobject_id;

                $this->__read();
        }

Here is the call graph for this function:

ilPaymentBillVendor::setAccountNumber ( a_account_number  ) 

Definition at line 202 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->account_number = $a_account_number;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setBankcode ( a_bankcode  ) 

Definition at line 210 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->bankcode = $a_bankcode;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setBankname ( a_bankname  ) 

Definition at line 234 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->bankname = $a_bankname;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setBic ( a_bic  ) 

Definition at line 226 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->bic = $a_bic;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setCity ( a_city  ) 

Definition at line 162 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->city = $a_city;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setCountry ( a_country  ) 

Definition at line 170 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->country = $a_country;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setDepartment ( a_department  ) 

Definition at line 138 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->department = $a_department;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setEmail ( a_email  ) 

Definition at line 194 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->email = $a_email;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setFax ( a_fax  ) 

Definition at line 186 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->fax = $a_fax;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setFirstname ( a_firstname  ) 

Definition at line 102 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->firstname = $a_firstname;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setGender ( a_gender  ) 

Definition at line 94 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->gender = $a_gender;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setIban ( a_iban  ) 

Definition at line 218 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->iban = $a_iban;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setInstitution ( a_institution  ) 

Definition at line 130 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->institution = $a_institution;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setLastname ( a_lastname  ) 

Definition at line 110 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->lastname = $a_lastname;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setMessage ( a_message  ) 

Definition at line 63 of file class.ilPaymentBillVendor.php.

Referenced by validate().

        {
                $this->message = $a_message;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setPhone ( a_phone  ) 

Definition at line 178 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->phone = $a_phone;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setStreet ( a_street  ) 

Definition at line 146 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->street = $a_street;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setTitle ( a_title  ) 

Definition at line 122 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->title = $a_title;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::setZipcode ( a_zipcode  ) 

Definition at line 154 of file class.ilPaymentBillVendor.php.

Referenced by __read().

        {
                $this->zipcode = $a_zipcode;
        }

Here is the caller graph for this function:

ilPaymentBillVendor::update (  ) 

Definition at line 290 of file class.ilPaymentBillVendor.php.

References $query, __read(), getAccountNumber(), getBankcode(), getBankname(), getBic(), getCity(), getCountry(), getDepartment(), getEmail(), getFax(), getFirstname(), getGender(), getIban(), getInstitution(), getLastname(), getPhone(), getStreet(), getTitle(), getZipcode(), and hasData().

        {
                if(!$this->hasData())
                {
                        $query = "INSERT INTO payment_bill_vendor ".
                                "SET pobject_id = '".$this->getPobjectId()."'";

                        $this->db->query($query);
                }
                $query = "UPDATE payment_bill_vendor ".
                        "SET ".
                        "gender = '".ilUtil::prepareDBString($this->getGender())."',".
                        "firstname = '".ilUtil::prepareDBString($this->getFirstname())."',".
                        "lastname = '".ilUtil::prepareDBString($this->getLastname())."',".
                        "title = '".ilUtil::prepareDBString($this->getTitle())."',".
                        "institution = '".ilUtil::prepareDBString($this->getInstitution())."',".
                        "department = '".ilUtil::prepareDBString($this->getDepartment())."',".
                        "street = '".ilUtil::prepareDBString($this->getStreet())."',".
                        "zipcode = '".ilUtil::prepareDBString($this->getZipcode())."',".
                        "city = '".ilUtil::prepareDBString($this->getCity())."',".
                        "country = '".ilUtil::prepareDBString($this->getCountry())."',".
                        "phone = '".ilUtil::prepareDBString($this->getPhone())."',".
                        "fax = '".ilUtil::prepareDBString($this->getFax())."',".
                        "email = '".ilUtil::prepareDBString($this->getEmail())."', ".
                        "account_number = '".ilUtil::prepareDBString($this->getAccountNumber())."',".
                        "bankcode = '".ilUtil::prepareDBString($this->getBankcode())."',".
                        "iban = '".ilUtil::prepareDBString($this->getIban())."',".
                        "bic = '".ilUtil::prepareDBString($this->getBic())."',".
                        "bankname = '".ilUtil::prepareDBString($this->getBankname())."'".
                        "WHERE pobject_id = '".$this->getPobjectId()."'";

                $this->db->query($query);
                $this->__read();
        }

Here is the call graph for this function:

ilPaymentBillVendor::validate (  ) 

Definition at line 239 of file class.ilPaymentBillVendor.php.

References appendMessage(), getAccountNumber(), getBankcode(), getBankname(), getCity(), getCountry(), getEmail(), getFirstname(), getGender(), getLastname(), getMessage(), getStreet(), getZipcode(), and setMessage().

        {
                $this->setMessage('');

                if(!$this->getGender())
                {
                        $this->appendMessage($this->lng->txt('gender'));
                }
                if(!$this->getFirstname())
                {
                        $this->appendMessage($this->lng->txt('firstname'));
                }
                if(!$this->getLastname())
                {
                        $this->appendMessage($this->lng->txt('lastname'));
                }
                if(!$this->getStreet())
                {
                        $this->appendMessage($this->lng->txt('street'));
                }
                if(!$this->getZipcode())
                {
                        $this->appendMessage($this->lng->txt('zipcode'));
                }
                if(!$this->getCity())
                {
                        $this->appendMessage($this->lng->txt('city'));
                }
                if(!$this->getCountry())
                {
                        $this->appendMessage($this->lng->txt('country'));
                }
                if(!$this->getEmail())
                {
                        $this->appendMessage($this->lng->txt('email'));
                }
                if(!$this->getAccountNumber())
                {
                        $this->appendMessage($this->lng->txt('account_number'));
                }
                if(!$this->getBankcode())
                {
                        $this->appendMessage($this->lng->txt('bankcode'));
                }
                if(!$this->getBankname())
                {
                        $this->appendMessage($this->lng->txt('bankname'));
                }

                return $this->getMessage() ? false : true;
        }

Here is the call graph for this function:


Field Documentation

ilPaymentBillVendor::$db = null

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

ilPaymentBillVendor::$has_data = false

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

ilPaymentBillVendor::$lang = null

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

ilPaymentBillVendor::$pobject_id = null

Definition at line 38 of file class.ilPaymentBillVendor.php.


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