示例#1
0
 public function fromArray($array)
 {
     $array = parent::fromArray($array);
     foreach ($array as $key => $value) {
         $this->setProperty($key, $value);
     }
     return $array;
 }
 /**
  *
  * {@inheritDoc}
  *
  * @see \Ajax\common\html\HtmlCollection::createItem()
  */
 protected function createItem($value)
 {
     $count = $this->count();
     $itemO = new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section");
     if (\is_array($value)) {
         $itemO->fromArray($value);
     } else {
         $itemO->setContent($value);
         $itemO->setProperty($this->attr, $this->getHref($count));
     }
     return $itemO;
 }