Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Commit

Permalink
:octocat:
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Jan 21, 2018
1 parent 011d2b0 commit b859153
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function __toArray():array{
*
* @return $this
*/
public function __fromIterable(iterable $properties){
public function __fromIterable(array $properties){

foreach($properties as $key => $value){
$this->__set($key, $value);
Expand Down
15 changes: 15 additions & 0 deletions src/ContainerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,23 @@ public function __toString():string;
*/
public function __toArray():array;

/**
* @param iterable $properties
*
* @return \chillerlan\Traits\ContainerInterface
*/
public function __fromIterable(array $properties);

/**
* @return string
*/
public function __toJSON():string;

/**
* @param string $json
*
* @return \chillerlan\Traits\ContainerInterface
*/
public function __fromJSON(string $json);

}

0 comments on commit b859153

Please sign in to comment.