public function convertXml(array $posts) { $this->redirectTo = array(); $decoder = new ReadApiDecoder(); foreach ($posts as $post) { $data = $decoder->decode($post); $this->storeRedirectTo($data); } $this->dumpRedirectTo(); }
public function convertXml(array $posts) { if (!is_dir($this->rootDir)) { mkdir($this->rootDir); } $decoder = new ReadApiDecoder(); foreach ($posts as $post) { $data = $decoder->decode($post); if (!empty($this->exclude) && $this->exclude($data)) { continue; } $this->write($data); } }