Class Migration_List

Description

Implements interfaces:

  • IteratorAggregate (internal interface)
  • ArrayAccess (internal interface)

Migration_List keeps track of the migrations for a single directory

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


	
			
Variable Summary
 mixed $directory
 mixed $migrations
 mixed $scope
Method Summary
 Migration_List __construct (string $dir, [string $scope = null])
 void connection ()
 ArrayIterator getIterator ()
 void keys ()
 void last_version ()
 void load_migrations ()
 boolean offsetExists (string $index)
 Migration_Record offsetGet (string $index)
 void offsetSet (string $index, Migration_Record $value)
 void offsetUnset (string $index)
 void sort_by_name ( $a,  $b)
Variables
mixed $directory (line 10)
  • access: protected
mixed $migrations (line 12)
  • access: protected
mixed $scope (line 11)
  • access: protected
Methods
Constructor __construct (line 20)

Constructor

  • access: public
Migration_List __construct (string $dir, [string $scope = null])
  • string $dir: The directory containing the migration files
  • string $scope: The scope, if any, to use in the migrations table
connection (line 213)

Return the database connection

  • access: protected
void connection ()
create_migration_table (line 191)

Create the migration table

  • access: protected
void create_migration_table ()
getIterator (line 31)

Return an iterator for the command list

  • access: public
ArrayIterator getIterator ()

Implementation of:
IteratorAggregate::getIterator
has_migration_table (line 181)

Test for the existence of the migration table

  • access: protected
void has_migration_table ()
keys (line 73)

Return the list of keys in this list

  • access: public
void keys ()
last_version (line 100)

Return the highest version number (regardless of whether it's been performed)

  • access: public
void last_version ()
load_migrations (line 115)

Load migrations from the directory and tables

  • access: protected
void load_migrations ()
load_migration_files (line 153)

Load the migration files from the directory

  • access: protected
void load_migration_files ()
load_migration_records (line 166)

Load the migration entries from the database

  • access: protected
void load_migration_records ()
offsetExists (line 40)

Tests for existence of an array index

  • access: public
boolean offsetExists (string $index)
  • string $index: The index to test

Implementation of:
ArrayAccess::offsetExists
offsetGet (line 49)

Retrieves the migration at an array index.

  • access: public
Migration_Record offsetGet (string $index)
  • string $index: The index to get

Implementation of:
ArrayAccess::offsetGet
offsetSet (line 58)

Sets the value at an array index

  • access: public
void offsetSet (string $index, Migration_Record $value)

Implementation of:
ArrayAccess::offsetSet
offsetUnset (line 66)

Deletes an entry at an array index

  • access: public
void offsetUnset (string $index)
  • string $index: The index to unset

Implementation of:
ArrayAccess::offsetUnset
performed_version (line 80)

Return the highest performed version number

  • access: public
void performed_version ()
sort_by_name (line 220)

Perform a natural sort by object name property

  • access: public
void sort_by_name ( $a,  $b)
  • $a
  • $b

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