Skip to content

Commit

Permalink
feat(array): add array conversion to optiosn
Browse files Browse the repository at this point in the history
  • Loading branch information
sudkumar committed Oct 21, 2019
1 parent d9f9b97 commit 940a9cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Msg91Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Msg91Message extends Options implements JsonSerializable
*/
public function jsonSerialize()
{
return $this->getPayload();
return $this->toArray();
}
}
10 changes: 10 additions & 0 deletions src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ public function getPayload()
return $this->payload;
}


/**
* Get the options's array
* @return array
*/
public function toArray()
{
return $this->payload;
}

/**
* Call the given Closure with this instance then return the instance.
*
Expand Down

0 comments on commit 940a9cc

Please sign in to comment.