/** * This constructor initializes the class with the specified parameters. * * @access public * @param Common\Mutable\IMap $blackboard the blackboard to be used * @param Common\Mutable\IMap $policy the policy associated with the task */ public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null) { parent::__construct($blackboard, $policy); if (!$this->policy->hasKey('id')) { $this->policy->putEntry('id', __CLASS__); } }
/** * This constructor initializes the class with the specified parameters. * * @access public * @param Common\Mutable\IMap $blackboard the blackboard to be used * @param Common\Mutable\IMap $policy the policy associated with the task */ public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null) { parent::__construct($blackboard, $policy); if (!$this->policy->hasKey('reverse')) { // direction $this->policy->putEntry('reverse', false); } if (!$this->policy->hasKey('steps')) { $this->policy->putEntry('steps', 1); } }
/** * This constructor initializes the class with the specified parameters. * * @access public * @param Common\Mutable\IMap $blackboard the blackboard to be used * @param Common\Mutable\IMap $policy the policy associated with the task */ public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null) { parent::__construct($blackboard, $policy); if (!$this->policy->hasKey('callable')) { $this->policy->putEntry('callable', 'rand'); // ['rand', 'mt_rand'] } if (!$this->policy->hasKey('odds')) { $this->policy->putEntry('odds', 0.01); } if (!$this->policy->hasKey('options')) { $this->policy->putEntry('options', 100); } }
/** * This constructor initializes the class with the specified parameters. * * @access public * @param Common\Mutable\IMap $blackboard the blackboard to be used * @param Common\Mutable\IMap $policy the policy associated with the task */ public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null) { parent::__construct($blackboard, $policy); if ($this->policy->hasKey('until')) { $until = $this->policy->getValue('until'); if (is_string($until)) { $until = BT\Task\Status::valueOf($until); } if ($until !== BT\Task\Status::SUCCESS) { $until = BT\Task\Status::FAILED; } $this->policy->putEntry('until', $until); } else { $this->policy->putEntry('until', BT\Task\Status::SUCCESS); } }
/** * This constructor initializes the class with the specified parameters. * * @access public * @param Common\Mutable\IMap $blackboard the blackboard to be used * @param Common\Mutable\IMap $policy the policy associated with the task */ public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null) { parent::__construct($blackboard, $policy); if (!$this->policy->hasKey('error')) { $this->policy->putEntry('error', false); } if (!$this->policy->hasKey('inactive')) { $this->policy->putEntry('inactive', false); } if (!$this->policy->hasKey('active')) { $this->policy->putEntry('acitve', false); } if (!$this->policy->hasKey('success')) { $this->policy->putEntry('success', true); } }
/** * This destructor ensures that any resources are properly disposed. * * @access public */ public function __destruct() { parent::__destruct(); unset($this->counter); }
/** * This destructor ensures that any resources are properly disposed. * * @access public */ public function __destruct() { parent::__destruct(); unset($this->next_time); }
/** * This destructor ensures that any resources are properly disposed. * * @access public */ public function __destruct() { parent::__destruct(); unset($this->calls); }
/** * This destructor ensures that any resources are properly disposed. * * @access public */ public function __destruct() { parent::__destruct(); unset($this->level); unset($this->logger); }