Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
Migration Class Reference
Inheritance diagram for Migration:
TestMigrationOne TestMigrationTen TestMigrationTwo TestMigrationTwoOne

Public Member Functions

 __construct ($verbose=false)
 
 setVerbose ($state=true)
 
 description ()
 
 migrate ($direction)
 
 announce ($format)
 

Protected Member Functions

 up ()
 
 down ()
 
 write ($text= '')
 
 mark ($text, $sign= '=')
 

Constructor & Destructor Documentation

__construct (   $verbose = false)

Initalize a Migration object (optionally using verbose output).

Parameters
boolean$verboseverbose output (default FALSE)

Member Function Documentation

announce (   $format)

Print the given formatted string (if verbose output is enabled). Output always includes the migration's class name.

Parameters
string$format,...printf-style format string and parameters
description ( )

Abstract method describing this migration step. This method should be implemented in a migration subclass.

Returns
string migration description
down ( )
protected

Abstract method reverting this migration step. This method should be implemented in a migration subclass.

mark (   $text,
  $sign = '=' 
)
protected

Pads and highlights a given text to a specific length with the given sign.

Parameters
string$text
string$sign
migrate (   $direction)

Perform or revert this migration, depending on the indicated direction.

Parameters
string$directionmigration direction (either 'up' or 'down')
setVerbose (   $state = true)

Sets the verbose state of this migration.

Parameters
boolean$stateVerbosity state
up ( )
protected

Abstract method performing this migration step. This method should be implemented in a migration subclass.

write (   $text = '')
protected

Print the given string (if verbose output is enabled).

Parameters
string$texttext to print

The documentation for this class was generated from the following file: