# CustomizableDaoSynchronizer Class Reference
[Various accompanying utilities]

Inheritance diagram for CustomizableDaoSynchronizer:
[legend]

List of all members.

## Public Member Functions

| setDryRun ($dryRun)
| isDryRun ()
| setReallyDelete ($reallyDelete)
| isReallyDelete ()
| setMaster (GenericDAO $master)
| getMaster ()
| setSlave (GenericDAO $slave)
| getSlave ()
| setMasterKeyProperty ($masterKeyProperty)
| getMasterKeyProperty ()
| setSlaveKeyProperty ($slaveKeyProperty)
| getSlaveKeyProperty ()
| setMasterProjection (ObjectProjection $masterProjection)
| getMasterProjection ()
| setSlaveProjection (ObjectProjection $slaveProjection)
| getSlaveProjection ()
| run ()
| getTotalInserted ()
| getTotalDeleted ()
| getTotalUpdated ()

## Static Public Member Functions

static | create ()

## Protected Member Functions

| sync ($old, $object)
| delete ($slaveObject)
| insert ($masterObject)
| compareKeys ($min, $sub)

## Protected Attributes

| $dryRun = false
| $reallyDelete = false
| $master = null
| $slave = null

## Private Member Functions

| convertMasterObjectToSlave ($masterObject)

## Private Attributes

| $masterProjection = null
| $slaveProjection = null
| $masterKeyProperty = 'id'
| $slaveKeyProperty = 'id'
| $totalUpdated = 0
| $totalInserted = 0
| $totalDeleted = 0

## Detailed Description

Definition at line 15 of file CustomizableDaoSynchronizer.class.php.

## Member Function Documentation

CustomizableDaoSynchronizer::compareKeys | ( | $ | min,
|  | $ | sub |
| ) |  |  | `[protected]`

Definition at line 301 of file CustomizableDaoSynchronizer.class.php.

Referenced by run().

CustomizableDaoSynchronizer::convertMasterObjectToSlave | ( | $ | masterObject | ) | `[private]`

Definition at line 311 of file CustomizableDaoSynchronizer.class.php.

Referenced by run().

static CustomizableDaoSynchronizer::create | ( |  | ) | `[static]`

Returns:
  CustomizableDaoSynchronizer

Reimplemented in DaoSynchronizer.

Definition at line 36 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::delete | ( | $ | slaveObject | ) | `[protected]`

Definition at line 281 of file CustomizableDaoSynchronizer.class.php.

References Assert::methodExists().

Here is the call graph for this function:

CustomizableDaoSynchronizer::getMaster | ( |  | ) |

Returns:
  GenericDAO

Definition at line 84 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getMasterKeyProperty | ( |  | ) |

Definition at line 117 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getMasterProjection | ( |  | ) |

Returns:
  ObjectProjection

Definition at line 150 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getSlave | ( |  | ) |

Returns:
  GenericDAO

Definition at line 102 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getSlaveKeyProperty | ( |  | ) |

Definition at line 132 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getSlaveProjection | ( |  | ) |

Returns:
  ObjectProjection

Definition at line 168 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getTotalDeleted | ( |  | ) |

Definition at line 263 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getTotalInserted | ( |  | ) |

Definition at line 258 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::getTotalUpdated | ( |  | ) |

Definition at line 268 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::insert | ( | $ | masterObject | ) | `[protected]`

Definition at line 293 of file CustomizableDaoSynchronizer.class.php.

Referenced by run().

CustomizableDaoSynchronizer::isDryRun | ( |  | ) |

Definition at line 51 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::isReallyDelete | ( |  | ) |

Definition at line 66 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::run | ( |  | ) |

Returns:
  CustomizableDaoSynchronizer

Definition at line 176 of file CustomizableDaoSynchronizer.class.php.

References compareKeys(), convertMasterObjectToSlave(), insert(), Assert::isUnreachable(), and sync().

Here is the call graph for this function:

CustomizableDaoSynchronizer::setDryRun | ( | $ | dryRun | ) |

Returns:
  CustomizableDaoSynchronizer

Definition at line 44 of file CustomizableDaoSynchronizer.class.php.

References $dryRun.

CustomizableDaoSynchronizer::setMaster | ( | GenericDAO $ | master | ) |

Returns:
  CustomizableDaoSynchronizer

Reimplemented in DaoSynchronizer.

Definition at line 74 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::setMasterKeyProperty | ( | $ | masterKeyProperty | ) |

Returns:
  CustomizableDaoSynchronizer

Definition at line 110 of file CustomizableDaoSynchronizer.class.php.

References $masterKeyProperty.

CustomizableDaoSynchronizer::setMasterProjection | ( | ObjectProjection $ | masterProjection | ) |

Returns:
  CustomizableDaoSynchronizer

Definition at line 140 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::setReallyDelete | ( | $ | reallyDelete | ) |

Returns:
  CustomizableDaoSynchronizer

Definition at line 59 of file CustomizableDaoSynchronizer.class.php.

References $reallyDelete.

CustomizableDaoSynchronizer::setSlave | ( | GenericDAO $ | slave | ) |

Returns:
  CustomizableDaoSynchronizer

Reimplemented in DaoSynchronizer.

Definition at line 92 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::setSlaveKeyProperty | ( | $ | slaveKeyProperty | ) |

Returns:
  CustomizableDaoSynchronizer

Definition at line 125 of file CustomizableDaoSynchronizer.class.php.

References $slaveKeyProperty.

CustomizableDaoSynchronizer::setSlaveProjection | ( | ObjectProjection $ | slaveProjection | ) |

Returns:
  CustomizableDaoSynchronizer

Definition at line 158 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::sync | ( | $ | old,
|  | $ | object |
| ) |  |  | `[protected]`

Reimplemented in DaoSynchronizer.

Definition at line 273 of file CustomizableDaoSynchronizer.class.php.

Referenced by run().

## Member Data Documentation

CustomizableDaoSynchronizer::$dryRun = false`[protected]`

Definition at line 17 of file CustomizableDaoSynchronizer.class.php.

Referenced by setDryRun().

CustomizableDaoSynchronizer::$master = null`[protected]`

Definition at line 20 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::$masterKeyProperty = 'id'`[private]`

Definition at line 26 of file CustomizableDaoSynchronizer.class.php.

Referenced by setMasterKeyProperty().

CustomizableDaoSynchronizer::$masterProjection = null`[private]`

Definition at line 23 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::$reallyDelete = false`[protected]`

Definition at line 18 of file CustomizableDaoSynchronizer.class.php.

Referenced by setReallyDelete().

CustomizableDaoSynchronizer::$slave = null`[protected]`

Definition at line 21 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::$slaveKeyProperty = 'id'`[private]`

Definition at line 27 of file CustomizableDaoSynchronizer.class.php.

Referenced by setSlaveKeyProperty().

CustomizableDaoSynchronizer::$slaveProjection = null`[private]`

Definition at line 24 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::$totalDeleted = 0`[private]`

Definition at line 31 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::$totalInserted = 0`[private]`

Definition at line 30 of file CustomizableDaoSynchronizer.class.php.

CustomizableDaoSynchronizer::$totalUpdated = 0`[private]`

Definition at line 29 of file CustomizableDaoSynchronizer.class.php.

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

- main/Utils/CustomizableDaoSynchronizer.class.php