public function __construct($st, $args)
 {
     // call our parent constructor first
     parent::__construct($st, $args);
     // $args[0] contains the rolename
     // we need to replace this with the hostId for FromHost() to
     // function correctly
     // what are we doing?
     $log = usingLog()->startAction("select first host with role '{$this->args[0]}' ...");
     // get the hosts details
     $hostDetails = $this->retrieveFirstHost($this->args[0]);
     // we only need to remember the name
     $this->args[0] = $hostDetails->hostId;
     // all done
     $log->endAction("selected host '{$this->args[0]}'");
 }
Пример #2
0
 public function __construct($st)
 {
     parent::__construct($st, ['localhost']);
 }