original_string: private function writeClass( $dir, $tableName, ezcDbSchemaTable $table )
      {
          $file = $this->openFile( $dir, $tableName );
  
          fwrite( $file, "/**\n" );
          fwrite( $file, " * Data class $tableName.\n" );
          fwrite( $file, " * Class to be used with eZ Components PersistentObject.\n" );
          fwrite( $file, " */\n" );
          fwrite( $file, "class {$this->prefix}$tableName\n" );
          fwrite( $file, "{\n" );
  
          // attributes 
          $this->writeAttributes( $file, $table->fields );
          fwrite( $file, "\n" );
  
          // methods
          $this->writeSetState( $file );
          fwrite( $file, "\n" );
          $this->writeGetState( $file, $table->fields );
  
          fwrite( $file, "}\n" );
          $this->closeFile( $file );
      }
code: private function writeClass( $dir, $tableName, ezcDbSchemaTable $table )
      {
          $file = $this->openFile( $dir, $tableName );
  
          fwrite( $file, "/**\n" );
          fwrite( $file, " * Data class $tableName.\n" );
          fwrite( $file, " * Class to be used with eZ Components PersistentObject.\n" );
          fwrite( $file, " */\n" );
          fwrite( $file, "class {$this->prefix}$tableName\n" );
          fwrite( $file, "{\n" );
  
          // attributes 
          $this->writeAttributes( $file, $table->fields );
          fwrite( $file, "\n" );
  
          // methods
          $this->writeSetState( $file );
          fwrite( $file, "\n" );
          $this->writeGetState( $file, $table->fields );
  
          fwrite( $file, "}\n" );
          $this->closeFile( $file );
      }
code_tokens: private function writeClass ( $ dir , $ tableName , ezcDbSchemaTable $ table ) { $ file = $ this -> openFile ( $ dir , $ tableName ) ; fwrite ( $ file , "/**\n" ) ; fwrite ( $ file , " * Data class $tableName.\n" ) ; fwrite ( $ file , " * Class to be used with eZ Components PersistentObject.\n" ) ; fwrite ( $ file , " */\n" ) ; fwrite ( $ file , "class {$this->prefix}$tableName\n" ) ; fwrite ( $ file , "{\n" ) ; // attributes  $ this -> writeAttributes ( $ file , $ table -> fields ) ; fwrite ( $ file , "\n" ) ; // methods $ this -> writeSetState ( $ file ) ; fwrite ( $ file , "\n" ) ; $ this -> writeGetState ( $ file , $ table -> fields ) ; fwrite ( $ file , "}\n" ) ; $ this -> closeFile ( $ file ) ; }
docstring: Writes a PHP class.
  This method writes a PHP class from a table definition.
  
  @param string $dir              The directory to write the defititions to.
  @param string $tableName        Name of the database table.
  @param ezcDbSchemaTable $table  The table definition.
docstring_tokens: Writes a PHP class . This method writes a PHP class from a table definition .