예제 #1
0
 function getControlType($id = 0)
 {
     $model = new Security_Model_Control();
     if ($id == 0) {
         $result = $model->fetchAll();
     } else {
         $result = $model->fetchAll("id='{$id}'");
     }
     $arrParentResult = array();
     if (count($result) > 0) {
         foreach ($result as $row) {
             $i = count($arrParentResult);
             $arrParentResult[$i]['id'] = $row->getId();
             $arrParentResult[$i]['name'] = $row->getName();
             $arrParentResult[$i]['value'] = $row->getValue();
             $arrParentResult[$i]['status'] = $row->getStatus();
         }
     }
     return $arrParentResult;
     //return $result;
 }
예제 #2
0
 public function setModel($row)
 {
     $model = new Security_Model_Control();
     $model->setId($row->id)->setName($row->name)->setValue($row->value)->setStatus($row->status);
     return $model;
 }