so = $so; $this->boot(); } // Default boot method if a child class doesnt have one. protected function boot() { $this->state['mode'] = FALSE; } /** * Has control completed? */ public function complete() { return $this->complete; } // @todo Change to Dynamic Calls by the existence of files in App\Classes\Control public static function factory(string $name, Server $so) { switch ($name) { case 'register': return new Register($so); case 'telnet': return new Telnet($so); default: throw new \Exception('Unknown control method: '.$name); } } abstract public function handle(string $char); }