From 29955216d69ca08b69afe1ace71151839049c045 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 7 Feb 2015 21:06:17 +0100 Subject: Added documentation --- docs/classes/contact.html | 1365 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1365 insertions(+) create mode 100644 docs/classes/contact.html (limited to 'docs/classes/contact.html') diff --git a/docs/classes/contact.html b/docs/classes/contact.html new file mode 100644 index 0000000..09ba426 --- /dev/null +++ b/docs/classes/contact.html @@ -0,0 +1,1365 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ + + +

\contact

+

An interface to the contact table in the database

+ + + +
+

Summary

+
+
+ Methods +
+
+ Properties +
+
+ Constants +
+
+
+
+ __construct()
+ getId()
+ getClientId()
+ getClient()
+ getName()
+ setName()
+ getEmail()
+ setEmail()
+ getAddress()
+ setAddress()
+ getAddress_2()
+ setAddress_2()
+ getPostalCode()
+ setPostalCode()
+ getCity()
+ setCity()
+ getCountry()
+ setCountry()
+ getLanguage()
+ setLanguage()
+ delete()
+ createOffer()
+
+
+ No public properties found +
+
+ No constants found +
+
+
+
+ No protected methods found +
+
+ $pdo
+ $id
+ $clientId
+ $name
+ $email
+ $address
+ $postal_code
+ $city
+ $country
+ $language
+
+
+ N/A +
+
+
+
+ No private methods found +
+
+ No private properties found +
+
+ N/A +
+
+
+
+ +
+ + + +
+
+

Properties

+
+ +
+ +
+
+ +
+

$pdo

+
$pdo : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$id

+
$id : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$clientId

+
$clientId : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$name

+
$name : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$email

+
$email : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$address

+
$address : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$postal_code

+
$postal_code : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$city

+
$city : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$country

+
$country : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ +
+
+ +
+

$language

+
$language : \PDO
+

+ + +

Type

+ \PDO + — The PDO class for database communication
+
+ +
+ + + +
+

Methods

+ +
+ +
+
+ +
+

__construct()

+ +
__construct(\PDO  $pdo, integer  $id) 
+

Create a new instance

+ + +

Parameters

+ + + + + + + + + + + +
\PDO$pdo

The PDO class, to access the database

integer$id

The id of the contact to fetch

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
\Exception
+

If the contact could not be found

+
+ + +
+
+ +
+ +
+
+ +
+

getId()

+ +
getId() : integer
+

Get the ID of the contact

+ + + + +

Returns

+ integer + —

The ID

+ +
+
+ +
+ +
+
+ +
+

getClientId()

+ +
getClientId() : integer
+

Get the ID of the client that this contact is linked to

+ + + + +

Returns

+ integer + —

The ID

+ +
+
+ +
+ +
+
+ +
+

getClient()

+ +
getClient() : \client
+

Get the client that this contact is linked to

+ + + + +

Returns

+ \client + —

The client

+ +
+
+ +
+ +
+
+ +
+

getName()

+ +
getName() : string
+

Get the name of the contact

+ + + + +

Returns

+ string + —

The name

+ +
+
+ +
+ +
+
+ +
+

setName()

+ +
setName(string  $name) : boolean
+

Set the name of the contact

+ + +

Parameters

+ + + + + + +
string$name

The new name for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

getEmail()

+ +
getEmail() : string
+

Get the email of the contact

+ + + + +

Returns

+ string + —

The email

+ +
+
+ +
+ +
+
+ +
+

setEmail()

+ +
setEmail(string  $email) : boolean
+

Set the email of the contact

+ + +

Parameters

+ + + + + + +
string$email

The new email for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

getAddress()

+ +
getAddress() : string
+

Get the first address line of the contact

+ + + + +

Returns

+ string + —

The address

+ +
+
+ +
+ +
+
+ +
+

setAddress()

+ +
setAddress(string  $address) : boolean
+

Set the first address line of the contact

+ + +

Parameters

+ + + + + + +
string$address

The new address for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

getAddress_2()

+ +
getAddress_2() : string
+

Get the second address line of the contact

+ + + + +

Returns

+ string + —

The address

+ +
+
+ +
+ +
+
+ +
+

setAddress_2()

+ +
setAddress_2(string  $address_2) : boolean
+

Set the second address line of the contact

+ + +

Parameters

+ + + + + + +
string$address_2

The new address for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

getPostalCode()

+ +
getPostalCode() : string
+

Get the postal_code of the contact

+ + + + +

Returns

+ string + —

The postal_code

+ +
+
+ +
+ +
+
+ +
+

setPostalCode()

+ +
setPostalCode(  $postal_code) : boolean
+

Set the postal code of the contact

+ + +

Parameters

+ + + + + + +
$postal_code

string The new postal code for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

getCity()

+ +
getCity() : string
+

Get the city of the contact

+ + + + +

Returns

+ string + —

The city

+ +
+
+ +
+ +
+
+ +
+

setCity()

+ +
setCity(string  $city) : boolean
+

Set the city of the contact

+ + +

Parameters

+ + + + + + +
string$city

The new city for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

getCountry()

+ +
getCountry() : string
+

Get the country of the contact

+ + + + +

Returns

+ string + —

The country

+ +
+
+ +
+ +
+
+ +
+

setCountry()

+ +
setCountry(string  $country) : boolean
+

Set the country of the contact

+ + +

Parameters

+ + + + + + +
string$country

The new country for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

getLanguage()

+ +
getLanguage() : string
+

Get the language of the contact

+ + + + +

Returns

+ string + —

The language

+ +
+
+ +
+ +
+
+ +
+

setLanguage()

+ +
setLanguage(string  $language) : boolean
+

Set the language of the contact

+ + +

Parameters

+ + + + + + +
string$language

The new language for the contact

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on succes, false on failure

+ +
+
+ +
+ +
+
+ +
+

delete()

+ +
delete() : boolean
+

Remove this contact from the database

+

If this doesn't succeed (i.e. false is returned), that means the contact was removed manually or by another instance of this class

+ + +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
+ +

Returns

+ boolean + —

True on success, false on failure

+ +
+
+ +
+ +
+
+ +
+

createOffer()

+ +
createOffer() : \offer
+

Make a new offer for this contact

+ + + +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
\Exception
+

If there was a problem with the input

+
+ +

Returns

+ \offer + —

A new instance of the offer class containing the new offer

+ +
+
+ +
+ +
+
+ + + + +
+ + + -- cgit v1.2.3