$pdo
+$pdo : \pdo+
+ + +
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/client.html | 731 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 731 insertions(+) create mode 100644 docs/classes/client.html (limited to 'docs/classes/client.html') diff --git a/docs/classes/client.html b/docs/classes/client.html new file mode 100644 index 0000000..4a3b2db --- /dev/null +++ b/docs/classes/client.html @@ -0,0 +1,731 @@ + + +
+ + +An interface to the client table in the database
+ + + +__construct(\PDO $pdo, integer $id)+
Create a new instance
+ + +\PDO | +$pdo | +The PDO class, to access the database |
+
integer | +$id | +The id of the client to fetch |
+
If something went wrong with the database
If the client could not be found
getContacts() : array<mixed,\contact>+
Get all contacts for this client
+ + + +If something went wrong with the database
An array indexed by id of instances of the contact class
+ +delete() : boolean+
Remove this client from the database
+If this doesn't succeed (i.e. false is returned), that means the client was removed manually or by another instance of this class
+ + +If something went wrong with the database
True on success, false on failure
+ +createContact(string $name, string $email, string $address, string $address_2, string $postal_code, string $city, string $country) : \contact+
Make a new contact for this client
+ + +string | +$name | +The name for this contact |
+
string | +The email for this contact |
+ |
string | +$address | +The first address line of this contact (normally street and house number) |
+
string | +$address_2 | +The second address line of this contact |
+
string | +$postal_code | +The postal code for this contact |
+
string | +$city | +The city for this contact |
+
string | +$country | +The country for this contact |
+
If something went wrong with the database
If there was a problem with the input
A new instance of the contact class containing the new contact
+ +