$values = substr($values, 0, strlen($values) - 3);
}
- $build .= " \$this->setAttribute(IPF_ORM::ATTR_" . strtoupper($key) . ", " . $values . ");" . PHP_EOL;
+ $build .= " \$table->setAttribute(IPF_ORM::ATTR_" . strtoupper($key) . ", " . $values . ");" . PHP_EOL;
}
return $build;
{
$build = '';
foreach ($options as $name => $value) {
- $build .= " \$this->option('$name', " . self::varExport($value) . ");" . PHP_EOL;
+ $build .= " \$table->setOption('$name', " . self::varExport($value) . ");" . PHP_EOL;
}
-
return $build;
}
return $this->_table;
}
- public function setAttribute($attr, $value)
- {
- $this->_table->setAttribute($attr, $value);
- }
-
public function setInheritanceMap($map)
{
$this->_table->setOption('inheritanceMap', $map);
}
}
- public function option($name, $value = null)
- {
- if ($value === null) {
- if (is_array($name)) {
- foreach ($name as $k => $v) {
- $this->_table->setOption($k, $v);
- }
- } else {
- return $this->_table->getOption($name);
- }
- } else {
- $this->_table->setOption($name, $value);
- }
- }
-
public function ownsOne()
{
$this->_table->bind(func_get_args(), IPF_ORM_Relation::ONE_COMPOSITE);