Пример #1
0
 public function addItem(Title $title, Label $label, $description)
 {
     $count = count($this->items);
     $this->items[$count]['title'] = $title->toArray();
     $this->items[$count]['label'] = $label->toArray();
     $this->items[$count]['description'] = $description;
 }
Пример #2
0
 public function addItem(Title $title, $label, $description)
 {
     $count = count($this->items);
     $this->items[$count]['title'] = $title->toArray();
     if ($label instanceof Label) {
         $this->items[$count]['label'] = $label->toArray();
     }
     $this->items[$count]['description'] = $description;
 }