str = $str; $this->width = mb_strlen($this->str); if ( $this->width != strlen($this->str) ) { $this->width = $this->width * 2; } } public function open() { $this->printLine(); } public function adPrint() { echo "|".$this->str."|"; echo "\n"; } public function close() { $this->printLine(); } private function printLine() { echo "+"; for ($i = 0; $i < $this->width; $i++) { echo "-"; } echo "+"; echo "\n"; } } ?>