This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Vuzit_Event_findAll
Vuzit_Event findAll function
Retrieves a set of Vuzit document events.
Signatures
- public static findAll(array $options)
Parameters
- array $options : An array of options. See “Options” section.
Options
Below are the options that can be passed into the $options array.
- event : The event type to retrieve. There are several:
- page_view : Represents a page that has been viewed.
- document_loaded : Represents that the document was loaded for the first time.
- document_unloaded : Represents that the document was unloaded.
- download_original_click : Represents that a user clicked on the “Download” link.
- download_pdf_click: Represents that a user clicked on the “Download PDF” link.
- zoom_in: Represents that a user zoomed in on a document.
- zoom_out: Represents that a user zoomed out on a document.
- value : The value type to retrieve. As a developer you can add this value as anything you like. A common use is to store information about the individual user such as their user ID.
- id : The document web ID.
- limit : Limits the number of results that are returned.
- offset : The event to start retrieving events. Useful if you are paging through results. Most commonly used with the “limit” option.
Return type
- Event : The event instance.
Usage Example
Below is a full usage example that loads up all of the pages that were viewed ("page_view) for a document of “abc123”.
Vuzit_Service::setPublicKey("YOUR_PUBLIC_API_KEY");
Vuzit_Service::setPrivateKey("YOUR_PRIVATE_API_KEY");
$events = Vuzit_Event::findAll("abc123", array("event" => "page_view");
foreach($events as $event)
{
echo "Document id: " . $event->getId();
echo " Referer: " . $event->getReferer();
echo " Requested at: " . date("Y-d-m H:i:s", $event->getRequestedAt());
}
This example returns all of the events for a particular user of “jsmith” starting at the 10th event and limiting the results to 20.
$events = Vuzit_Event::findAll("abc123", array("value" => "jsmith",
"offest" => "10",
"limit" => "20"));
foreach($events as $event)
{
echo "Document id: " . $event->getId();
echo " Referer: " . $event->getReferer();
echo " Requested at: " . date("Y-d-m H:i:s", $event->getRequestedAt());
}






