/**
  * Returns the name
  * @param NodeElement $slide
  * @return string
  */
 public function getNameProperty(NodeElement $slide)
 {
     $selectors = Helper::getRequiredSelectors($this, ['slideImage', 'slideLink', 'slideName']);
     $nameElement = $slide->find('css', $selectors['slideName']);
     $names = ['imageAlt' => $slide->find('css', $selectors['slideImage'])->getAttribute('alt'), 'linkTitle' => $slide->find('css', $selectors['slideLink'])->getAttribute('title'), 'name' => $nameElement->getText(), 'nameTitle' => $nameElement->getAttribute('title')];
     return Helper::getUnique($names);
 }
 /**
  * Returns the link to the blog article
  * @param NodeElement $article
  * @return string
  */
 public function getLinkProperty(NodeElement $article)
 {
     $selectors = Helper::getRequiredSelectors($this, ['articleTitle', 'articleLink']);
     $links = ['titleLink' => $article->find('css', $selectors['articleTitle'])->getAttribute('href'), 'link' => $article->find('css', $selectors['articleLink'])->getAttribute('href')];
     return Helper::getUnique($links);
 }
示例#3
0
 /**
  * Returns the category name
  * @return array[]
  */
 public function getNameProperty()
 {
     $elements = Helper::findElements($this, ['name', 'link']);
     $names = [$elements['name']->getText(), $elements['link']->getAttribute('title')];
     return Helper::getUnique($names);
 }
 /**
  * Returns the order number
  * @return string
  */
 public function getNumberProperty()
 {
     $elements = Helper::findElements($this, ['number', 'footerNumber']);
     $numbers = ['orderNumber' => $elements['number']->getText(), 'footerNumber' => $elements['footerNumber']->getText()];
     return Helper::getUnique($numbers);
 }
 /**
  * Returns the link to the product
  * @return string
  */
 public function getLinkProperty()
 {
     $elements = Helper::findElements($this, ['name', 'thumbnailLink', 'detailLink']);
     $names = array('articleNameLink' => $elements['name']->getAttribute('href'), 'articleThumbnailLink' => $elements['thumbnailLink']->getAttribute('href'), 'articleDetailLink' => $elements['detailLink']->getAttribute('href'));
     return Helper::getUnique($names);
 }
示例#6
0
 /**
  * @return string
  */
 public function getLinkProperty()
 {
     $elements = Helper::findElements($this, ['name', 'link', 'more']);
     $links = [$elements['name']->getAttribute('href'), $elements['link']->getAttribute('href'), $elements['more']->getAttribute('href')];
     return Helper::getUnique($links);
 }