Skip to content

Commit

Permalink
Support hydrate
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jan 12, 2016
1 parent 8af2195 commit 120369d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ApiRequest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace Fortifi\Api\Core;

use Packaged\Helpers\ValueAs;

class ApiRequest implements IApiRequest
{
/**
Expand Down Expand Up @@ -173,4 +175,11 @@ public function shouldThrowExceptions()
return $this->_throw;
}

public function hydrate($data)
{
$this->_decoded = ValueAs::obj($data);
$this->_result = json_encode($this->_decoded);
return $this;
}

}

0 comments on commit 120369d

Please sign in to comment.