/** * This method pushes an element onto the top of the stack. * * @access public * @param mixed $value the element to be pushed onto the stack * @return boolean whether the element was added */ public function push($value) { return $this->list->addValue($value); }
/** * This method logs any changes between the source and target values. * * @access protected * @param mixed $source the source value to be evaluated * @param mixed $target the target value to be evaluated * @param string $path the current path * @param Common\Mutable\IList $log a reference to the log */ protected function compareValues($source, $target, $path, Common\Mutable\IList $log) { $source_info = Core\DataType::info($source); $target_info = Core\DataType::info($target); if ($source_info->hash != $target_info->hash) { if ($source_info->type != $target_info->type) { $log->addValue(array('body' => strtr('Target value is of ":target" type, but source value is of ":source" type.', array(':source' => $source_info->type, ':target' => $target_info->type)), 'level' => Log\Level::warning()->__name(), 'path' => $path, 'time' => date('c'))); } else { $log->addValue(array('body' => strtr('Target value ":target" is different from source value ":source".', array(':source' => Core\Convert::toString($source), ':target' => Core\Convert::toString($target))), 'level' => Log\Level::warning()->__name(), 'path' => $path, 'time' => date('c'))); } } }
/** * This method enqueues an element onto the queue. * * @access public * @param mixed $value the element to be enqueued * @return boolean whether the element was added */ public function enqueue($value) { return $this->list->addValue($value); }
/** * This method adds a token rule definition to the tokenizer. * * @access protected * @param \Unicity\Lexer\Scanner\ITokenRule $rule the token rule definition to be * added */ public function addRule(Lexer\Scanner\ITokenRule $rule) { $this->rules->addValue($rule); }
/** * This method adds a resource to this context. * * @access public * @param \SimpleXMLElement $resource the resource to be added */ public function addResource(\SimpleXMLElement $resource) { $this->resources->addValue($resource); }
/** * This method adds a task to this task composite. * * @access public * @param BT\Task $task the task to be added */ public function addTask(BT\Task $task) { $this->tasks->addValue($task); }