Skip to content

Commit

Permalink
Add raw data methods for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccue committed Jul 24, 2013
1 parent 72470d3 commit 651668b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions library/WPAPI/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ public function __get($key) {
return $this->data[$key];
}

/**
* Get the raw internal post data
*
* Avoid use in favour of accessing via the properties instead.
*
* @return array Raw data from the API
*/
public function getRawData() {
return $this->data;
}

/**
* Fetch the index data
*
Expand Down
11 changes: 11 additions & 0 deletions library/WPAPI/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ public function __set($key, $value) {
$this->changed[$key] = true;
}

/**
* Get the raw internal post data
*
* Avoid use in favour of accessing via the properties instead.
*
* @return array Raw data from the API
*/
public function getRawData() {
return $this->data;
}

/**
* Update the post
*
Expand Down

0 comments on commit 651668b

Please sign in to comment.