Elgg  Version 1.11
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Elgg\Upgrades\Helper2013022000 Class Reference

Helper for data directory upgrade. More...

Public Member Functions

 __construct ($siteGuid, $dbPrefix)
 
 getBatchOptions ()
 Get elgg_get_entities() options for fetching users who need data migration. More...
 
 countUnmigratedUsers ()
 Get number of users who need data migration. More...
 
 makeMatrix ($user_row)
 Get the old directory location. More...
 
 removeDirIfEmpty ($dir)
 Remove directory if all users moved out of it. More...
 
 getLowerBucketBound ($guid)
 Get the base directory name as int. More...
 
 markSuccess ($guid)
 Mark the user as a successful data migration. More...
 
 markFailure ($guid)
 Mark the user as having failed data migration. More...
 
 forgetFailures ()
 Remove the records for failed migrations. More...
 
 forgetSuccesses ()
 Remove the records for successful migrations. More...
 
 hasFailures ()
 Are there any failures on record? More...
 

Public Attributes

const RELATIONSHIP_SUCCESS = '2013022000'
 
const RELATIONSHIP_FAILURE = '2013022000_fail'
 

Protected Attributes

 $siteGuid
 
 $dbPrefix
 

Detailed Description

Helper for data directory upgrade.

private

Definition at line 9 of file Helper2013022000.php.

Constructor & Destructor Documentation

Elgg\Upgrades\Helper2013022000::__construct (   $siteGuid,
  $dbPrefix 
)
Parameters
int$siteGuidSite GUID
string$dbPrefixDB table prefix

Definition at line 27 of file Helper2013022000.php.

Member Function Documentation

Elgg\Upgrades\Helper2013022000::countUnmigratedUsers ( )

Get number of users who need data migration.

Returns
int

Definition at line 67 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::forgetFailures ( )

Remove the records for failed migrations.

Definition at line 148 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::forgetSuccesses ( )

Remove the records for successful migrations.

Definition at line 160 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::getBatchOptions ( )

Get elgg_get_entities() options for fetching users who need data migration.

Returns
array

Definition at line 37 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::getLowerBucketBound (   $guid)

Get the base directory name as int.

Parameters
int$guidGUID of the user
Returns
int

Definition at line 119 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::hasFailures ( )

Are there any failures on record?

Returns
bool

Definition at line 174 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::makeMatrix (   $user_row)

Get the old directory location.

Parameters
\stdClass$user_row
Returns
string

Definition at line 79 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::markFailure (   $guid)

Mark the user as having failed data migration.

Parameters
int$guid

Definition at line 141 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::markSuccess (   $guid)

Mark the user as a successful data migration.

Parameters
int$guid

Definition at line 132 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::removeDirIfEmpty (   $dir)

Remove directory if all users moved out of it.

Parameters
string$dir
Returns
bool

Definition at line 90 of file Helper2013022000.php.

Member Data Documentation

Elgg\Upgrades\Helper2013022000::$dbPrefix
protected

Definition at line 21 of file Helper2013022000.php.

Elgg\Upgrades\Helper2013022000::$siteGuid
protected

Definition at line 16 of file Helper2013022000.php.

const Elgg\Upgrades\Helper2013022000::RELATIONSHIP_FAILURE = '2013022000_fail'

Definition at line 11 of file Helper2013022000.php.

const Elgg\Upgrades\Helper2013022000::RELATIONSHIP_SUCCESS = '2013022000'

Definition at line 10 of file Helper2013022000.php.


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