private function writeAttributes( $file, $fields )
    {
        foreach ( $fields as $fieldName => $field )
        {
            fwrite( $file, "    /**\n" );
            fwrite( $file, "     * $fieldName\n" );
            fwrite( $file, "     *\n" );
            fwrite( $file, "     * @var {$this->translateType($field->type)}\n" );
            fwrite( $file, "     */\n" );
            fwrite( $file, "    private \$$fieldName;\n" );
        }
    }