XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
trash.model.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
11 class trashModel extends trash
12 {
19  function getTrash($trashSrl, $columnList = array())
20  {
21  $oTrashVO = new TrashVO();
22  if(!$trashSrl) return $oTrashVO;
23 
24  $args = new stdClass();
25  $args->trashSrl = $trashSrl;
26  $output = executeQuery('trash.getTrash', $args, $columnList);
27 
28  $this->_setTrashObject($oTrashVO, $output->data);
29  $output->data = $oTrashVO;
30 
31  return $output;
32  }
33 
40  function getTrashList($args, $columnList = array())
41  {
42  $output = executeQueryArray('trash.getTrashList', $args, $columnList);
43 
44  if(is_array($output->data))
45  {
46  foreach($output->data AS $key=>$value)
47  {
48  $oTrashVO = new TrashVO();
49  $this->_setTrashObject($oTrashVO, $value);
50  $output->data[$key] = $oTrashVO;
51  }
52  }
53  return $output;
54  }
55 
62  function getTrashAllList($args, $columnList = array())
63  {
64  $output = executeQueryArray('trash.getTrashAllList', $args, $columnList);
65 
66  if(is_array($output->data))
67  {
68  foreach($output->data AS $key=>$value)
69  {
70  $oTrashVO = new TrashVO();
71  $this->_setTrashObject($oTrashVO, $value);
72  $output->data[$key] = $oTrashVO;
73  }
74  }
75  return $output;
76  }
77 
84  function _setTrashObject(&$oTrashVO, $stdObject)
85  {
86  $oTrashVO->setTrashSrl($stdObject->trash_srl);
87  $oTrashVO->setTitle($stdObject->title);
88  $oTrashVO->setOriginModule($stdObject->origin_module);
89  $oTrashVO->setSerializedObject($stdObject->serialized_object);
90  $oTrashVO->setUnserializedObject($stdObject->serialized_object);
91  $oTrashVO->setDescription($stdObject->description);
92  $oTrashVO->setIpaddress($stdObject->ipaddress);
93  $oTrashVO->setRemoverSrl($stdObject->remover_srl);
94  $oTrashVO->setUserId($stdObject->user_id);
95  $oTrashVO->setNickName($stdObject->nick_name);
96  $oTrashVO->setRegdate($stdObject->regdate);
97  }
98 }
99 /* End of file trash.model.php */
100 /* Location: ./modules/trash/trash.model.php */
getTrash($trashSrl, $columnList=array())
Definition: trash.model.php:19
$output
Definition: ko.install.php:193
_setTrashObject(&$oTrashVO, $stdObject)
Definition: trash.model.php:84
$args
Definition: ko.install.php:185
executeQueryArray($query_id, $args=NULL, $arg_columns=NULL)
Definition: func.inc.php:219
getTrashList($args, $columnList=array())
Definition: trash.model.php:40
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
Definition: func.inc.php:203
getTrashAllList($args, $columnList=array())
Definition: trash.model.php:62