Exemple #1
0
 public function sort($orderby, $order = SORT_ASC)
 {
     if ($this->lines) {
         Obj::sort($this->lines, $orderby, $order);
     }
     return $this->lines;
 }
Exemple #2
0
 public function updateValue($matches, $data)
 {
     if ($this->lines) {
         foreach ($this->lines as &$line) {
             $match = true;
             foreach ($matches as $key => $val) {
                 if (!isset($line->{$key}) || $line->{$key} != $val) {
                     $match = false;
                 }
             }
             if ($match) {
                 $line = Lib\Obj::extend($line, $data);
                 $this->update = true;
             }
         }
     }
 }