Ejemplo n.º 1
0
 static function loop()
 {
     $return = array();
     foreach (ReadWrite::loop("Types") as $ID) {
         $return[] = WordType::load($ID);
     }
     return $return;
 }
Ejemplo n.º 2
0
 static function all($response_ID)
 {
     $return = array();
     foreach (ReadWrite::all("ResponseItems", array("ResponseId"), array($response_ID)) as $ID) {
         $return[] = ResponseItem::load($ID);
     }
     return $return;
 }
Ejemplo n.º 3
0
 static function loop($scope)
 {
     $return = array();
     foreach (ReadWrite::all("Responses", array("Scope"), array($scope)) as $ID) {
         $return[] = Response::load($ID);
         $return[count($return) - 1]->load_items();
     }
     return $return;
 }
Ejemplo n.º 4
0
 static function random($scope, $position = null, $type = null)
 {
     $where = "`Scope`=" . $scope;
     if (isset($position)) {
         $where .= " AND `Position`=" . $position;
     }
     if ($type) {
         $where .= " AND `Type`=" . $type;
     }
     $data = ReadWrite::random('LanguageItems', array('ID', 'Name', 'Position', 'Scope', 'Type'), array('ID', 'Text', 'Position', 'Scope', 'Type'), $where);
     return new LanguageItem($data['Text'], $data['Scope'], $data['Position'], $data['Type'], $data['ID']);
 }