You are here

public function Entry::getHitParade in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Slash/Entry.php \Zend\Feed\Reader\Extension\Slash\Entry::getHitParade()

Get the entry hit_parade

Return value

array

File

vendor/zendframework/zend-feed/src/Reader/Extension/Slash/Entry.php, line 43

Class

Entry

Namespace

Zend\Feed\Reader\Extension\Slash

Code

public function getHitParade() {
  $name = 'hit_parade';
  if (isset($this->data[$name])) {
    return $this->data[$name];
  }
  $stringParade = $this
    ->getData($name);
  $hitParade = [];
  if (!empty($stringParade)) {
    $stringParade = explode(',', $stringParade);
    foreach ($stringParade as $hit) {
      $hitParade[] = $hit + 0;

      //cast to integer
    }
  }
  $this->data[$name] = $hitParade;
  return $hitParade;
}