/** * Constructor * * The PhotosetList requires a User Id. If $userId is null the class will * try to use the $api->getUserId(). * * @param object Phlickr_API $api * @param string $userId User Id. If this isn't provided, the API's User * Id will be used instead. * @throws Phlickr_Exception */ function __construct(Phlickr_Api $api, $userId = null) { if (isset($userId)) { $this->_userId = $userId; } else { $this->_userId = $api->getUserId(); } if (is_null($this->_userId)) { throw new Phlickr_Exception('The photoset needs a User Id.'); } parent::__construct($api->createRequest(self::getRequestMethodName(), self::getRequestMethodParams($this->_userId)), self::XML_RESPONSE_ELEMENT, self::XML_RESPONSE_LIST_ELEMENT); }
/** * Constructor. * * Unlike most other lists the user list lets you specify the name of the * XML list and member elements. This is because Flickr uses many different * names depending on the context (users/user, online/user, * contacts/contact, etc). * * @param object Phlickr_Request $request * @param string $responseElement Name of the XML element in the response * that defines this list's members. * @param string $responseListElement Name of the XML element in the * response that defines this list. */ function __construct(Phlickr_Request $request, $responseElement = self::XML_RESPONSE_ELEMENT, $responseListElement = self::XML_RESPONSE_LIST_ELEMENT) { parent::__construct($request, $responseElement, $responseListElement); }
/** * Constructor. * * @param object Phlickr_Request $request */ function __construct(Phlickr_Request $request) { parent::__construct($request, self::XML_RESPONSE_ELEMENT, self::XML_RESPONSE_LIST_ELEMENT); }