public function updateInstructionLen(Instruction $instr, $newLen) { #print 'updateInstructionLen'."\n"; $lenOffset = $newLen - $instr->getLen(); #print "\t".'lenOffset: '.$lenOffset."\n"; #print "\t".'offset old: '.$this->offset."\n"; $this->offset += $lenOffset; #print "\t".'offset new: '.$this->offset."\n"; for ($instrId = $instr->getId() + 1; $instrId < $this->instructionId; $instrId++) { if (isset($this->instructions[$instrId])) { $fInstr = $this->instructions[$instrId]; #$oos = $fInstr->getOffset(); $fInstr->addOffset($lenOffset); #print "\t".'instr '.$instrId.': '.$oos.' -> '.$fInstr->getOffset()."\n"; } } }
public function actionIndex($id = null) { if ($id != null) { $instruction = $this->loadModelOr404('Instruction', $id); $relations = Instruction::model()->findAll('id_instruction IN (SELECT id_instruction_rel FROM da_instruction_rel WHERE id_instruction=:id)', array(':id' => $instruction->id_instruction)); $this->render('backend.extensions.instruction.views.view', array('instruction' => $instruction, 'rels' => $relations)); return; } $this->render('backend.extensions.instruction.views.index', array('list' => Instruction::model()->findAll())); }
public function sip() { $instructions = \Instruction::all(); return View::make('support/sip', compact('instructions')); }
private function addInstruction(Instruction $instruction) { $this->instructions[$instruction->getOpcode()] = $instruction; }