Exemplo n.º 1
0
 /**
  * @param $tracksData
  *
  * @return array
  */
 protected function _parseTracksData($tracksData)
 {
     // vo collection
     $tracksVoMany = array();
     foreach ($tracksData as $data) {
         // remove dublicate content
         if (isset($data['user'])) {
             unset($data['user']);
         }
         // for playable track stream url
         $data['_client_id'] = $this->_getClientId();
         $vo = new TrackVo();
         $vo->setData($data);
         $tracksVoMany[] = $vo;
     }
     return $tracksVoMany;
 }
Exemplo n.º 2
0
 /**
  * @return array|bool
  */
 public function getTracksVo()
 {
     $tracks = $this->getTracks();
     if (!empty($tracks)) {
         $tracksVo = array();
         foreach ($tracks as $track) {
             // remove dublicate content
             if (isset($track['user'])) {
                 unset($track['user']);
             }
             // for playable stream url
             $track['_client_id'] = $this->_getClientId();
             $vo = new TrackVo();
             $vo->setData($track);
             $tracksVo[] = $vo;
         }
         return $tracksVo;
     }
     return FALSE;
 }