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/file.html | 611 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 611 insertions(+) create mode 100644 docs/classes/file.html (limited to 'docs/classes/file.html') diff --git a/docs/classes/file.html b/docs/classes/file.html new file mode 100644 index 0000000..8149070 --- /dev/null +++ b/docs/classes/file.html @@ -0,0 +1,611 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ + + +

\file

+

An interface to the file table in the database

+ + + +
+

Summary

+
+
+ Methods +
+
+ Properties +
+
+ Constants +
+
+
+
+ __construct()
+ getId()
+ getFilename()
+ getFilenamePath()
+ getFilenameURI()
+ delete()
+
+
+ No public properties found +
+
+ No constants found +
+
+
+
+ No protected methods found +
+
+ $pdo
+ $id
+ $filename
+
+
+ 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
+
+ +
+ +
+
+ +
+

$filename

+
$filename : \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 file to fetch

+ +

Throws

+
+
\PDOException
+

If something went wrong with the database

+
\Exception
+

If the file could not be found

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

getId()

+ +
getId() : integer
+

Get the ID of the file

+ + + + +

Returns

+ integer + —

The ID

+ +
+
+ +
+ +
+
+ +
+

getFilename()

+ +
getFilename() : string
+

Get the relative filename of the file

+ + + + +

Returns

+ string + —

The filename

+ +
+
+ +
+ +
+
+ +
+

getFilenamePath()

+ +
getFilenamePath() : string
+

Get the full internal path to the file

+ + + + +

Returns

+ string + —

The path

+ +
+
+ +
+ +
+
+ +
+

getFilenameURI()

+ +
getFilenameURI() : string
+

Get the full external path to the file

+ + + + +

Returns

+ string + —

The URI

+ +
+
+ +
+ +
+
+ +
+

delete()

+ +
delete() : boolean
+

Move this file to the trash and delete all records for it

+

Physically, this moves the file to a trash folder +Then, the file will be removed from the file table in the database +Any appendices linking to this file with fileId will have fileId NULL +Any offers linking to this file with invoice_fileId will have invoice_fileId NULL

+ + +

Throws

+
+
\PDOException
+

If there's something wrong with the database

+
+ +

Returns

+ boolean + —

True on success, false on failure

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