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

Setting the current domain

In order to use the Provisioning API, the domain being administered needs to be specified in all request URIs. In order to ease development, this information is stored within both the Gapps service and query classes to use when constructing requests.

Setting the domain for the service class

To set the domain for requests made by the service class, either call setDomain() or specify the domain when instantiating the service class. For example:

<?php
$domain 
"example.com";
$gdata = new Zend_Gdata_Gapps($client$domain);

Setting the domain for query classes

Setting the domain for requests made by query classes is similar to setting it for the service class-either call setDomain() or specify the domain when creating the query. For example:

<?php
$domain 
"example.com";
$query = new Zend_Gdata_Gapps_UserQuery($domain$arg);

When using a service class factory method to create a query, the service class will automatically set the query's domain to match its own domain. As a result, it is not necessary to specify the domain as part of the constructor arguments.

<?php
$domain 
"example.com";
$gdata = new Zend_Gdata_Gapps($client$domain);
$query $gdata->newUserQuery($arg);

Zend Framework