Exemplo n.º 1
0
 public function sort($orderby, $order = SORT_ASC)
 {
     if ($this->lines) {
         Obj::sort($this->lines, $orderby, $order);
     }
     return $this->lines;
 }
Exemplo n.º 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;
             }
         }
     }
 }