row_id = $data->get("row_id"); $raw_order = $data->get("row_order"); $this->mode = ScheduleMode::$Move; $row_ids = new _hx_array($raw_order); if($row_ids !== null) { $this->rowDetails = new Hash(); $position = 1; { $_g = 0; while($_g < $row_ids->length) { $id = $row_ids[$_g]; ++$_g; $d = $data->get($id); $quantity = null; if($d !== null) { $o = php_Lib::objectOfAssociativeArray($d); $quantity = Std::parseInt($o->quantity); unset($o); } $this->rowDetails->set($id, _hx_anonymous(array("id" => $id, "quantity" => $quantity, "position" => $position))); $position += 1; unset($quantity,$id,$d); } } } }} public function priority($order) { $orderId = ItemScheduler::orderId($order); $orderPosition = $this->position($orderId); return (($orderPosition !== null) ? $orderPosition : $order->priority->getTime()); } public function position($id) { if($this->rowDetails === null) { return null; } return $this->rowDetails->get($id)->position; } public function setMode($action) { $this->mode = ScheduleParameters_0($this, $action); } public $mode; public $rowDetails; public $row_id; public function __call($m, $a) { if(isset($this->$m) && is_callable($this->$m)) return call_user_func_array($this->$m, $a); else if(isset($this->»dynamics[$m]) && is_callable($this->»dynamics[$m])) return call_user_func_array($this->»dynamics[$m], $a); else if('toString' == $m) return $this->__toString(); else throw new HException('Unable to call «'.$m.'»'); } function __toString() { return 'ScheduleParameters'; } } function ScheduleParameters_0(&$»this, &$action) { switch($action) { case "update":{ return ScheduleMode::$Update; }break; case "cancel":{ return ScheduleMode::$Cancel; }break; default:{ return ScheduleMode::$Move; }break; } }