ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSCORM2004Rule.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
16 {
17 
18  //db fields
19  private $id = null;
20  private $seqNodeId = null;
21  private $type = null;
22  private $action = true;
27  function ilSCORM2004Rule()
28  {
30  $this->setNodeName("rule");
31  }
32 
33 
34  // **********************
35  // GETTER METHODS
36  // **********************
37 
38  public function getSeqNodeId()
39  {
40  return $this->seqNodeId;
41  }
42 
43  public function getId()
44  {
45  return $this->id;
46  }
47 
48  public function getType()
49  {
50  return $this->type;
51  }
52 
53  public function getAction()
54  {
55  return $this->action;
56  }
57 
58  // **********************
59  // Setter METHODS
60  // **********************
61 
62  public function setSeqNodeId($a_seqnodeid)
63  {
64  $this->seqNodeId = $a_seqnodeid;
65  }
66 
67  public function setId($a_id)
68  {
69  $this->id = $a_id;
70  }
71 
72  public function setType($a_type)
73  {
74  $this->type = $a_type;
75  }
76 
77  public function setAction($a_action)
78  {
79  $this->action = $a_action;
80  }
81 
82 
83  // **********************
84  // Standard DB Operations for Object
85  // **********************
86 
87  public function insert($a_insert_node = false)
88  {
89  if ($a_insert_node==true) {$this->setSeqNodeId(parent::insert());}
90  $sql = "INSERT INTO sahs_sc13_seq_rule (seqnodeid,type,action)".
91  " values(".
92  $this->db->quote($this->seqNodeId, "integer").",".
93  $this->db->quote($this->type, "text").",".
94  $this->db->quote($this->action, "text").");";
95  $result = $this->db->manipulate($sql);
96  return true;
97  }
98 
99 
100 }
101 ?>