PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Fetching a document

You can fetch a specific document by specifying its key. fetchDocument() returns one instance of Zend_Cloud_DocumentService_Document.

Example 81. Fetching a document

<?php
$document 
$service->fetchDocument('collectionName''DocumentID');
echo 
"Document ID: " var_export($document->getID(), 1) . "\n";
foreach (
$document->getFields() as $key => $value) {
    echo 
"Field $key is $value\n";
}

Zend Framework