MDB2_Schema
[ class tree: MDB2_Schema ] [ index: MDB2_Schema ] [ all elements ]

Class: MDB2_Schema_Example

Source Location: /MDB2_Schema-0.8.6/www/mdb2_schematool/class.inc.php

Class Overview


An example of how to use MDB2_Schema


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 63]
An example of how to use MDB2_Schema

This is all rather ugly code, thats probably very much XSS exploitable etc. However the idea was to keep the magic and dependencies low, to just illustrate the MDB2_Schema API a bit.



[ Top ]


Class Variables

$action =  ''

[line 90]


Type:   mixed


[ Top ]

$disable_query =  false

[line 89]


Type:   mixed


[ Top ]

$dsn = array(
        'phptype'   => '',
        'username'  => 'root',
        'password'  => '',
        'hostspec'  => 'localhost',
        'database'  => 'MDB2Example',
        'charset'   => 'utf8'
    )

[line 79]


Type:   mixed


[ Top ]

$dumptype =  ''

[line 91]


Type:   mixed


[ Top ]

$file =  ''

[line 92]


Type:   mixed


[ Top ]

$options = array(
        'log_line_break' => '<br>',
        'idxname_format' => '%s',
        'DBA_username' => '',
        'DBA_password' => '',
        'default_table_type' => 'MyISAM',
        'debug' => true,
        'use_transactions' => true,
        'quote_identifier' => true,
        'force_defaults' => false,
        'portability' => false,
        'drop_obsolete_objects' => false,
    )

[line 65]


Type:   mixed


[ Top ]

$show_structure =  false

[line 88]


Type:   mixed


[ Top ]



Method Detail

factory   [line 107]

object PEAR_Error|MDB2_Schema_Example factory( array $input)

Creates a MDB2_Schema_Example instance

This wraper is required for user input validation. If everything goes well, save user's options and return an object.

  • Access: public

Parameters:

array   $input   —  mixed array with user actions information

[ Top ]

saveCookies   [line 225]

void saveCookies( )

Saves user preferences as browser cookies
  • Access: public

[ Top ]

setOptions   [line 132]

void setOptions( array $options)

Sets MDB2_Schema_Example options according to user input

If an option is missing, force its value to be FALSE. This is required to catch unmarked checkboxes.

  • Access: public

Parameters:

array   $options   —  mixed array with user actions information

[ Top ]

validateInput   [line 170]

string|boolean validateInput( array $input)

Validates user input
  • Return: return string on error or boolean false
  • Access: public

Parameters:

array   $input   —  mixed array with user actions information

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:04:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.