Abstract Class Migration_Base

Description

Parent class for classes representing individual migrations.

  • abstract:

Located in /migration/lib/Migration/Base.php (line 9)


	
			
Variable Summary
 mixed $connection
Method Summary
 Migration_Base __construct ()
 void connection ()
 void down ()
 object model (string $className)
 void up ()
 void __call ( $name,  $arguments)
Variables
mixed $connection (line 11)
  • access: protected
Methods
Constructor __construct (line 16)

Constructor

  • access: public
Migration_Base __construct ()
connection (line 35)

Return the database connection

  • access: protected
void connection ()
down (line 28)

Undo this migration.

  • access: public
void down ()
model (line 61)

A convenience method that calls Support_Util::model()

This method exists purely for more concise code creation. All three of the examples below perform the same operation:

  1.    // write this:
  2.    $post $this->model('BlogPost')->find($id);
  3.  
  4.    // instead of:
  5.    $post Support_Util::model('BlogPost')->find($id);
  6.  
  7.    // or
  8.    $BlogPost new BlogPost();
  9.    $post $BlogPost->find($id);

  • access: protected
object model (string $className)
  • string $className: The name of the model class to return
up (line 23)

Perform this migration.

  • abstract:
  • access: public
void up ()
__call (line 68)

Map unknown calls made on the migration directly to the database connection.

  • access: public
void __call ( $name,  $arguments)
  • $name
  • $arguments

Documentation generated on Wed, 25 Apr 2012 09:46:40 -0700 by phpDocumentor 1.4.3