# MetaConfiguration Class Reference
[MetaConfiguration's base classes]

Inheritance diagram for MetaConfiguration:
[legend]

List of all members.

## Public Member Functions

| setForcedGeneration ($orly)
| isForcedGeneration ()
| setDryRun ($dry)
| isDryRun ()
| setWithEnumerationRefIntegrityCheck ($orly)
| load ($metafile, $generate=true)
| buildClasses ()
| buildSchema ()
| buildSchemaChanges ()
| buildContainers ()
| checkIntegrity ()
| checkForStaleFiles ($drop=false)
| getClassByName ($name)
| getClassList ()
| setOutput (MetaOutput $out)
| getOutput ()

## Static Public Member Functions

static | me ()
static | out ()

## Private Member Functions

| checkDirectory ($directory, $preStrip, $postStrip, $drop=false)
| addSource (SimpleXMLElement $source)
| makeProperty ($name, $type, MetaClass $class, $size)
| guessPattern ($name)
| checkSanity (MetaClass $class)
| checkRecursion (MetaClassProperty $property, MetaClass $holder, $paths=array())
| processIncludes (SimpleXMLElement $xml, $metafile)
| processClasses (SimpleXMLElement $xml, $metafile, $generate)
| loadXml ($metafile, $generate)
| checkClassSanity (MetaClass $class, ReflectionClass $info)
| checkEnumerationReferentialIntegrity (Enumeration $enumeration, $tableName)

## Private Attributes

| $out = null
| $classes = array()
| $sources = array()
| $liaisons = array()
| $references = array()
| $defaultSource = null
| $forcedGeneration = false
| $dryRun = false
| $checkEnumerationRefIntegrity = false

## Detailed Description

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

## Member Function Documentation

MetaConfiguration::addSource | ( | SimpleXMLElement $ | source | ) | `[private]`

Returns:
  MetaConfiguration

Definition at line 743 of file MetaConfiguration.class.php.

References Assert::isFalse().

Here is the call graph for this function:

MetaConfiguration::buildClasses | ( |  | ) |

Returns:
  MetaConfiguration

Definition at line 216 of file MetaConfiguration.class.php.

References $out, and getOutput().

Here is the call graph for this function:

MetaConfiguration::buildContainers | ( |  | ) |

Returns:
  MetaConfiguration

Definition at line 371 of file MetaConfiguration.class.php.

MetaConfiguration::buildSchema | ( |  | ) |

Returns:
  MetaConfiguration

Definition at line 243 of file MetaConfiguration.class.php.

References $out, SchemaBuilder::buildRelations(), SchemaBuilder::buildTable(), BasePattern::dumpFile(), SchemaBuilder::getHead(), getOutput(), and Format::indentize().

Here is the call graph for this function:

MetaConfiguration::buildSchemaChanges | ( |  | ) |

Returns:
  MetaConfiguration

Definition at line 297 of file MetaConfiguration.class.php.

References $out, MetaClassType::CLASS_ABSTRACT, getOutput(), and me().

Here is the call graph for this function:

MetaConfiguration::checkClassSanity | ( | MetaClass $ | class,
|  | ReflectionClass $ | info |
| ) |  |  | `[private]`

Returns:
  MetaConfiguration

Definition at line 1265 of file MetaConfiguration.class.php.

References MetaClassType::CLASS_ABSTRACT, MetaClassType::CLASS_FINAL, MetaClassType::CLASS_SPOOKED, MetaClass::getName(), MetaClass::getPattern(), MetaClass::getTypeId(), Assert::isTrue(), and Assert::isUnreachable().

Here is the call graph for this function:

MetaConfiguration::checkDirectory | ( | $ | directory,
|  | $ | preStrip,
|  | $ | postStrip,
|  | $ | drop = `false` |
| ) |  |  | `[private]`

Returns:
  MetaConfiguration

Definition at line 698 of file MetaConfiguration.class.php.

MetaConfiguration::checkEnumerationReferentialIntegrity | ( | Enumeration $ | enumeration,
|  | $ | tableName |
| ) |  |  | `[private]`

Definition at line 1310 of file MetaConfiguration.class.php.

References Expression::eq(), Enumeration::getObjectList(), DBPool::me(), OSQL::select(), and OSQL::update().

Here is the call graph for this function:

MetaConfiguration::checkForStaleFiles | ( | $ | drop = `false` | ) |

Returns:
  MetaConfiguration

Definition at line 646 of file MetaConfiguration.class.php.

MetaConfiguration::checkIntegrity | ( |  | ) |

Returns:
  MetaConfiguration

Definition at line 429 of file MetaConfiguration.class.php.

MetaConfiguration::checkRecursion | ( | MetaClassProperty $ | property,
|  | MetaClass $ | holder,
|  | $ | paths = `array()` |
| ) |  |  | `[private]`

Definition at line 905 of file MetaConfiguration.class.php.

References FetchStrategy::cascade(), MetaClassProperty::getFetchStrategy(), MetaClass::getName(), MetaClassProperty::getRelationId(), MetaClassProperty::getType(), Assert::isTrue(), FetchStrategy::JOIN, and MetaRelation::ONE_TO_ONE.

Referenced by load().

Here is the call graph for this function:

MetaConfiguration::checkSanity | ( | MetaClass $ | class | ) | `[private]`

Returns:
  MetaConfiguration

Definition at line 833 of file MetaConfiguration.class.php.

References MetaClassType::CLASS_SPOOKED, MetaClass::getFinalParent(), MetaClass::getIdentifier(), MetaClass::getName(), MetaClass::getParent(), MetaClass::getPattern(), MetaClass::getProperties(), MetaClass::getType(), MetaClass::getTypeId(), Assert::isFalse(), Assert::isTrue(), FetchStrategy::LAZY, and MetaRelation::ONE_TO_ONE.

Referenced by load().

Here is the call graph for this function:

MetaConfiguration::getClassByName | ( | $ | name | ) |

Exceptions:

  | MissingElementException |

Returns:
  MetaClass

Definition at line 662 of file MetaConfiguration.class.php.

Referenced by load().

MetaConfiguration::getClassList | ( |  | ) |

Definition at line 672 of file MetaConfiguration.class.php.

MetaConfiguration::getOutput | ( |  | ) |

Returns:
  MetaOutput

Definition at line 690 of file MetaConfiguration.class.php.

Referenced by buildClasses(), buildSchema(), and buildSchemaChanges().

MetaConfiguration::guessPattern | ( | $ | name | ) | `[private]`

Exceptions:

  | MissingElementException |

Returns:
  GenerationPattern

Definition at line 818 of file MetaConfiguration.class.php.

References Singleton::getInstance().

Here is the call graph for this function:

MetaConfiguration::isDryRun | ( |  | ) |

Definition at line 73 of file MetaConfiguration.class.php.

MetaConfiguration::isForcedGeneration | ( |  | ) |

Definition at line 58 of file MetaConfiguration.class.php.

MetaConfiguration::load | ( | $ | metafile,
|  | $ | generate = `true` |
| ) |  |  |

Returns:
  MetaConfiguration

Definition at line 91 of file MetaConfiguration.class.php.

References FetchStrategy::cascade(), checkRecursion(), checkSanity(), MetaClassType::CLASS_ABSTRACT, MetaClassType::CLASS_FINAL, getClassByName(), Assert::isFalse(), Assert::isTrue(), FetchStrategy::LAZY, loadXml(), and MetaRelation::ONE_TO_ONE.

Here is the call graph for this function:

MetaConfiguration::loadXml | ( | $ | metafile,
|  | $ | generate |
| ) |  |  | `[private]`

Definition at line 1218 of file MetaConfiguration.class.php.

Referenced by load().

MetaConfiguration::makeProperty | ( | $ | name,
|  | $ | type,
|  | MetaClass $ | class,
|  | $ | size |
| ) |  |  | `[private]`

Returns:
  MetaClassProperty

Definition at line 773 of file MetaConfiguration.class.php.

References Assert::isFalse(), and Assert::isTrue().

Here is the call graph for this function:

static MetaConfiguration::me | ( |  | ) | `[static]`

Returns:
  MetaConfiguration

Implements Instantiatable.

Definition at line 35 of file MetaConfiguration.class.php.

References Singleton::getInstance().

Referenced by EnumerationClassPattern::build(), BasePattern::buildBusiness(), BasePattern::buildDao(), BasePattern::buildProto(), buildSchemaChanges(), BasePattern::dumpFile(), ObjectType::getClass(), MetaClass::hasChilds(), and out().

Here is the call graph for this function:

static MetaConfiguration::out | ( |  | ) | `[static]`

Returns:
  MetaOutput

Definition at line 43 of file MetaConfiguration.class.php.

References me().

Referenced by BasePattern::dumpFile().

Here is the call graph for this function:

MetaConfiguration::processClasses | ( | SimpleXMLElement $ | xml,
|  | $ | metafile,
|  | $ | generate |
| ) |  |  | `[private]`

Returns:
  MetaConfiguration

Definition at line 979 of file MetaConfiguration.class.php.

References FetchStrategy::cascade(), MetaClassType::CLASS_SPOOKED, MetaClassProperty::getConvertedName(), MetaClassProperty::getFetchStrategyId(), MetaClassProperty::getRelationId(), MetaClassProperty::getType(), Assert::isFalse(), Assert::isTrue(), FetchStrategy::LAZY, FetchStrategy::lazy(), MetaRelation::makeFromName(), MetaRelation::ONE_TO_ONE, MetaClassProperty::required(), MetaClassProperty::setColumnName(), MetaClassProperty::setFetchStrategy(), and MetaClassProperty::setRelation().

Here is the call graph for this function:

MetaConfiguration::processIncludes | ( | SimpleXMLElement $ | xml,
|  | $ | metafile |
| ) |  |  | `[private]`

Returns:
  MetaConfiguration

Definition at line 955 of file MetaConfiguration.class.php.

References Assert::isTrue().

Here is the call graph for this function:

MetaConfiguration::setDryRun | ( | $ | dry | ) |

Returns:
  MetaConfiguration

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

MetaConfiguration::setForcedGeneration | ( | $ | orly | ) |

Returns:
  MetaConfiguration

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

MetaConfiguration::setOutput | ( | MetaOutput $ | out | ) |

Returns:
  MetaConfiguration

Definition at line 680 of file MetaConfiguration.class.php.

MetaConfiguration::setWithEnumerationRefIntegrityCheck | ( | $ | orly | ) |

Returns:
  MetaConfiguration

Definition at line 81 of file MetaConfiguration.class.php.

## Member Data Documentation

MetaConfiguration::$checkEnumerationRefIntegrity = false`[private]`

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

MetaConfiguration::$classes = array()`[private]`

Definition at line 19 of file MetaConfiguration.class.php.

MetaConfiguration::$defaultSource = null`[private]`

Definition at line 25 of file MetaConfiguration.class.php.

MetaConfiguration::$dryRun = false`[private]`

Definition at line 28 of file MetaConfiguration.class.php.

MetaConfiguration::$forcedGeneration = false`[private]`

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

MetaConfiguration::$liaisons = array()`[private]`

Definition at line 22 of file MetaConfiguration.class.php.

MetaConfiguration::$out = null`[private]`

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

Referenced by buildClasses(), buildSchema(), and buildSchemaChanges().

MetaConfiguration::$references = array()`[private]`

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

MetaConfiguration::$sources = array()`[private]`

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

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

- meta/classes/MetaConfiguration.class.php