Source for file Response.php
Documentation is available at Response.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* Response framework for Digg API
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
* @author Joe Stump <joe@joestump.net>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Services_Digg
require_once 'Services/Digg/Response/Exception.php';
* @author Joe Stump <joe@joestump.net>
* Create a response instance
* @param string $type Type of response to create
* @param string $response Raw response from API
* @throws Services_Digg_Exception
static public function factory($type, $response) {
$file = 'Services/Digg/Response/' . $type . '.php';
if (!include_once($file)) {
throw new Services_Digg_Response_Exception ('Unable to load response file: ' . $type);
$class = 'Services_Digg_Response_' . $type;
throw new Services_Digg_Response_Exception ('Unable to find response class: ' . $class);
$instance = new $class($response);
Documentation generated on Fri, 10 Jul 2009 01:30:06 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.
|