/**
  * Export method
  *
  * @return void
  */
 public function export()
 {
     $user = new Model\User();
     $user->getExport($this->request->getPath(1), $this->request->getQuery('sort'), $this->request->getQuery('page'));
     if (isset($user->userRows[0])) {
         $userRows = $user->userRows;
         foreach ($userRows as $key => $value) {
             foreach ($value as $k => $v) {
                 if (is_array($v)) {
                     $userRows[$key]->{$k} = implode('|', $v);
                 }
             }
         }
         \Pop\Data\Data::factory($userRows)->writeData($_SERVER['HTTP_HOST'] . '_' . $user->userType . '_' . date('Y-m-d') . '.csv', true, true);
     } else {
         Response::redirect($this->request->getBasePath() . '/index/' . $this->request->getPath(1));
     }
 }