Skip to content

Commit

Permalink
[8-10] MemberCollectionクラス
Browse files Browse the repository at this point in the history
  • Loading branch information
hidenorigoto committed Dec 28, 2015
1 parent 41f9f7d commit 291b615
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/lists/ch08/08-10.txt
@@ -0,0 +1,13 @@
<?php
namespace AppBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;

class MemberCollection extends ArrayCollection
{
public function addMember($name, $part, $joinedDate)
{
$member = new Member($name, $part, $joinedDate);
$this->add($member);
}
}
13 changes: 13 additions & 0 deletions src/AppBundle/Entity/MemberCollection.php
@@ -0,0 +1,13 @@
<?php
namespace AppBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;

class MemberCollection extends ArrayCollection
{
public function addMember($name, $part, $joinedDate)
{
$member = new Member($name, $part, $joinedDate);
$this->add($member);
}
}

0 comments on commit 291b615

Please sign in to comment.