Created
August 22, 2011 20:49
-
-
Save kiall/1163496 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* | |
* @package API | |
* @category Library | |
* @author Managed I.T. | |
* @copyright (c) 2011 Managed I.T. | |
* @license https://github.com/managedit/kohana-api/blob/master/LICENSE.md | |
*/ | |
class Response_API extends Kohana_Response { | |
/** | |
* @var array Response Metadata | |
*/ | |
protected $_metadata = NULL; | |
/** | |
* Gets or sets the metadata of the response | |
* | |
* @return mixed | |
*/ | |
public function metadata($metadata = NULL) | |
{ | |
if ($metadata === NULL) | |
return $this->_metadata; | |
$this->_metadata = $metadata; | |
return $this; | |
} | |
/** | |
* @var array Response Payload | |
*/ | |
protected $_payload = NULL; | |
/** | |
* Gets or sets the payload of the response | |
* | |
* @return mixed | |
*/ | |
public function payload($metadata = NULL) | |
{ | |
if ($metadata === NULL) | |
return $this->_metadata; | |
$this->_metadata = $metadata; | |
return $this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment