Class for uploading, loading, and deleting documents using the Vuzit Web Service API: http://vuzit.com/developer/documents_api.
| Vuzit_Document | Class for uploading, loading, and deleting documents using the Vuzit Web Service API: http://vuzit.com/developer/documents_api. |
| Functions | |
| getId | Returns the document web ID. |
| getTitle | Returns the document title. |
| setTitle | Sets the document tile. |
| getSubject | Returns the document subject. |
| getPageCount | Returns the document page count. |
| getPageWidth | Returns the document page width. |
| getPageHeight | Returns the document page height. |
| getFileSize | Returns the document file size. |
| destroy | Deletes a document by the ID. |
| findById | Finds a document by the ID. |
| upload | Uploads a file to Vuzit. |
public static function destroy( $id )
Deletes a document by the ID. Returns true if it succeeded. It throws a Vuzit_Exception on failure.
| id | Document ID of the document you would like to destroy. |
’true’ if successful
Vuzit_Service::$PublicKey = 'YOUR_PUBLIC_API_KEY';
Vuzit_Service::$PrivateKey = 'YOUR_PRIVATE_API_KEY';
$result = Vuzit_Document::destroy("DOCUMENT_ID");
public static function findById( $id )
Finds a document by the ID. It throws a Vuzit_Exception on failure.
| id | ID of the document you would like to find. |
Vuzit_Service::$PublicKey = 'YOUR_PUBLIC_API_KEY';
Vuzit_Service::$PrivateKey = 'YOUR_PRIVATE_API_KEY';
$doc = Vuzit_Document::findById("DOCUMENT_ID");
echo "Document id: " . $doc->getId();
echo "Document title: " . $doc->getTitle();
public static function upload( $file, $secure = true, $fileType = null )
Uploads a file to Vuzit. It throws a Vuzit_Exception on failure.
| file | Path to the file on the file system |
| secure | (Optional) Security type. A value of ‘true’ indicates private and a value of ‘false’ indicates public. |
| file_type | (Optional) Type of the file: ‘pdf’, ‘doc’, etc. |
Vuzit_Service::$PublicKey = 'YOUR_PUBLIC_API_KEY';
Vuzit_Service::$PrivateKey = 'YOUR_PRIVATE_API_KEY';
$doc = Vuzit_Document::upload("c:/path/to/document.pdf");
echo "Document id: " . $doc->getId();Returns the document web ID.
public function getId()
Returns the document title.
public function getTitle()
Sets the document tile.
public function setTitle( $value )
Returns the document subject.
public function getSubject()
Returns the document page count.
public function getPageCount()
Returns the document page width.
public function getPageWidth()
Returns the document page height.
public function getPageHeight()
Returns the document file size.
public function getFileSize()
Deletes a document by the ID.
public static function destroy( $id )
Finds a document by the ID.
public static function findById( $id )
Uploads a file to Vuzit.
public static function upload( $file, $secure = true, $fileType = null )