public function toString() { return sprintf("trafficlight[%s] on color [%s] for [%s] seconds", $this->id, $this->color, time() - $this->switch_time) . PHP_EOL; }
/** * overriden method with the correct implementation for our * domain logic * {@inheritDoc} */ protected function _applies() { echo $this->light->toString(); return (bool) $this->light->isReadyToSwitch(); }