Skip to content

Commit

Permalink
Merge 3193063 into deecbd6
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitridisko committed Apr 7, 2015
2 parents deecbd6 + 3193063 commit 34f60ec
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 14 deletions.
15 changes: 13 additions & 2 deletions Model/Entities/Character.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Octante\MarvelAPIBundle\Model\ValueObjects\CharacterId;
use Octante\MarvelAPIBundle\Model\ValueObjects\Image;

class Character
class Character implements \JsonSerializable
{
/**
* The unique ID of the comic resource.,
Expand Down Expand Up @@ -290,4 +290,15 @@ public function setUrls($urls)
{
$this->urls = $urls;
}
}

/**
* Allow to be serialized by json_encode
* http://stackoverflow.com/questions/7005860/php-json-encode-class-private-members
*/
public function JsonSerialize()
{
$vars = get_object_vars($this);

return $vars;
}
}
15 changes: 13 additions & 2 deletions Model/Entities/Comic.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Octante\MarvelAPIBundle\Model\ValueObjects\ComicId;
use Octante\MarvelAPIBundle\Model\ValueObjects\Image;

class Comic
class Comic implements \JsonSerializable
{
/**
* The unique ID of the comic resource.,
Expand Down Expand Up @@ -705,4 +705,15 @@ public function getVariants()
{
return $this->variants;
}
}

/**
* Allow to be serialized by json_encode
* http://stackoverflow.com/questions/7005860/php-json-encode-class-private-members
*/
public function JsonSerialize()
{
$vars = get_object_vars($this);

return $vars;
}
}
15 changes: 13 additions & 2 deletions Model/Entities/Creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Octante\MarvelAPIBundle\Model\ValueObjects\CreatorId;
use Octante\MarvelAPIBundle\Model\ValueObjects\Image;

class Creator
class Creator implements \JsonSerializable
{
/**
* The unique ID of the comic resource.,
Expand Down Expand Up @@ -361,4 +361,15 @@ public function getUrls()
{
return $this->urls;
}
}

/**
* Allow to be serialized by json_encode
* http://stackoverflow.com/questions/7005860/php-json-encode-class-private-members
*/
public function JsonSerialize()
{
$vars = get_object_vars($this);

return $vars;
}
}
17 changes: 14 additions & 3 deletions Model/Entities/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Octante\MarvelAPIBundle\Model\ValueObjects\Image;
use Octante\MarvelAPIBundle\Model\ValueObjects\Thumbnail;

class Event
class Event implements \JsonSerializable
{
/**
* The unique ID of the comic resource.,
Expand Down Expand Up @@ -138,7 +138,7 @@ class Event

/**
* A summary representation of the event which preceded this event
*
*
* @var EventSummary
*/
private $previous;
Expand Down Expand Up @@ -432,4 +432,15 @@ public function getUrls()
{
return $this->urls;
}
}

/**
* Allow to be serialized by json_encode
* http://stackoverflow.com/questions/7005860/php-json-encode-class-private-members
*/
public function JsonSerialize()
{
$vars = get_object_vars($this);

return $vars;
}
}
17 changes: 14 additions & 3 deletions Model/Entities/Serie.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Octante\MarvelAPIBundle\Model\ValueObjects\SerieId;
use Octante\MarvelAPIBundle\Model\ValueObjects\Thumbnail;

class Serie
class Serie implements \JsonSerializable
{
/**
* The unique ID of the comic resource.,
Expand Down Expand Up @@ -136,7 +136,7 @@ class Serie

/**
* A summary representation of the series which preceded this series.
*
*
* @var SerieSummary
*/
private $previous;
Expand Down Expand Up @@ -430,4 +430,15 @@ public function getUrls()
{
return $this->urls;
}
}

/**
* Allow to be serialized by json_encode
* http://stackoverflow.com/questions/7005860/php-json-encode-class-private-members
*/
public function JsonSerialize()
{
$vars = get_object_vars($this);

return $vars;
}
}
15 changes: 13 additions & 2 deletions Model/Entities/Story.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Octante\MarvelAPIBundle\Model\ValueObjects\Image;
use Octante\MarvelAPIBundle\Model\ValueObjects\StoryId;

class Story
class Story implements \JsonSerializable
{
/**
* The unique ID of the comic resource.,
Expand Down Expand Up @@ -336,4 +336,15 @@ public function getOriginalIssue()
{
return $this->originalIssue;
}
}

/**
* Allow to be serialized by json_encode
* http://stackoverflow.com/questions/7005860/php-json-encode-class-private-members
*/
public function JsonSerialize()
{
$vars = get_object_vars($this);

return $vars;
}
}

0 comments on commit 34f60ec

Please sign in to comment.