Skip to content

Commit

Permalink
Added toArray() method
Browse files Browse the repository at this point in the history
  • Loading branch information
freearhey committed Dec 20, 2020
1 parent 6842f3c commit d60cb2a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,17 @@ public function parseProperties($data)
return [$property->id => $property];
});
}

public function toArray()
{
return [
'id' => $this->id,
'lang' => $this->lang,
'label' => $this->label,
'description' => $this->description,
'wiki_url' => $this->wiki_url,
'aliases' => $this->aliases,
'properties' => $this->properties,
];
}
}

0 comments on commit d60cb2a

Please sign in to comment.