/** * * @param int $stop * @return array */ public function getItens($stop = 10, $function = null) { $function = function (&$item) { $item['subtitulo'] = html_entity_decode(strip_tags($item['subtitulo'])); }; return parent::getItens($stop, $function); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10, $function = null) { $function = function (&$item) { $item['href'] = str_replace('tag:', 'http://', $item['href']); }; return parent::getItens($stop, $function); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10) { $fn = function (&$item) { $item['ts'] = strtotime($item['datetime']); $item['datetime'] = date($this->patternDate, $item['ts']); }; return parent::getItens($stop, $fn); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10, $function = null) { $function = function (&$item) { $aux = html_entity_decode($item['subtitulo']); $aux = strip_tags($aux, '<p></p>'); $item['subtitulo'] = str_replace(array('<p>', '</p>'), array(''), $aux); }; return parent::getItens($stop, $function); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10) { $fn = function (&$item) { $item['href'] = str_replace('tag:', 'http://', $item['href']); $item['ts'] = strtotime($item['datetime']); $item['datetime'] = date($this->patternDate, $item['ts']); }; return parent::getItens($stop, $fn); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10, $function = null) { $months = array('Fev' => 'Feb', 'Abr' => 'Apr', 'Mai' => 'May', 'Ago' => 'Aug', 'Set' => 'Sep', 'Out' => 'Oct', 'Dez' => 'Dec'); $function = function (&$item) use($months) { $item['subtitulo'] = strip_tags($item['subtitulo']); $aux = explode(',', $item['datetime']); $aux = str_replace(array_keys($months), array_values($months), $aux[1]); $item['datetime'] = $aux; }; return parent::getItens($stop, $function); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10, $function = null) { $function = function (&$item) { preg_match('~src=(["\'])([^\'"]+)\\1~', $item['subtitulo'], $aux); if (count($aux) > 0) { $item['img'] = $aux[2]; } $item['subtitulo'] = strip_tags($item['subtitulo'], ''); }; return parent::getItens($stop, $function); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10) { $fn = function (&$item) { $aux = html_entity_decode($item['subtitulo']); $aux = strip_tags($aux, '<p></p>'); $item['subtitulo'] = str_replace(array('<p>', '</p>'), array(''), $aux); $item['ts'] = strtotime($item['datetime']); $item['datetime'] = date($this->patternDate, $item['ts']); }; return parent::getItens($stop, $fn); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10, $function = null) { $function = function (&$item) { preg_match('~url\\(\'([^\']+)\'\\)~', $item['img'], $aux); $img = $aux[1]; $img300 = str_replace('.150.', '.1280.', $img); $item['thumbnail'] = $img; $item['img'] = $img300; $item['titulo'] = strip_tags($item['titulo']); $subtitulo = str_replace('Leia Mais', '', $item['subtitulo']); $subtitulo = explode("\n", $subtitulo); $item['subtitulo'] = $subtitulo[1]; }; return parent::getItens($stop, $function); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10) { $fn = function (&$item) { preg_match('~url\\(\'([^\']+)\'\\)~', $item['img'], $aux); $img = $aux[1]; $img300 = str_replace('.150.', '.300.', $img); if (strpos($item['img'], $img300) >= 0) { $item['img'] = $img300; } else { $item['img'] = $img; } $item['titulo'] = strip_tags($item['titulo']); $subtitulo = str_replace('Leia Mais', '', $item['subtitulo']); $subtitulo = explode("\n", $subtitulo); $item['subtitulo'] = $subtitulo[1]; $item['ts'] = strtotime($item['datetime']); $item['datetime'] = date($this->patternDate, $item['ts']); }; return parent::getItens($stop, $fn); }
/** * * @param int $stop * @return array */ public function getItens($stop = 10, $function = null) { return parent::getItens($stop, $function); }