コード例 #1
0
 /**
  * Check if given yearwheel exists in repository
  *
  * @param \Bpi\ApiBundle\Domain\ValueObject\Yearwheel $yearwheel
  * @return boolean
  */
 public function contains(Yearwheel $yearwheel)
 {
     return (bool) $this->list->filter(function ($e) use($yearwheel) {
         if ($e instanceof Yearwheel && $e->equals($yearwheel)) {
             return true;
         }
     })->count();
 }