コード例 #1
0
ファイル: classes.php プロジェクト: petflow/learn
    public function write($newline = null)
    {
        if ($newline) {
            echo 'Current content: ', $this->content, ' with version ', self::VERSION, "\n";
        } else {
            echo 'Current content: ', $this->content, ' with version ', self::VERSION;
        }
    }
    public function isClean()
    {
        return $this->content !== '';
    }
    public function getContent()
    {
        return $this->content;
    }
    public function version()
    {
        return '0.0.1';
    }
    public static function make($content)
    {
        $whiteboard = new static($content);
        return $whiteboard;
    }
    private function wipe()
    {
    }
}
$whiteboard = Whiteboard::make('sdfhsdhs');
// echo Whiteboard::version(), "\n";