/** * Sets up the Database object based on the attributes that were passed to loadFromXML(). * @see parent::loadFromXML() */ protected function setupObject() { parent::setupObject(); $this->name = $this->getAttribute("name"); $this->baseClass = $this->getAttribute("baseClass"); $this->basePeer = $this->getAttribute("basePeer"); $this->defaultIdMethod = $this->getAttribute("defaultIdMethod", IdMethod::NATIVE); $this->defaultPhpNamingMethod = $this->getAttribute("defaultPhpNamingMethod", NameGenerator::CONV_METHOD_UNDERSCORE); $this->defaultTranslateMethod = $this->getAttribute("defaultTranslateMethod", Validator::TRANSLATE_NONE); $this->heavyIndexing = $this->booleanValue($this->getAttribute("heavyIndexing")); $this->tablePrefix = $this->getAttribute('tablePrefix', $this->getBuildProperty('tablePrefix')); $this->defaultStringFormat = $this->getAttribute('defaultStringFormat', 'YAML'); }
/** * Sets up the Rule object based on the attributes that were passed to loadFromXML(). * @see parent::loadFromXML() */ public function setupObject() { parent::setupObject(); $this->commonName = $this->getDatabase()->getTablePrefix() . $this->getAttribute("name"); // retrieves the method for converting from specified name to a PHP name. $this->phpNamingMethod = $this->getAttribute("phpNamingMethod", $this->getDatabase()->getDefaultPhpNamingMethod()); $this->phpName = $this->getAttribute("phpName", $this->buildPhpName($this->getStdSeparatedName())); $this->idMethod = $this->getAttribute("idMethod", $this->getDatabase()->getDefaultIdMethod()); $this->allowPkInsert = $this->booleanValue($this->getAttribute("allowPkInsert")); $this->skipSql = $this->booleanValue($this->getAttribute("skipSql")); $this->readOnly = $this->booleanValue($this->getAttribute("readOnly")); $this->abstractValue = $this->booleanValue($this->getAttribute("abstract")); $this->baseClass = $this->getAttribute("baseClass"); $this->basePeer = $this->getAttribute("basePeer"); $this->alias = $this->getAttribute("alias"); $this->heavyIndexing = $this->booleanValue($this->getAttribute("heavyIndexing")) || "false" !== $this->getAttribute("heavyIndexing") && $this->getDatabase()->isHeavyIndexing(); $this->description = $this->getAttribute("description"); $this->interface = $this->getAttribute("interface"); // sic ('interface' is reserved word) $this->reloadOnInsert = $this->booleanValue($this->getAttribute("reloadOnInsert")); $this->reloadOnUpdate = $this->booleanValue($this->getAttribute("reloadOnUpdate")); $this->isCrossRef = $this->booleanValue($this->getAttribute("isCrossRef", false)); $this->defaultStringFormat = $this->getAttribute('defaultStringFormat'); }