repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
propelorm/Propel2 | src/Propel/Runtime/Formatter/AbstractFormatter.php | AbstractFormatter.getCollection | protected function getCollection()
{
$collection = [];
$class = $this->getCollectionClassName();
if ($class) {
/** @var Collection $collection */
$collection = new $class();
$collection->setModel($this->class);
$collection->setFormatter($this)... | php | protected function getCollection()
{
$collection = [];
$class = $this->getCollectionClassName();
if ($class) {
/** @var Collection $collection */
$collection = new $class();
$collection->setModel($this->class);
$collection->setFormatter($this)... | [
"protected",
"function",
"getCollection",
"(",
")",
"{",
"$",
"collection",
"=",
"[",
"]",
";",
"$",
"class",
"=",
"$",
"this",
"->",
"getCollectionClassName",
"(",
")",
";",
"if",
"(",
"$",
"class",
")",
"{",
"/** @var Collection $collection */",
"$",
"co... | Returns a Collection object or a simple array.
@return Collection|array | [
"Returns",
"a",
"Collection",
"object",
"or",
"a",
"simple",
"array",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Formatter/AbstractFormatter.php#L164-L177 |
propelorm/Propel2 | src/Propel/Runtime/Formatter/AbstractFormatter.php | AbstractFormatter.getSingleObjectFromRow | public function getSingleObjectFromRow($row, $class, &$col = 0)
{
$obj = new $class();
$col = $obj->hydrate($row, $col, false, $this->getDataFetcher()->getIndexType());
return $obj;
} | php | public function getSingleObjectFromRow($row, $class, &$col = 0)
{
$obj = new $class();
$col = $obj->hydrate($row, $col, false, $this->getDataFetcher()->getIndexType());
return $obj;
} | [
"public",
"function",
"getSingleObjectFromRow",
"(",
"$",
"row",
",",
"$",
"class",
",",
"&",
"$",
"col",
"=",
"0",
")",
"{",
"$",
"obj",
"=",
"new",
"$",
"class",
"(",
")",
";",
"$",
"col",
"=",
"$",
"obj",
"->",
"hydrate",
"(",
"$",
"row",
",... | Gets a Propel object hydrated from a selection of columns in statement row
@param array $row associative array indexed by column number,
as returned by DataFetcher::fetch()
@param string $class The classname of the object to create
@param int $col The start column for the hydration (modified)
@return ActiveRe... | [
"Gets",
"a",
"Propel",
"object",
"hydrated",
"from",
"a",
"selection",
"of",
"columns",
"in",
"statement",
"row"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Formatter/AbstractFormatter.php#L238-L244 |
propelorm/Propel2 | src/Propel/Generator/Command/ConfigConvertCommand.php | ConfigConvertCommand.configure | protected function configure()
{
$this
->addOption('config-dir', null, InputOption::VALUE_REQUIRED, 'The directory where the configuration file is placed.', self::DEFAULT_CONFIG_DIRECTORY)
->addOption('output-dir', null, InputOption::VALUE_REQUIRED, 'The output directory')
... | php | protected function configure()
{
$this
->addOption('config-dir', null, InputOption::VALUE_REQUIRED, 'The directory where the configuration file is placed.', self::DEFAULT_CONFIG_DIRECTORY)
->addOption('output-dir', null, InputOption::VALUE_REQUIRED, 'The output directory')
... | [
"protected",
"function",
"configure",
"(",
")",
"{",
"$",
"this",
"->",
"addOption",
"(",
"'config-dir'",
",",
"null",
",",
"InputOption",
"::",
"VALUE_REQUIRED",
",",
"'The directory where the configuration file is placed.'",
",",
"self",
"::",
"DEFAULT_CONFIG_DIRECTOR... | {@inheritdoc} | [
"{"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Command/ConfigConvertCommand.php#L27-L37 |
propelorm/Propel2 | src/Propel/Generator/Command/ConfigConvertCommand.php | ConfigConvertCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$configManager = new ConfigurationManager($input->getOption('config-dir'));
if (!$input->getOption('output-dir')) {
$input->setOption('output-dir', $configManager->getSection('paths')['phpConfDir']);
}
... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$configManager = new ConfigurationManager($input->getOption('config-dir'));
if (!$input->getOption('output-dir')) {
$input->setOption('output-dir', $configManager->getSection('paths')['phpConfDir']);
}
... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"configManager",
"=",
"new",
"ConfigurationManager",
"(",
"$",
"input",
"->",
"getOption",
"(",
"'config-dir'",
")",
")",
";",
"if",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Command/ConfigConvertCommand.php#L42-L80 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setAddedColumns | public function setAddedColumns(array $columns)
{
$this->addedColumns = [];
foreach ($columns as $column) {
$this->addAddedColumn($column->getName(), $column);
}
} | php | public function setAddedColumns(array $columns)
{
$this->addedColumns = [];
foreach ($columns as $column) {
$this->addAddedColumn($column->getName(), $column);
}
} | [
"public",
"function",
"setAddedColumns",
"(",
"array",
"$",
"columns",
")",
"{",
"$",
"this",
"->",
"addedColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"columns",
"as",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addAddedColumn",
"(",
"$",
"colum... | Sets the added columns.
@param Column[] $columns | [
"Sets",
"the",
"added",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L207-L213 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setRemovedColumns | public function setRemovedColumns(array $removedColumns)
{
$this->removedColumns = [];
foreach ($removedColumns as $removedColumn) {
$this->addRemovedColumn($removedColumn->getName(), $removedColumn);
}
} | php | public function setRemovedColumns(array $removedColumns)
{
$this->removedColumns = [];
foreach ($removedColumns as $removedColumn) {
$this->addRemovedColumn($removedColumn->getName(), $removedColumn);
}
} | [
"public",
"function",
"setRemovedColumns",
"(",
"array",
"$",
"removedColumns",
")",
"{",
"$",
"this",
"->",
"removedColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"removedColumns",
"as",
"$",
"removedColumn",
")",
"{",
"$",
"this",
"->",
"addRemovedColu... | Setter for the removedColumns property
@param Column[] $removedColumns | [
"Setter",
"for",
"the",
"removedColumns",
"property"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L266-L272 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setModifiedColumns | public function setModifiedColumns(array $modifiedColumns)
{
$this->modifiedColumns = [];
foreach ($modifiedColumns as $columnName => $modifiedColumn) {
$this->addModifiedColumn($columnName, $modifiedColumn);
}
} | php | public function setModifiedColumns(array $modifiedColumns)
{
$this->modifiedColumns = [];
foreach ($modifiedColumns as $columnName => $modifiedColumn) {
$this->addModifiedColumn($columnName, $modifiedColumn);
}
} | [
"public",
"function",
"setModifiedColumns",
"(",
"array",
"$",
"modifiedColumns",
")",
"{",
"$",
"this",
"->",
"modifiedColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"modifiedColumns",
"as",
"$",
"columnName",
"=>",
"$",
"modifiedColumn",
")",
"{",
"$",... | Sets the list of modified columns.
@param ColumnDiff[] $modifiedColumns An associative array of ColumnDiff objects | [
"Sets",
"the",
"list",
"of",
"modified",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L324-L330 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setRenamedColumns | public function setRenamedColumns(array $renamedColumns)
{
$this->renamedColumns = [];
foreach ($renamedColumns as $columns) {
list($fromColumn, $toColumn) = $columns;
$this->addRenamedColumn($fromColumn, $toColumn);
}
} | php | public function setRenamedColumns(array $renamedColumns)
{
$this->renamedColumns = [];
foreach ($renamedColumns as $columns) {
list($fromColumn, $toColumn) = $columns;
$this->addRenamedColumn($fromColumn, $toColumn);
}
} | [
"public",
"function",
"setRenamedColumns",
"(",
"array",
"$",
"renamedColumns",
")",
"{",
"$",
"this",
"->",
"renamedColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"renamedColumns",
"as",
"$",
"columns",
")",
"{",
"list",
"(",
"$",
"fromColumn",
",",
... | Sets the list of renamed columns.
@param array $renamedColumns | [
"Sets",
"the",
"list",
"of",
"renamed",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L358-L365 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setAddedPkColumns | public function setAddedPkColumns(array $addedPkColumns)
{
$this->addedPkColumns = [];
foreach ($addedPkColumns as $addedPkColumn) {
$this->addAddedPkColumn($addedPkColumn->getName(), $addedPkColumn);
}
} | php | public function setAddedPkColumns(array $addedPkColumns)
{
$this->addedPkColumns = [];
foreach ($addedPkColumns as $addedPkColumn) {
$this->addAddedPkColumn($addedPkColumn->getName(), $addedPkColumn);
}
} | [
"public",
"function",
"setAddedPkColumns",
"(",
"array",
"$",
"addedPkColumns",
")",
"{",
"$",
"this",
"->",
"addedPkColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"addedPkColumns",
"as",
"$",
"addedPkColumn",
")",
"{",
"$",
"this",
"->",
"addAddedPkColu... | Sets the list of added primary key columns.
@param Column[] $addedPkColumns | [
"Sets",
"the",
"list",
"of",
"added",
"primary",
"key",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L393-L399 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.addAddedPkColumn | public function addAddedPkColumn($columnName, Column $addedPkColumn)
{
if (!$addedPkColumn->isPrimaryKey()) {
throw new DiffException(sprintf('Column %s is not a valid primary key column.', $columnName));
}
$this->addedPkColumns[$columnName] = $addedPkColumn;
} | php | public function addAddedPkColumn($columnName, Column $addedPkColumn)
{
if (!$addedPkColumn->isPrimaryKey()) {
throw new DiffException(sprintf('Column %s is not a valid primary key column.', $columnName));
}
$this->addedPkColumns[$columnName] = $addedPkColumn;
} | [
"public",
"function",
"addAddedPkColumn",
"(",
"$",
"columnName",
",",
"Column",
"$",
"addedPkColumn",
")",
"{",
"if",
"(",
"!",
"$",
"addedPkColumn",
"->",
"isPrimaryKey",
"(",
")",
")",
"{",
"throw",
"new",
"DiffException",
"(",
"sprintf",
"(",
"'Column %s... | Add an added Pk column
@param string $columnName
@param Column $addedPkColumn | [
"Add",
"an",
"added",
"Pk",
"column"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L407-L414 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setRemovedPkColumns | public function setRemovedPkColumns(array $removedPkColumns)
{
$this->removedPkColumns = [];
foreach ($removedPkColumns as $removedPkColumn) {
$this->addRemovedPkColumn($removedPkColumn->getName(), $removedPkColumn);
}
} | php | public function setRemovedPkColumns(array $removedPkColumns)
{
$this->removedPkColumns = [];
foreach ($removedPkColumns as $removedPkColumn) {
$this->addRemovedPkColumn($removedPkColumn->getName(), $removedPkColumn);
}
} | [
"public",
"function",
"setRemovedPkColumns",
"(",
"array",
"$",
"removedPkColumns",
")",
"{",
"$",
"this",
"->",
"removedPkColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"removedPkColumns",
"as",
"$",
"removedPkColumn",
")",
"{",
"$",
"this",
"->",
"addR... | Sets the list of removed primary key columns.
@param Column[] $removedPkColumns | [
"Sets",
"the",
"list",
"of",
"removed",
"primary",
"key",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L443-L449 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setRenamedPkColumns | public function setRenamedPkColumns(array $renamedPkColumns)
{
$this->renamedPkColumns = [];
foreach ($renamedPkColumns as $columns) {
list($fromColumn, $toColumn) = $columns;
$this->addRenamedPkColumn($fromColumn, $toColumn);
}
} | php | public function setRenamedPkColumns(array $renamedPkColumns)
{
$this->renamedPkColumns = [];
foreach ($renamedPkColumns as $columns) {
list($fromColumn, $toColumn) = $columns;
$this->addRenamedPkColumn($fromColumn, $toColumn);
}
} | [
"public",
"function",
"setRenamedPkColumns",
"(",
"array",
"$",
"renamedPkColumns",
")",
"{",
"$",
"this",
"->",
"renamedPkColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"renamedPkColumns",
"as",
"$",
"columns",
")",
"{",
"list",
"(",
"$",
"fromColumn",
... | Sets the list of all renamed primary key columns.
@param Column[] $renamedPkColumns | [
"Sets",
"the",
"list",
"of",
"all",
"renamed",
"primary",
"key",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L489-L496 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setAddedIndices | public function setAddedIndices(array $addedIndices)
{
$this->addedIndices = [];
foreach ($addedIndices as $addedIndex) {
$this->addAddedIndex($addedIndex->getName(), $addedIndex);
}
} | php | public function setAddedIndices(array $addedIndices)
{
$this->addedIndices = [];
foreach ($addedIndices as $addedIndex) {
$this->addAddedIndex($addedIndex->getName(), $addedIndex);
}
} | [
"public",
"function",
"setAddedIndices",
"(",
"array",
"$",
"addedIndices",
")",
"{",
"$",
"this",
"->",
"addedIndices",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"addedIndices",
"as",
"$",
"addedIndex",
")",
"{",
"$",
"this",
"->",
"addAddedIndex",
"(",
... | Sets the list of new added indices.
@param Index[] $addedIndices | [
"Sets",
"the",
"list",
"of",
"new",
"added",
"indices",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L534-L540 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setRemovedIndices | public function setRemovedIndices(array $removedIndices)
{
$this->removedIndices = [];
foreach ($removedIndices as $removedIndex) {
$this->addRemovedIndex($removedIndex->getName(), $removedIndex);
}
} | php | public function setRemovedIndices(array $removedIndices)
{
$this->removedIndices = [];
foreach ($removedIndices as $removedIndex) {
$this->addRemovedIndex($removedIndex->getName(), $removedIndex);
}
} | [
"public",
"function",
"setRemovedIndices",
"(",
"array",
"$",
"removedIndices",
")",
"{",
"$",
"this",
"->",
"removedIndices",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"removedIndices",
"as",
"$",
"removedIndex",
")",
"{",
"$",
"this",
"->",
"addRemovedIndex... | Sets the list of removed indices.
@param Index[] $removedIndices | [
"Sets",
"the",
"list",
"of",
"removed",
"indices",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L568-L574 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setModifiedIndices | public function setModifiedIndices(array $modifiedIndices)
{
$this->modifiedIndices = [];
foreach ($modifiedIndices as $indices) {
list($fromIndex, $toIndex) = $indices;
$this->addModifiedIndex($fromIndex->getName(), $fromIndex, $toIndex);
}
} | php | public function setModifiedIndices(array $modifiedIndices)
{
$this->modifiedIndices = [];
foreach ($modifiedIndices as $indices) {
list($fromIndex, $toIndex) = $indices;
$this->addModifiedIndex($fromIndex->getName(), $fromIndex, $toIndex);
}
} | [
"public",
"function",
"setModifiedIndices",
"(",
"array",
"$",
"modifiedIndices",
")",
"{",
"$",
"this",
"->",
"modifiedIndices",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"modifiedIndices",
"as",
"$",
"indices",
")",
"{",
"list",
"(",
"$",
"fromIndex",
","... | Sets the list of modified indices.
Array must be [ [ Index $fromIndex, Index $toIndex ], [ ... ] ]
@param Index[] $modifiedIndices An aray of modified indices | [
"Sets",
"the",
"list",
"of",
"modified",
"indices",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L604-L611 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setAddedFks | public function setAddedFks(array $addedFks)
{
$this->addedFks = [];
foreach ($addedFks as $addedFk) {
$this->addAddedFk($addedFk->getName(), $addedFk);
}
} | php | public function setAddedFks(array $addedFks)
{
$this->addedFks = [];
foreach ($addedFks as $addedFk) {
$this->addAddedFk($addedFk->getName(), $addedFk);
}
} | [
"public",
"function",
"setAddedFks",
"(",
"array",
"$",
"addedFks",
")",
"{",
"$",
"this",
"->",
"addedFks",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"addedFks",
"as",
"$",
"addedFk",
")",
"{",
"$",
"this",
"->",
"addAddedFk",
"(",
"$",
"addedFk",
"-... | Sets the list of added foreign keys.
@param ForeignKey[] $addedFks | [
"Sets",
"the",
"list",
"of",
"added",
"foreign",
"keys",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L640-L646 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setRemovedFks | public function setRemovedFks(array $removedFks)
{
$this->removedFks = [];
foreach ($removedFks as $removedFk) {
$this->addRemovedFk($removedFk->getName(), $removedFk);
}
} | php | public function setRemovedFks(array $removedFks)
{
$this->removedFks = [];
foreach ($removedFks as $removedFk) {
$this->addRemovedFk($removedFk->getName(), $removedFk);
}
} | [
"public",
"function",
"setRemovedFks",
"(",
"array",
"$",
"removedFks",
")",
"{",
"$",
"this",
"->",
"removedFks",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"removedFks",
"as",
"$",
"removedFk",
")",
"{",
"$",
"this",
"->",
"addRemovedFk",
"(",
"$",
"re... | Sets the list of removed foreign keys.
@param ForeignKey[] $removedFks | [
"Sets",
"the",
"list",
"of",
"removed",
"foreign",
"keys",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L686-L692 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.setModifiedFks | public function setModifiedFks(array $modifiedFks)
{
$this->modifiedFks = [];
foreach ($modifiedFks as $foreignKeys) {
list($fromForeignKey, $toForeignKey) = $foreignKeys;
$this->addModifiedFk($fromForeignKey->getName(), $fromForeignKey, $toForeignKey);
}
} | php | public function setModifiedFks(array $modifiedFks)
{
$this->modifiedFks = [];
foreach ($modifiedFks as $foreignKeys) {
list($fromForeignKey, $toForeignKey) = $foreignKeys;
$this->addModifiedFk($fromForeignKey->getName(), $fromForeignKey, $toForeignKey);
}
} | [
"public",
"function",
"setModifiedFks",
"(",
"array",
"$",
"modifiedFks",
")",
"{",
"$",
"this",
"->",
"modifiedFks",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"modifiedFks",
"as",
"$",
"foreignKeys",
")",
"{",
"list",
"(",
"$",
"fromForeignKey",
",",
"$"... | Sets the list of modified foreign keys.
Array must be [ [ ForeignKey $fromFk, ForeignKey $toFk ], [ ... ] ]
@param ForeignKey[] $modifiedFks | [
"Sets",
"the",
"list",
"of",
"modified",
"foreign",
"keys",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L732-L739 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.addModifiedFk | public function addModifiedFk($fkName, ForeignKey $fromFk, ForeignKey $toFk)
{
$this->modifiedFks[$fkName] = [ $fromFk, $toFk ];
} | php | public function addModifiedFk($fkName, ForeignKey $fromFk, ForeignKey $toFk)
{
$this->modifiedFks[$fkName] = [ $fromFk, $toFk ];
} | [
"public",
"function",
"addModifiedFk",
"(",
"$",
"fkName",
",",
"ForeignKey",
"$",
"fromFk",
",",
"ForeignKey",
"$",
"toFk",
")",
"{",
"$",
"this",
"->",
"modifiedFks",
"[",
"$",
"fkName",
"]",
"=",
"[",
"$",
"fromFk",
",",
"$",
"toFk",
"]",
";",
"}"... | Adds a modified foreign key.
@param string $fkName
@param ForeignKey $fromFk
@param ForeignKey $toFk | [
"Adds",
"a",
"modified",
"foreign",
"key",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L748-L751 |
propelorm/Propel2 | src/Propel/Generator/Model/Diff/TableDiff.php | TableDiff.getReverseDiff | public function getReverseDiff()
{
$diff = new self();
// tables
$diff->setFromTable($this->toTable);
$diff->setToTable($this->fromTable);
// columns
if ($this->hasAddedColumns()) {
$diff->setRemovedColumns($this->addedColumns);
}
if ($t... | php | public function getReverseDiff()
{
$diff = new self();
// tables
$diff->setFromTable($this->toTable);
$diff->setToTable($this->fromTable);
// columns
if ($this->hasAddedColumns()) {
$diff->setRemovedColumns($this->addedColumns);
}
if ($t... | [
"public",
"function",
"getReverseDiff",
"(",
")",
"{",
"$",
"diff",
"=",
"new",
"self",
"(",
")",
";",
"// tables",
"$",
"diff",
"->",
"setFromTable",
"(",
"$",
"this",
"->",
"toTable",
")",
";",
"$",
"diff",
"->",
"setToTable",
"(",
"$",
"this",
"->... | Returns the reverse diff for this diff.
@return TableDiff | [
"Returns",
"the",
"reverse",
"diff",
"for",
"this",
"diff",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Diff/TableDiff.php#L911-L996 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.getDefaultValueString | protected function getDefaultValueString(Column $column)
{
$defaultValue = var_export(null, true);
$val = $column->getPhpDefaultValue();
if (null === $val) {
return $defaultValue;
}
if ($column->isTemporalType()) {
$fmt = $this->getTemporalFormatter($... | php | protected function getDefaultValueString(Column $column)
{
$defaultValue = var_export(null, true);
$val = $column->getPhpDefaultValue();
if (null === $val) {
return $defaultValue;
}
if ($column->isTemporalType()) {
$fmt = $this->getTemporalFormatter($... | [
"protected",
"function",
"getDefaultValueString",
"(",
"Column",
"$",
"column",
")",
"{",
"$",
"defaultValue",
"=",
"var_export",
"(",
"null",
",",
"true",
")",
";",
"$",
"val",
"=",
"$",
"column",
"->",
"getPhpDefaultValue",
"(",
")",
";",
"if",
"(",
"n... | Returns the type-casted and stringified default value for the specified
Column. This only works for scalar default values currently.
@param Column $column
@throws EngineException
@return string | [
"Returns",
"the",
"type",
"-",
"casted",
"and",
"stringified",
"default",
"value",
"for",
"the",
"specified",
"Column",
".",
"This",
"only",
"works",
"for",
"scalar",
"default",
"values",
"currently",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L161-L204 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addClassOpen | protected function addClassOpen(&$script)
{
$table = $this->getTable();
$tableName = $table->getName();
$tableDesc = $table->getDescription();
if (null !== ($parentClass = $this->getBehaviorContent('parentClass')) ||
null !== ($parentClass = ClassTools::classname($this->... | php | protected function addClassOpen(&$script)
{
$table = $this->getTable();
$tableName = $table->getName();
$tableDesc = $table->getDescription();
if (null !== ($parentClass = $this->getBehaviorContent('parentClass')) ||
null !== ($parentClass = ClassTools::classname($this->... | [
"protected",
"function",
"addClassOpen",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"tableName",
"=",
"$",
"table",
"->",
"getName",
"(",
")",
";",
"$",
"tableDesc",
"=",
"$",
"table",
"... | Adds class phpdoc comment and opening of class.
@param string &$script | [
"Adds",
"class",
"phpdoc",
"comment",
"and",
"opening",
"of",
"class",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L211-L256 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addClassBody | protected function addClassBody(&$script)
{
$this->declareClassFromBuilder($this->getStubObjectBuilder());
$this->declareClassFromBuilder($this->getStubQueryBuilder());
$this->declareClassFromBuilder($this->getTableMapBuilder());
$this->declareClasses(
'\Exception',
... | php | protected function addClassBody(&$script)
{
$this->declareClassFromBuilder($this->getStubObjectBuilder());
$this->declareClassFromBuilder($this->getStubQueryBuilder());
$this->declareClassFromBuilder($this->getTableMapBuilder());
$this->declareClasses(
'\Exception',
... | [
"protected",
"function",
"addClassBody",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"declareClassFromBuilder",
"(",
"$",
"this",
"->",
"getStubObjectBuilder",
"(",
")",
")",
";",
"$",
"this",
"->",
"declareClassFromBuilder",
"(",
"$",
"this",
"->"... | Specifies the methods that are added as part of the basic OM class.
This can be overridden by subclasses that wish to add more methods.
@param string &$script
@see ObjectBuilder::addClassBody() | [
"Specifies",
"the",
"methods",
"that",
"are",
"added",
"as",
"part",
"of",
"the",
"basic",
"OM",
"class",
".",
"This",
"can",
"be",
"overridden",
"by",
"subclasses",
"that",
"wish",
"to",
"add",
"more",
"methods",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L265-L370 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addAttributes | protected function addAttributes(&$script)
{
$table = $this->getTable();
$script .= "
";
$script .= $this->renderTemplate('baseObjectAttributes');
if (!$table->isAlias()) {
$this->addColumnAttributes($script);
}
foreach ($table->getForeignKeys() as $fk... | php | protected function addAttributes(&$script)
{
$table = $this->getTable();
$script .= "
";
$script .= $this->renderTemplate('baseObjectAttributes');
if (!$table->isAlias()) {
$this->addColumnAttributes($script);
}
foreach ($table->getForeignKeys() as $fk... | [
"protected",
"function",
"addAttributes",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"script",
".=",
"\"\n\"",
";",
"$",
"script",
".=",
"$",
"this",
"->",
"renderTemplate",
"(",
"'baseObjec... | Adds class attributes.
@param string &$script | [
"Adds",
"class",
"attributes",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L405-L435 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addColumnAttributeComment | protected function addColumnAttributeComment(&$script, Column $column)
{
if ($column->isTemporalType()) {
$cptype = $this->getDateTimeClass($column);
} else {
$cptype = $column->getPhpType();
}
$clo = $column->getLowercasedName();
$script .= "
/**... | php | protected function addColumnAttributeComment(&$script, Column $column)
{
if ($column->isTemporalType()) {
$cptype = $this->getDateTimeClass($column);
} else {
$cptype = $column->getPhpType();
}
$clo = $column->getLowercasedName();
$script .= "
/**... | [
"protected",
"function",
"addColumnAttributeComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"if",
"(",
"$",
"column",
"->",
"isTemporalType",
"(",
")",
")",
"{",
"$",
"cptype",
"=",
"$",
"this",
"->",
"getDateTimeClass",
"(",
"... | Adds comment about the attribute (variable) that stores column values.
@param string &$script
@param Column $column | [
"Adds",
"comment",
"about",
"the",
"attribute",
"(",
"variable",
")",
"that",
"stores",
"column",
"values",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L470-L495 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addHookMethods | protected function addHookMethods(&$script)
{
$hooks = [];
foreach (['pre', 'post'] as $hook) {
foreach (['Insert', 'Update', 'Save', 'Delete'] as $action) {
$hooks[$hook.$action] = false === strpos($script, "function $hook.$action(");
}
}
$scr... | php | protected function addHookMethods(&$script)
{
$hooks = [];
foreach (['pre', 'post'] as $hook) {
foreach (['Insert', 'Update', 'Save', 'Delete'] as $action) {
$hooks[$hook.$action] = false === strpos($script, "function $hook.$action(");
}
}
$scr... | [
"protected",
"function",
"addHookMethods",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"hooks",
"=",
"[",
"]",
";",
"foreach",
"(",
"[",
"'pre'",
",",
"'post'",
"]",
"as",
"$",
"hook",
")",
"{",
"foreach",
"(",
"[",
"'Insert'",
",",
"'Update'",
",",
"'... | Adds the base object hook functions.
@param string &$script | [
"Adds",
"the",
"base",
"object",
"hook",
"functions",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L670-L679 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addApplyDefaultValues | protected function addApplyDefaultValues(&$script)
{
$this->addApplyDefaultValuesComment($script);
$this->addApplyDefaultValuesOpen($script);
$this->addApplyDefaultValuesBody($script);
$this->addApplyDefaultValuesClose($script);
} | php | protected function addApplyDefaultValues(&$script)
{
$this->addApplyDefaultValuesComment($script);
$this->addApplyDefaultValuesOpen($script);
$this->addApplyDefaultValuesBody($script);
$this->addApplyDefaultValuesClose($script);
} | [
"protected",
"function",
"addApplyDefaultValues",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addApplyDefaultValuesComment",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addApplyDefaultValuesOpen",
"(",
"$",
"script",
")",
";",
"$",
"this",
"... | Adds the applyDefaults() method, which is called from the constructor.
@param string &$script | [
"Adds",
"the",
"applyDefaults",
"()",
"method",
"which",
"is",
"called",
"from",
"the",
"constructor",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L686-L692 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addApplyDefaultValuesBody | protected function addApplyDefaultValuesBody(&$script)
{
$table = $this->getTable();
// FIXME - Apply support for PHP default expressions here
// see: http://propel.phpdb.org/trac/ticket/378
$colsWithDefaults = [];
foreach ($table->getColumns() as $column) {
$def... | php | protected function addApplyDefaultValuesBody(&$script)
{
$table = $this->getTable();
// FIXME - Apply support for PHP default expressions here
// see: http://propel.phpdb.org/trac/ticket/378
$colsWithDefaults = [];
foreach ($table->getColumns() as $column) {
$def... | [
"protected",
"function",
"addApplyDefaultValuesBody",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"// FIXME - Apply support for PHP default expressions here",
"// see: http://propel.phpdb.org/trac/ticket/378",
"$",
"... | Adds the function body of the applyDefault method.
@param string &$script | [
"Adds",
"the",
"function",
"body",
"of",
"the",
"applyDefault",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L727-L754 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addTemporalAccessor | protected function addTemporalAccessor(&$script, Column $column)
{
$this->addTemporalAccessorComment($script, $column);
$this->addTemporalAccessorOpen($script, $column);
$this->addTemporalAccessorBody($script, $column);
$this->addTemporalAccessorClose($script);
} | php | protected function addTemporalAccessor(&$script, Column $column)
{
$this->addTemporalAccessorComment($script, $column);
$this->addTemporalAccessorOpen($script, $column);
$this->addTemporalAccessorBody($script, $column);
$this->addTemporalAccessorClose($script);
} | [
"protected",
"function",
"addTemporalAccessor",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addTemporalAccessorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addTemporalAccessorOpen",
... | Adds a date/time/timestamp getter method.
@param string &$script
@param Column $column | [
"Adds",
"a",
"date",
"/",
"time",
"/",
"timestamp",
"getter",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L774-L780 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addTemporalAccessorComment | public function addTemporalAccessorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$dateTimeClass = $this->getDateTimeClass($column);
$handleMysqlDate = false;
if ($this->getPlatform() instanceof MysqlPlatform) {
if ($column->getType() === Prope... | php | public function addTemporalAccessorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$dateTimeClass = $this->getDateTimeClass($column);
$handleMysqlDate = false;
if ($this->getPlatform() instanceof MysqlPlatform) {
if ($column->getType() === Prope... | [
"public",
"function",
"addTemporalAccessorComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"dateTimeClass",
"=",
"$",
"this",
"->",
"getDateTimeClass",
... | Adds the comment for a temporal accessor.
@param string &$script
@param Column $column | [
"Adds",
"the",
"comment",
"for",
"a",
"temporal",
"accessor",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L788-L818 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addTemporalAccessorOpen | public function addTemporalAccessorOpen(&$script, Column $column)
{
$cfc = $column->getPhpName();
$defaultfmt = null;
$visibility = $column->getAccessorVisibility();
// Default date/time formatter strings are specified in propel config
if ($column->getType() === PropelTypes... | php | public function addTemporalAccessorOpen(&$script, Column $column)
{
$cfc = $column->getPhpName();
$defaultfmt = null;
$visibility = $column->getAccessorVisibility();
// Default date/time formatter strings are specified in propel config
if ($column->getType() === PropelTypes... | [
"public",
"function",
"addTemporalAccessorOpen",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"cfc",
"=",
"$",
"column",
"->",
"getPhpName",
"(",
")",
";",
"$",
"defaultfmt",
"=",
"null",
";",
"$",
"visibility",
"=",
"$",
"colu... | Adds the function declaration for a temporal accessor.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"declaration",
"for",
"a",
"temporal",
"accessor",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L826-L853 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.getAccessorLazyLoadSnippet | protected function getAccessorLazyLoadSnippet(Column $column)
{
if ($column->isLazyLoad()) {
$clo = $column->getLowercasedName();
$defaultValueString = 'null';
$def = $column->getDefaultValue();
if ($def !== null && !$def->isExpression()) {
$de... | php | protected function getAccessorLazyLoadSnippet(Column $column)
{
if ($column->isLazyLoad()) {
$clo = $column->getLowercasedName();
$defaultValueString = 'null';
$def = $column->getDefaultValue();
if ($def !== null && !$def->isExpression()) {
$de... | [
"protected",
"function",
"getAccessorLazyLoadSnippet",
"(",
"Column",
"$",
"column",
")",
"{",
"if",
"(",
"$",
"column",
"->",
"isLazyLoad",
"(",
")",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"defaultValueStr... | Gets accessor lazy loaded snippets.
@param Column $column
@return string | [
"Gets",
"accessor",
"lazy",
"loaded",
"snippets",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L861-L879 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addTemporalAccessorBody | protected function addTemporalAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$dateTimeClass = $this->getDateTimeClass($column);
$this->declareClasses($dateTimeClass);
$defaultfmt = null;
// Default date/time formatter strings are specified in... | php | protected function addTemporalAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$dateTimeClass = $this->getDateTimeClass($column);
$this->declareClasses($dateTimeClass);
$defaultfmt = null;
// Default date/time formatter strings are specified in... | [
"protected",
"function",
"addTemporalAccessorBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"dateTimeClass",
"=",
"$",
"this",
"->",
"getDateTimeClass",
... | Adds the body of the temporal accessor.
@param string &$script
@param Column $column | [
"Adds",
"the",
"body",
"of",
"the",
"temporal",
"accessor",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L887-L919 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addObjectAccessor | protected function addObjectAccessor(&$script, Column $column)
{
$this->addDefaultAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addObjectAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | php | protected function addObjectAccessor(&$script, Column $column)
{
$this->addDefaultAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addObjectAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | [
"protected",
"function",
"addObjectAccessor",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addDefaultAccessorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addDefaultAccessorOpen",
"(",... | Adds an object getter method.
@param string &$script
@param Column $column | [
"Adds",
"an",
"object",
"getter",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L939-L945 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addJsonAccessorComment | public function addJsonAccessorComment(&$script, Column $column)
{
$clo=$column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* ".$column->getDescription() ."
* @param bool \$asArray Returns the JSON data as array instead of object
";
if ($col... | php | public function addJsonAccessorComment(&$script, Column $column)
{
$clo=$column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* ".$column->getDescription() ."
* @param bool \$asArray Returns the JSON data as array instead of object
";
if ($col... | [
"public",
"function",
"addJsonAccessorComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**\n * Get the [$clo] column value.\n ... | Add the comment for a json accessor method (a getter).
@param string &$script
@param Column $column | [
"Add",
"the",
"comment",
"for",
"a",
"json",
"accessor",
"method",
"(",
"a",
"getter",
")",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L985-L1002 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addJsonAccessorOpen | public function addJsonAccessorOpen(&$script, Column $column)
{
$cfc = $column->getPhpName();
$visibility = $column->getAccessorVisibility();
$script .= "
".$visibility." function get$cfc(\$asArray = true";
if ($column->isLazyLoad()) {
$script .= ", ConnectionInterfa... | php | public function addJsonAccessorOpen(&$script, Column $column)
{
$cfc = $column->getPhpName();
$visibility = $column->getAccessorVisibility();
$script .= "
".$visibility." function get$cfc(\$asArray = true";
if ($column->isLazyLoad()) {
$script .= ", ConnectionInterfa... | [
"public",
"function",
"addJsonAccessorOpen",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"cfc",
"=",
"$",
"column",
"->",
"getPhpName",
"(",
")",
";",
"$",
"visibility",
"=",
"$",
"column",
"->",
"getAccessorVisibility",
"(",
")... | Adds the function declaration for a JSON accessor.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"declaration",
"for",
"a",
"JSON",
"accessor",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1010-L1023 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addArrayAccessor | protected function addArrayAccessor(&$script, Column $column)
{
$this->addDefaultAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addArrayAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | php | protected function addArrayAccessor(&$script, Column $column)
{
$this->addDefaultAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addArrayAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | [
"protected",
"function",
"addArrayAccessor",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addDefaultAccessorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addDefaultAccessorOpen",
"(",
... | Adds an array getter method.
@param string &$script
@param Column $column | [
"Adds",
"an",
"array",
"getter",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1038-L1044 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addArrayAccessorBody | protected function addArrayAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cloUnserialized = $clo.'_unserialized';
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$script .= "
if (null =... | php | protected function addArrayAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cloUnserialized = $clo.'_unserialized';
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$script .= "
if (null =... | [
"protected",
"function",
"addArrayAccessorBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"cloUnserialized",
"=",
"$",
"clo",
".",
"'_unserialized'",
";"... | Adds the function body for an array accessor method.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"body",
"for",
"an",
"array",
"accessor",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1052-L1070 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addBooleanAccessor | protected function addBooleanAccessor(&$script, Column $column)
{
$name = self::getBooleanAccessorName($column);
if (in_array($name, ClassTools::getPropelReservedMethods())) {
//TODO: Issue a warning telling the user to use default accessors
return; // Skip boolean accessors ... | php | protected function addBooleanAccessor(&$script, Column $column)
{
$name = self::getBooleanAccessorName($column);
if (in_array($name, ClassTools::getPropelReservedMethods())) {
//TODO: Issue a warning telling the user to use default accessors
return; // Skip boolean accessors ... | [
"protected",
"function",
"addBooleanAccessor",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"name",
"=",
"self",
"::",
"getBooleanAccessorName",
"(",
"$",
"column",
")",
";",
"if",
"(",
"in_array",
"(",
"$",
"name",
",",
"ClassTo... | Adds a boolean isser method.
@param string &$script
@param Column $column | [
"Adds",
"a",
"boolean",
"isser",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1078-L1089 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.getBooleanAccessorName | protected static function getBooleanAccessorName(Column $column)
{
$name = $column->getCamelCaseName();
if (!preg_match('/^(?:is|has)(?=[A-Z])/', $name)) {
$name = 'is' . ucfirst($name);
}
return $name;
} | php | protected static function getBooleanAccessorName(Column $column)
{
$name = $column->getCamelCaseName();
if (!preg_match('/^(?:is|has)(?=[A-Z])/', $name)) {
$name = 'is' . ucfirst($name);
}
return $name;
} | [
"protected",
"static",
"function",
"getBooleanAccessorName",
"(",
"Column",
"$",
"column",
")",
"{",
"$",
"name",
"=",
"$",
"column",
"->",
"getCamelCaseName",
"(",
")",
";",
"if",
"(",
"!",
"preg_match",
"(",
"'/^(?:is|has)(?=[A-Z])/'",
",",
"$",
"name",
")... | Returns the name to be used as boolean accessor name
@param Column $column
@return string | [
"Returns",
"the",
"name",
"to",
"be",
"used",
"as",
"boolean",
"accessor",
"name"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1097-L1104 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addBooleanAccessorOpen | public function addBooleanAccessorOpen(&$script, Column $column)
{
$name = self::getBooleanAccessorName($column);
$visibility = $column->getAccessorVisibility();
$script .= "
".$visibility." function $name(";
if ($column->isLazyLoad()) {
$script .= "ConnectionInterfa... | php | public function addBooleanAccessorOpen(&$script, Column $column)
{
$name = self::getBooleanAccessorName($column);
$visibility = $column->getAccessorVisibility();
$script .= "
".$visibility." function $name(";
if ($column->isLazyLoad()) {
$script .= "ConnectionInterfa... | [
"public",
"function",
"addBooleanAccessorOpen",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"name",
"=",
"self",
"::",
"getBooleanAccessorName",
"(",
"$",
"column",
")",
";",
"$",
"visibility",
"=",
"$",
"column",
"->",
"getAccess... | Adds the function declaration for a boolean accessor.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"declaration",
"for",
"a",
"boolean",
"accessor",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1112-L1125 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addBooleanAccessorBody | protected function addBooleanAccessorBody(&$script, Column $column)
{
$cfc = $column->getPhpName();
$script .= "
return \$this->get$cfc(";
if ($column->isLazyLoad()) {
$script .= '$con';
}
$script .= ");";
} | php | protected function addBooleanAccessorBody(&$script, Column $column)
{
$cfc = $column->getPhpName();
$script .= "
return \$this->get$cfc(";
if ($column->isLazyLoad()) {
$script .= '$con';
}
$script .= ");";
} | [
"protected",
"function",
"addBooleanAccessorBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"cfc",
"=",
"$",
"column",
"->",
"getPhpName",
"(",
")",
";",
"$",
"script",
".=",
"\"\n return \\$this->get$cfc(\"",
";",
"if",
"... | Adds the function body for a boolean accessor method.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"body",
"for",
"a",
"boolean",
"accessor",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1133-L1145 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addEnumAccessor | protected function addEnumAccessor(&$script, Column $column)
{
$this->addEnumAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addEnumAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | php | protected function addEnumAccessor(&$script, Column $column)
{
$this->addEnumAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addEnumAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | [
"protected",
"function",
"addEnumAccessor",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addEnumAccessorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addDefaultAccessorOpen",
"(",
"$... | Adds an enum getter method.
@param string &$script
@param Column $column | [
"Adds",
"an",
"enum",
"getter",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1153-L1159 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addEnumAccessorComment | public function addEnumAccessorComment(&$script, Column $column)
{
$clo=$column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* ".$column->getDescription();
if ($column->isLazyLoad()) {
$script .= "
* @param ConnectionInterface An ... | php | public function addEnumAccessorComment(&$script, Column $column)
{
$clo=$column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* ".$column->getDescription();
if ($column->isLazyLoad()) {
$script .= "
* @param ConnectionInterface An ... | [
"public",
"function",
"addEnumAccessorComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**\n * Get the [$clo] column value.\n ... | Add the comment for an enum accessor method.
@param string &$script
@param Column $column | [
"Add",
"the",
"comment",
"for",
"an",
"enum",
"accessor",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1167-L1183 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addEnumAccessorBody | protected function addEnumAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$script .= "
if (null === \$this->$clo) {
return null;
... | php | protected function addEnumAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$script .= "
if (null === \$this->$clo) {
return null;
... | [
"protected",
"function",
"addEnumAccessorBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"if",
"(",
"$",
"column",
"->",
"isLazyLoad",
"(",
")",
")",
"{",... | Adds the function body for an enum accessor method.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"body",
"for",
"an",
"enum",
"accessor",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1191-L1208 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addSetAccessor | protected function addSetAccessor(&$script, Column $column)
{
$this->addSetAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addSetAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | php | protected function addSetAccessor(&$script, Column $column)
{
$this->addSetAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addSetAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | [
"protected",
"function",
"addSetAccessor",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addSetAccessorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addDefaultAccessorOpen",
"(",
"$",... | Adds a SET column getter method.
@param string &$script
@param Column $column | [
"Adds",
"a",
"SET",
"column",
"getter",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1216-L1222 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addSetAccessorComment | public function addSetAccessorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* " . $column->getDescription();
if ($column->isLazyLoad()) {
$script .= "
* @param ConnectionInterface ... | php | public function addSetAccessorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* " . $column->getDescription();
if ($column->isLazyLoad()) {
$script .= "
* @param ConnectionInterface ... | [
"public",
"function",
"addSetAccessorComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**\n * Get the [$clo] column value.\n *... | Add the comment for a SET column accessor method.
@param string &$script
@param Column $column | [
"Add",
"the",
"comment",
"for",
"a",
"SET",
"column",
"accessor",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1230-L1246 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addSetAccessorBody | protected function addSetAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cloConverted = $clo . '_converted';
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$this->declareClasses(
'Pr... | php | protected function addSetAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cloConverted = $clo . '_converted';
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$this->declareClasses(
'Pr... | [
"protected",
"function",
"addSetAccessorBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"cloConverted",
"=",
"$",
"clo",
".",
"'_converted'",
";",
"if"... | Adds the function body for a SET column accessor method.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"body",
"for",
"a",
"SET",
"column",
"accessor",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1254-L1280 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addHasArrayElement | protected function addHasArrayElement(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cfc = $column->getPhpName();
$visibility = $column->getAccessorVisibility();
$singularPhpName = $column->getPhpSingularName();
$columnType = ($column->getType() === PropelT... | php | protected function addHasArrayElement(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cfc = $column->getPhpName();
$visibility = $column->getAccessorVisibility();
$singularPhpName = $column->getPhpSingularName();
$columnType = ($column->getType() === PropelT... | [
"protected",
"function",
"addHasArrayElement",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"cfc",
"=",
"$",
"column",
"->",
"getPhpName",
"(",
")",
";",... | Adds a tester method for an array column.
@param string &$script
@param Column $column | [
"Adds",
"a",
"tester",
"method",
"for",
"an",
"array",
"column",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1289-L1323 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addDefaultAccessor | protected function addDefaultAccessor(&$script, Column $column)
{
$this->addDefaultAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addDefaultAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | php | protected function addDefaultAccessor(&$script, Column $column)
{
$this->addDefaultAccessorComment($script, $column);
$this->addDefaultAccessorOpen($script, $column);
$this->addDefaultAccessorBody($script, $column);
$this->addDefaultAccessorClose($script);
} | [
"protected",
"function",
"addDefaultAccessor",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addDefaultAccessorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addDefaultAccessorOpen",
"("... | Adds a normal (non-temporal) getter method.
@param string &$script
@param Column $column | [
"Adds",
"a",
"normal",
"(",
"non",
"-",
"temporal",
")",
"getter",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1331-L1337 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addDefaultAccessorComment | public function addDefaultAccessorComment(&$script, Column $column)
{
$clo=$column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* ".$column->getDescription();
if ($column->isLazyLoad()) {
$script .= "
* @param ConnectionInterface ... | php | public function addDefaultAccessorComment(&$script, Column $column)
{
$clo=$column->getLowercasedName();
$script .= "
/**
* Get the [$clo] column value.
* ".$column->getDescription();
if ($column->isLazyLoad()) {
$script .= "
* @param ConnectionInterface ... | [
"public",
"function",
"addDefaultAccessorComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**\n * Get the [$clo] column value.\n ... | Add the comment for a default accessor method (a getter).
@param string &$script
@param Column $column | [
"Add",
"the",
"comment",
"for",
"a",
"default",
"accessor",
"method",
"(",
"a",
"getter",
")",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1345-L1360 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addDefaultAccessorBody | protected function addDefaultAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$script .= "
return \$this->$clo;";
} | php | protected function addDefaultAccessorBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
if ($column->isLazyLoad()) {
$script .= $this->getAccessorLazyLoadSnippet($column);
}
$script .= "
return \$this->$clo;";
} | [
"protected",
"function",
"addDefaultAccessorBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"if",
"(",
"$",
"column",
"->",
"isLazyLoad",
"(",
")",
")",
"... | Adds the function body for a default accessor method.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"body",
"for",
"a",
"default",
"accessor",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1389-L1398 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addLazyLoader | protected function addLazyLoader(&$script, Column $column)
{
$this->addLazyLoaderComment($script, $column);
$this->addLazyLoaderOpen($script, $column);
$this->addLazyLoaderBody($script, $column);
$this->addLazyLoaderClose($script);
} | php | protected function addLazyLoader(&$script, Column $column)
{
$this->addLazyLoaderComment($script, $column);
$this->addLazyLoaderOpen($script, $column);
$this->addLazyLoaderBody($script, $column);
$this->addLazyLoaderClose($script);
} | [
"protected",
"function",
"addLazyLoader",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addLazyLoaderComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addLazyLoaderOpen",
"(",
"$",
"scr... | Adds the lazy loader method.
@param string &$script
@param Column $column | [
"Adds",
"the",
"lazy",
"loader",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1418-L1424 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addLazyLoaderBody | protected function addLazyLoaderBody(&$script, Column $column)
{
$platform = $this->getPlatform();
$clo = $column->getLowercasedName();
// pdo_sqlsrv driver requires the use of PDOStatement::bindColumn() or a hex string will be returned
if ($column->getType() === PropelTypes::BLOB &... | php | protected function addLazyLoaderBody(&$script, Column $column)
{
$platform = $this->getPlatform();
$clo = $column->getLowercasedName();
// pdo_sqlsrv driver requires the use of PDOStatement::bindColumn() or a hex string will be returned
if ($column->getType() === PropelTypes::BLOB &... | [
"protected",
"function",
"addLazyLoaderBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"platform",
"=",
"$",
"this",
"->",
"getPlatform",
"(",
")",
";",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
"... | Adds the function body for the lazy loader method.
@param string &$script
@param Column $column | [
"Adds",
"the",
"function",
"body",
"for",
"the",
"lazy",
"loader",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1470-L1534 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addMutatorOpen | protected function addMutatorOpen(&$script, Column $column)
{
$this->addMutatorComment($script, $column);
$this->addMutatorOpenOpen($script, $column);
$this->addMutatorOpenBody($script, $column);
} | php | protected function addMutatorOpen(&$script, Column $column)
{
$this->addMutatorComment($script, $column);
$this->addMutatorOpenOpen($script, $column);
$this->addMutatorOpenBody($script, $column);
} | [
"protected",
"function",
"addMutatorOpen",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addMutatorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addMutatorOpenOpen",
"(",
"$",
"scri... | Adds the open of the mutator (setter) method for a column.
@param string &$script
@param Column $column | [
"Adds",
"the",
"open",
"of",
"the",
"mutator",
"(",
"setter",
")",
"method",
"for",
"a",
"column",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1553-L1558 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addJsonMutatorOpen | protected function addJsonMutatorOpen(&$script, Column $column)
{
$this->addJsonMutatorComment($script, $column);
$this->addMutatorOpenOpen($script, $column);
$this->addMutatorOpenBody($script, $column);
} | php | protected function addJsonMutatorOpen(&$script, Column $column)
{
$this->addJsonMutatorComment($script, $column);
$this->addMutatorOpenOpen($script, $column);
$this->addMutatorOpenBody($script, $column);
} | [
"protected",
"function",
"addJsonMutatorOpen",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addJsonMutatorComment",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addMutatorOpenOpen",
"(",
"$",... | Adds the open of the mutator (setter) method for a JSON column.
@param string &$script
@param Column $column | [
"Adds",
"the",
"open",
"of",
"the",
"mutator",
"(",
"setter",
")",
"method",
"for",
"a",
"JSON",
"column",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1566-L1571 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addJsonMutatorComment | public function addJsonMutatorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$script .= "
/**
* Set the value of [$clo] column.
* ".$column->getDescription()."
* @param string|array|object \$v new value
* @return \$this|".$this->getObjectClassName(tr... | php | public function addJsonMutatorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$script .= "
/**
* Set the value of [$clo] column.
* ".$column->getDescription()."
* @param string|array|object \$v new value
* @return \$this|".$this->getObjectClassName(tr... | [
"public",
"function",
"addJsonMutatorComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**\n * Set the value of [$clo] column.\n ... | Adds the comment for a mutator.
@param string &$script
@param Column $column | [
"Adds",
"the",
"comment",
"for",
"a",
"mutator",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1579-L1589 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addMutatorComment | public function addMutatorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$script .= "
/**
* Set the value of [$clo] column.
* ".$column->getDescription()."
* @param ".($column->getPhpType() ?: 'mixed')." \$v new value
* @return \$this|".$this->getObj... | php | public function addMutatorComment(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$script .= "
/**
* Set the value of [$clo] column.
* ".$column->getDescription()."
* @param ".($column->getPhpType() ?: 'mixed')." \$v new value
* @return \$this|".$this->getObj... | [
"public",
"function",
"addMutatorComment",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**\n * Set the value of [$clo] column.\n * ... | Adds the comment for a mutator.
@param string &$script
@param Column $column | [
"Adds",
"the",
"comment",
"for",
"a",
"mutator",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1597-L1607 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addMutatorOpenOpen | public function addMutatorOpenOpen(&$script, Column $column)
{
$cfc = $column->getPhpName();
$visibility = $this->getTable()->isReadOnly() ? 'protected' : $column->getMutatorVisibility();
$typeHint = '';
$null = '';
if ($column->getTypeHint()) {
$typeHint = $col... | php | public function addMutatorOpenOpen(&$script, Column $column)
{
$cfc = $column->getPhpName();
$visibility = $this->getTable()->isReadOnly() ? 'protected' : $column->getMutatorVisibility();
$typeHint = '';
$null = '';
if ($column->getTypeHint()) {
$typeHint = $col... | [
"public",
"function",
"addMutatorOpenOpen",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"cfc",
"=",
"$",
"column",
"->",
"getPhpName",
"(",
")",
";",
"$",
"visibility",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"is... | Adds the mutator function declaration.
@param string &$script
@param Column $column | [
"Adds",
"the",
"mutator",
"function",
"declaration",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1615-L1639 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addMutatorOpenBody | protected function addMutatorOpenBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cfc = $column->getPhpName();
if ($column->isLazyLoad()) {
$script .= "
// explicitly set the is-loaded flag to true for this lazy load col;
// it doesn't matter... | php | protected function addMutatorOpenBody(&$script, Column $column)
{
$clo = $column->getLowercasedName();
$cfc = $column->getPhpName();
if ($column->isLazyLoad()) {
$script .= "
// explicitly set the is-loaded flag to true for this lazy load col;
// it doesn't matter... | [
"protected",
"function",
"addMutatorOpenBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"clo",
"=",
"$",
"column",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"cfc",
"=",
"$",
"column",
"->",
"getPhpName",
"(",
")",
";",... | Adds the mutator open body part.
@param string &$script
@param Column $column | [
"Adds",
"the",
"mutator",
"open",
"body",
"part",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1647-L1660 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addMutatorClose | protected function addMutatorClose(&$script, Column $column)
{
$this->addMutatorCloseBody($script, $column);
$this->addMutatorCloseClose($script, $column);
} | php | protected function addMutatorClose(&$script, Column $column)
{
$this->addMutatorCloseBody($script, $column);
$this->addMutatorCloseClose($script, $column);
} | [
"protected",
"function",
"addMutatorClose",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"addMutatorCloseBody",
"(",
"$",
"script",
",",
"$",
"column",
")",
";",
"$",
"this",
"->",
"addMutatorCloseClose",
"(",
"$",
... | Adds the close of the mutator (setter) method for a column.
@param string &$script
@param Column $column | [
"Adds",
"the",
"close",
"of",
"the",
"mutator",
"(",
"setter",
")",
"method",
"for",
"a",
"column",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1668-L1672 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addMutatorCloseBody | protected function addMutatorCloseBody(&$script, Column $column)
{
$table = $this->getTable();
if ($column->isForeignKey()) {
foreach ($column->getForeignKeys() as $fk) {
$tblFK = $table->getDatabase()->getTable($fk->getForeignTableName());
$colFK = $t... | php | protected function addMutatorCloseBody(&$script, Column $column)
{
$table = $this->getTable();
if ($column->isForeignKey()) {
foreach ($column->getForeignKeys() as $fk) {
$tblFK = $table->getDatabase()->getTable($fk->getForeignTableName());
$colFK = $t... | [
"protected",
"function",
"addMutatorCloseBody",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"column",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"if",
"(",
"$",
"column",
"->",
"isForeignKey",
"(",
")",
")",
"{",
"for... | Adds the body of the close part of a mutator.
@param string &$script
@param Column $column | [
"Adds",
"the",
"body",
"of",
"the",
"close",
"part",
"of",
"a",
"mutator",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1680-L1739 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addLobMutator | protected function addLobMutator(&$script, Column $col)
{
$this->addMutatorOpen($script, $col);
$clo = $col->getLowercasedName();
$script .= "
// Because BLOB columns are streams in PDO we have to assume that they are
// always modified when a new value is passed in. For exa... | php | protected function addLobMutator(&$script, Column $col)
{
$this->addMutatorOpen($script, $col);
$clo = $col->getLowercasedName();
$script .= "
// Because BLOB columns are streams in PDO we have to assume that they are
// always modified when a new value is passed in. For exa... | [
"protected",
"function",
"addLobMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"this",
"->",
"addMutatorOpen",
"(",
"$",
"script",
",",
"$",
"col",
")",
";",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
"... | Adds a setter for BLOB columns.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"a",
"setter",
"for",
"BLOB",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1762-L1780 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addTemporalMutator | protected function addTemporalMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$dateTimeClass = $this->getDateTimeClass($col);
$this->declareClasses($dateTimeClass, '\Propel\Runtime\Util\PropelDateTime');
$this->addTemporalMutatorComment($script, $col);
$... | php | protected function addTemporalMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$dateTimeClass = $this->getDateTimeClass($col);
$this->declareClasses($dateTimeClass, '\Propel\Runtime\Util\PropelDateTime');
$this->addTemporalMutatorComment($script, $col);
$... | [
"protected",
"function",
"addTemporalMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"dateTimeClass",
"=",
"$",
"this",
"->",
"getDateTimeClass",
"(",
"$"... | Adds a setter method for date/time/timestamp columns.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"a",
"setter",
"method",
"for",
"date",
"/",
"time",
"/",
"timestamp",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1788-L1834 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addJsonMutator | protected function addJsonMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addJsonMutatorOpen($script, $col);
$script .= "
if (is_string(\$v)) {
// JSON as string needs to be decoded/encoded to get a reliable comparison (spaces, ...)
... | php | protected function addJsonMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addJsonMutatorOpen($script, $col);
$script .= "
if (is_string(\$v)) {
// JSON as string needs to be decoded/encoded to get a reliable comparison (spaces, ...)
... | [
"protected",
"function",
"addJsonMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"this",
"->",
"addJsonMutatorOpen",
"(",
"$",
"script",
",",
"$",
"col"... | Adds a setter for Json columns.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"a",
"setter",
"for",
"Json",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1880-L1898 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addArrayMutator | protected function addArrayMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$cloUnserialized = $clo.'_unserialized';
$this->addMutatorOpen($script, $col);
$script .= "
if (\$this->$cloUnserialized !== \$v) {
\$this->$cloUnserialized = \$v;
... | php | protected function addArrayMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$cloUnserialized = $clo.'_unserialized';
$this->addMutatorOpen($script, $col);
$script .= "
if (\$this->$cloUnserialized !== \$v) {
\$this->$cloUnserialized = \$v;
... | [
"protected",
"function",
"addArrayMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"cloUnserialized",
"=",
"$",
"clo",
".",
"'_unserialized'",
";",
"$",
... | Adds a setter for Array columns.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"a",
"setter",
"for",
"Array",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1906-L1920 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addAddArrayElement | protected function addAddArrayElement(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$cfc = $col->getPhpName();
$visibility = $col->getAccessorVisibility();
$singularPhpName = $col->getPhpSingularName();
$columnType = ($col->getType() === PropelTypes::PHP_ARRAY) ?... | php | protected function addAddArrayElement(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$cfc = $col->getPhpName();
$visibility = $col->getAccessorVisibility();
$singularPhpName = $col->getPhpSingularName();
$columnType = ($col->getType() === PropelTypes::PHP_ARRAY) ?... | [
"protected",
"function",
"addAddArrayElement",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"cfc",
"=",
"$",
"col",
"->",
"getPhpName",
"(",
")",
";",
"$",
... | Adds a push method for an array column.
@param string &$script The script will be modified in this method.
@param Column $col The current column. | [
"Adds",
"a",
"push",
"method",
"for",
"an",
"array",
"column",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L1927-L1965 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addEnumMutator | protected function addEnumMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addEnumMutatorComment($script, $col);
$this->addMutatorOpenOpen($script, $col);
$this->addMutatorOpenBody($script, $col);
$script .= "
if (\$v !== null) {
... | php | protected function addEnumMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addEnumMutatorComment($script, $col);
$this->addMutatorOpenOpen($script, $col);
$this->addMutatorOpenBody($script, $col);
$script .= "
if (\$v !== null) {
... | [
"protected",
"function",
"addEnumMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"this",
"->",
"addEnumMutatorComment",
"(",
"$",
"script",
",",
"$",
"c... | Adds a setter for Enum columns.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"a",
"setter",
"for",
"Enum",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2021-L2043 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addSetMutator | protected function addSetMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addSetMutatorComment($script, $col);
$this->addMutatorOpenOpen($script, $col);
$this->addMutatorOpenBody($script, $col);
$cloConverted = $clo . '_converted';
$this->dec... | php | protected function addSetMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addSetMutatorComment($script, $col);
$this->addMutatorOpenOpen($script, $col);
$this->addMutatorOpenBody($script, $col);
$cloConverted = $clo . '_converted';
$this->dec... | [
"protected",
"function",
"addSetMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"this",
"->",
"addSetMutatorComment",
"(",
"$",
"script",
",",
"$",
"col... | Adds a setter for SET column mutator.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"a",
"setter",
"for",
"SET",
"column",
"mutator",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2071-L2100 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addBooleanMutator | protected function addBooleanMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addBooleanMutatorComment($script, $col);
$this->addMutatorOpenOpen($script, $col);
$this->addMutatorOpenBody($script, $col);
$script .= "
if (\$v !== null) {
... | php | protected function addBooleanMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addBooleanMutatorComment($script, $col);
$this->addMutatorOpenOpen($script, $col);
$this->addMutatorOpenBody($script, $col);
$script .= "
if (\$v !== null) {
... | [
"protected",
"function",
"addBooleanMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"this",
"->",
"addBooleanMutatorComment",
"(",
"$",
"script",
",",
"$"... | Adds setter method for boolean columns.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"setter",
"method",
"for",
"boolean",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2127-L2150 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addDefaultMutator | protected function addDefaultMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addMutatorOpen($script, $col);
// Perform type-casting to ensure that we can use type-sensitive
// checking in mutators.
if ($col->isPhpPrimitiveType()) {
$scr... | php | protected function addDefaultMutator(&$script, Column $col)
{
$clo = $col->getLowercasedName();
$this->addMutatorOpen($script, $col);
// Perform type-casting to ensure that we can use type-sensitive
// checking in mutators.
if ($col->isPhpPrimitiveType()) {
$scr... | [
"protected",
"function",
"addDefaultMutator",
"(",
"&",
"$",
"script",
",",
"Column",
"$",
"col",
")",
"{",
"$",
"clo",
"=",
"$",
"col",
"->",
"getLowercasedName",
"(",
")",
";",
"$",
"this",
"->",
"addMutatorOpen",
"(",
"$",
"script",
",",
"$",
"col",... | Adds setter method for "normal" columns.
@param string &$script The script will be modified in this method.
@param Column $col The current column.
@see parent::addColumnMutators() | [
"Adds",
"setter",
"method",
"for",
"normal",
"columns",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2175-L2198 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addHasOnlyDefaultValues | protected function addHasOnlyDefaultValues(&$script)
{
$this->addHasOnlyDefaultValuesComment($script);
$this->addHasOnlyDefaultValuesOpen($script);
$this->addHasOnlyDefaultValuesBody($script);
$this->addHasOnlyDefaultValuesClose($script);
} | php | protected function addHasOnlyDefaultValues(&$script)
{
$this->addHasOnlyDefaultValuesComment($script);
$this->addHasOnlyDefaultValuesOpen($script);
$this->addHasOnlyDefaultValuesBody($script);
$this->addHasOnlyDefaultValuesClose($script);
} | [
"protected",
"function",
"addHasOnlyDefaultValues",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addHasOnlyDefaultValuesComment",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addHasOnlyDefaultValuesOpen",
"(",
"$",
"script",
")",
";",
"$",
"this... | Adds the hasOnlyDefaultValues() method.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"hasOnlyDefaultValues",
"()",
"method",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2204-L2210 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addHasOnlyDefaultValuesBody | protected function addHasOnlyDefaultValuesBody(&$script)
{
$table = $this->getTable();
$colsWithDefaults = [];
foreach ($table->getColumns() as $col) {
$def = $col->getDefaultValue();
if ($def !== null && !$def->isExpression()) {
$colsWithDefaults[] = ... | php | protected function addHasOnlyDefaultValuesBody(&$script)
{
$table = $this->getTable();
$colsWithDefaults = [];
foreach ($table->getColumns() as $col) {
$def = $col->getDefaultValue();
if ($def !== null && !$def->isExpression()) {
$colsWithDefaults[] = ... | [
"protected",
"function",
"addHasOnlyDefaultValuesBody",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"colsWithDefaults",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"table",
"->",
"getColumns",
"("... | Adds the function body for the hasOnlyDefaultValues method
@param string &$script The script will be modified in this method.
@see addHasOnlyDefaultValues | [
"Adds",
"the",
"function",
"body",
"for",
"the",
"hasOnlyDefaultValues",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2247-L2272 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addHydrate | protected function addHydrate(&$script)
{
$this->addHydrateComment($script);
$this->addHydrateOpen($script);
$this->addHydrateBody($script);
$this->addHydrateClose($script);
} | php | protected function addHydrate(&$script)
{
$this->addHydrateComment($script);
$this->addHydrateOpen($script);
$this->addHydrateBody($script);
$this->addHydrateClose($script);
} | [
"protected",
"function",
"addHydrate",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addHydrateComment",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addHydrateOpen",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addHydrateBody",
"(",
... | Adds the hydrate() method, which sets attributes of the object based on a ResultSet.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"hydrate",
"()",
"method",
"which",
"sets",
"attributes",
"of",
"the",
"object",
"based",
"on",
"a",
"ResultSet",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2293-L2299 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addHydrateBody | protected function addHydrateBody(&$script)
{
$table = $this->getTable();
$platform = $this->getPlatform();
$tableMap = $this->getTableMapClassName();
$script .= "
try {";
$n = 0;
foreach ($table->getColumns() as $col) {
if (!$col->isLazyLoad()) ... | php | protected function addHydrateBody(&$script)
{
$table = $this->getTable();
$platform = $this->getPlatform();
$tableMap = $this->getTableMapClassName();
$script .= "
try {";
$n = 0;
foreach ($table->getColumns() as $col) {
if (!$col->isLazyLoad()) ... | [
"protected",
"function",
"addHydrateBody",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"platform",
"=",
"$",
"this",
"->",
"getPlatform",
"(",
")",
";",
"$",
"tableMap",
"=",
"$",
"this",
... | Adds the function body for the hydrate method
@param string &$script The script will be modified in this method.
@see addHydrate() | [
"Adds",
"the",
"function",
"body",
"for",
"the",
"hydrate",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2346-L2447 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addBuildPkeyCriteriaBody | protected function addBuildPkeyCriteriaBody(&$script)
{
if (!$this->getTable()->getPrimaryKey()) {
$script .= "
throw new LogicException('The {$this->getObjectName()} object has no primary key');";
return;
}
$script .= "
\$criteria = ".$this->getQuer... | php | protected function addBuildPkeyCriteriaBody(&$script)
{
if (!$this->getTable()->getPrimaryKey()) {
$script .= "
throw new LogicException('The {$this->getObjectName()} object has no primary key');";
return;
}
$script .= "
\$criteria = ".$this->getQuer... | [
"protected",
"function",
"addBuildPkeyCriteriaBody",
"(",
"&",
"$",
"script",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getPrimaryKey",
"(",
")",
")",
"{",
"$",
"script",
".=",
"\"\n throw new LogicException('The {$this->ge... | Adds the function body for the buildPkeyCriteria method
@param string &$script The script will be modified in this method.
@see addBuildPkeyCriteria() | [
"Adds",
"the",
"function",
"body",
"for",
"the",
"buildPkeyCriteria",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2512-L2528 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addBuildCriteria | protected function addBuildCriteria(&$script)
{
$this->addBuildCriteriaComment($script);
$this->addBuildCriteriaOpen($script);
$this->addBuildCriteriaBody($script);
$this->addBuildCriteriaClose($script);
} | php | protected function addBuildCriteria(&$script)
{
$this->addBuildCriteriaComment($script);
$this->addBuildCriteriaOpen($script);
$this->addBuildCriteriaBody($script);
$this->addBuildCriteriaClose($script);
} | [
"protected",
"function",
"addBuildCriteria",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addBuildCriteriaComment",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addBuildCriteriaOpen",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addBuil... | Adds the buildCriteria method
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"buildCriteria",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2548-L2554 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addBuildCriteriaBody | protected function addBuildCriteriaBody(&$script)
{
$script .= "
\$criteria = new Criteria(".$this->getTableMapClass()."::DATABASE_NAME);
";
foreach ($this->getTable()->getColumns() as $col) {
$clo = $col->getLowercasedName();
$script .= "
if (\$this->isColumn... | php | protected function addBuildCriteriaBody(&$script)
{
$script .= "
\$criteria = new Criteria(".$this->getTableMapClass()."::DATABASE_NAME);
";
foreach ($this->getTable()->getColumns() as $col) {
$clo = $col->getLowercasedName();
$script .= "
if (\$this->isColumn... | [
"protected",
"function",
"addBuildCriteriaBody",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"script",
".=",
"\"\n \\$criteria = new Criteria(\"",
".",
"$",
"this",
"->",
"getTableMapClass",
"(",
")",
".",
"\"::DATABASE_NAME);\n\"",
";",
"foreach",
"(",
"$",
"t... | Adds the function body of the buildCriteria method
@param string &$script The script will be modified in this method.
@see addBuildCriteria() | [
"Adds",
"the",
"function",
"body",
"of",
"the",
"buildCriteria",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2588-L2600 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addToArray | protected function addToArray(&$script)
{
$fks = $this->getTable()->getForeignKeys();
$referrers = $this->getTable()->getReferrers();
$hasFks = count($fks) > 0 || count($referrers) > 0;
$objectClassName = $this->getUnqualifiedClassName();
$pkGetter = $this->getTable()->hasCom... | php | protected function addToArray(&$script)
{
$fks = $this->getTable()->getForeignKeys();
$referrers = $this->getTable()->getReferrers();
$hasFks = count($fks) > 0 || count($referrers) > 0;
$objectClassName = $this->getUnqualifiedClassName();
$pkGetter = $this->getTable()->hasCom... | [
"protected",
"function",
"addToArray",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"fks",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getForeignKeys",
"(",
")",
";",
"$",
"referrers",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getRefer... | Adds the toArray method
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"toArray",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2620-L2717 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addToArrayKeyLookUp | protected function addToArrayKeyLookUp($phpName, Table $table, $plural)
{
if($phpName == "") {
$phpName = $table->getPhpName();
}
$camelCaseName = $table->getCamelCaseName();
$fieldName = $table->getName();
if ($plural) {
$phpName = $this->getPlurali... | php | protected function addToArrayKeyLookUp($phpName, Table $table, $plural)
{
if($phpName == "") {
$phpName = $table->getPhpName();
}
$camelCaseName = $table->getCamelCaseName();
$fieldName = $table->getName();
if ($plural) {
$phpName = $this->getPlurali... | [
"protected",
"function",
"addToArrayKeyLookUp",
"(",
"$",
"phpName",
",",
"Table",
"$",
"table",
",",
"$",
"plural",
")",
"{",
"if",
"(",
"$",
"phpName",
"==",
"\"\"",
")",
"{",
"$",
"phpName",
"=",
"$",
"table",
"->",
"getPhpName",
"(",
")",
";",
"}... | Adds the switch-statement for looking up the array-key name for toArray
@see toArray | [
"Adds",
"the",
"switch",
"-",
"statement",
"for",
"looking",
"up",
"the",
"array",
"-",
"key",
"name",
"for",
"toArray"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2723-L2750 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addGetByName | protected function addGetByName(&$script)
{
$this->addGetByNameComment($script);
$this->addGetByNameOpen($script);
$this->addGetByNameBody($script);
$this->addGetByNameClose($script);
} | php | protected function addGetByName(&$script)
{
$this->addGetByNameComment($script);
$this->addGetByNameOpen($script);
$this->addGetByNameBody($script);
$this->addGetByNameClose($script);
} | [
"protected",
"function",
"addGetByName",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addGetByNameComment",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addGetByNameOpen",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addGetByNameBody",
... | Adds the getByName method
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"getByName",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2756-L2762 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addGetByPosition | protected function addGetByPosition(&$script)
{
$this->addGetByPositionComment($script);
$this->addGetByPositionOpen($script);
$this->addGetByPositionBody($script);
$this->addGetByPositionClose($script);
} | php | protected function addGetByPosition(&$script)
{
$this->addGetByPositionComment($script);
$this->addGetByPositionOpen($script);
$this->addGetByPositionBody($script);
$this->addGetByPositionClose($script);
} | [
"protected",
"function",
"addGetByPosition",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addGetByPositionComment",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addGetByPositionOpen",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addGetB... | Adds the getByPosition method
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"getByPosition",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2828-L2834 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addGetByPositionBody | protected function addGetByPositionBody(&$script)
{
$table = $this->getTable();
$script .= "
switch (\$pos) {";
$i = 0;
foreach ($table->getColumns() as $col) {
$cfc = $col->getPhpName();
$script .= "
case $i:
return \$this-... | php | protected function addGetByPositionBody(&$script)
{
$table = $this->getTable();
$script .= "
switch (\$pos) {";
$i = 0;
foreach ($table->getColumns() as $col) {
$cfc = $col->getPhpName();
$script .= "
case $i:
return \$this-... | [
"protected",
"function",
"addGetByPositionBody",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"script",
".=",
"\"\n switch (\\$pos) {\"",
";",
"$",
"i",
"=",
"0",
";",
"foreach",
"(",
"$"... | Adds the function body for the getByPosition method
@param string &$script The script will be modified in this method.
@see addGetByPosition | [
"Adds",
"the",
"function",
"body",
"for",
"the",
"getByPosition",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L2870-L2889 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addDelete | protected function addDelete(&$script)
{
$this->addDeleteComment($script);
$this->addDeleteOpen($script);
$this->addDeleteBody($script);
$this->addDeleteClose($script);
} | php | protected function addDelete(&$script)
{
$this->addDeleteComment($script);
$this->addDeleteOpen($script);
$this->addDeleteBody($script);
$this->addDeleteClose($script);
} | [
"protected",
"function",
"addDelete",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addDeleteComment",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addDeleteOpen",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addDeleteBody",
"(",
"$"... | Adds a delete() method to remove the object form the datastore.
@param string &$script The script will be modified in this method. | [
"Adds",
"a",
"delete",
"()",
"method",
"to",
"remove",
"the",
"object",
"form",
"the",
"datastore",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3067-L3073 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addDeleteBody | protected function addDeleteBody(&$script)
{
$script .= "
if (\$this->isDeleted()) {
throw new PropelException(\"This object has already been deleted.\");
}
if (\$con === null) {
\$con = Propel::getServiceContainer()->getWriteConnection(".$this->getTableMapCl... | php | protected function addDeleteBody(&$script)
{
$script .= "
if (\$this->isDeleted()) {
throw new PropelException(\"This object has already been deleted.\");
}
if (\$con === null) {
\$con = Propel::getServiceContainer()->getWriteConnection(".$this->getTableMapCl... | [
"protected",
"function",
"addDeleteBody",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"script",
".=",
"\"\n if (\\$this->isDeleted()) {\n throw new PropelException(\\\"This object has already been deleted.\\\");\n }\n\n if (\\$con === null) {\n \\$con =... | Adds the function body for the delete function
@param string &$script The script will be modified in this method.
@see addDelete() | [
"Adds",
"the",
"function",
"body",
"for",
"the",
"delete",
"function"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3112-L3153 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addReload | protected function addReload(&$script)
{
$table = $this->getTable();
$script .= "
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
... | php | protected function addReload(&$script)
{
$table = $this->getTable();
$script .= "
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
... | [
"protected",
"function",
"addReload",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**\n * Reloads this object from datastore based on primary key and (optionally) resets all associat... | Adds a reload() method to re-fetch the data for this object from the database.
@param string &$script The script will be modified in this method. | [
"Adds",
"a",
"reload",
"()",
"method",
"to",
"re",
"-",
"fetch",
"the",
"data",
"for",
"this",
"object",
"from",
"the",
"database",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3171-L3254 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addManipulationMethods | protected function addManipulationMethods(&$script)
{
$this->addReload($script);
$this->addDelete($script);
$this->addSave($script);
$this->addDoSave($script);
$script .= $this->addDoInsert();
$script .= $this->addDoUpdate();
} | php | protected function addManipulationMethods(&$script)
{
$this->addReload($script);
$this->addDelete($script);
$this->addSave($script);
$this->addDoSave($script);
$script .= $this->addDoInsert();
$script .= $this->addDoUpdate();
} | [
"protected",
"function",
"addManipulationMethods",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"this",
"->",
"addReload",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addDelete",
"(",
"$",
"script",
")",
";",
"$",
"this",
"->",
"addSave",
"(",
"$",
... | Adds the methods related to refreshing, saving and deleting the object.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"methods",
"related",
"to",
"refreshing",
"saving",
"and",
"deleting",
"the",
"object",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3260-L3268 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addGetPrimaryKey | protected function addGetPrimaryKey(&$script)
{
$pkeys = $this->getTable()->getPrimaryKey();
if (count($pkeys) == 1) {
$this->addGetPrimaryKey_SinglePK($script);
} elseif (count($pkeys) > 1) {
$this->addGetPrimaryKey_MultiPK($script);
} else {
// n... | php | protected function addGetPrimaryKey(&$script)
{
$pkeys = $this->getTable()->getPrimaryKey();
if (count($pkeys) == 1) {
$this->addGetPrimaryKey_SinglePK($script);
} elseif (count($pkeys) > 1) {
$this->addGetPrimaryKey_MultiPK($script);
} else {
// n... | [
"protected",
"function",
"addGetPrimaryKey",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"pkeys",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getPrimaryKey",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"pkeys",
")",
"==",
"1",
")",
"{",
"$",
... | Adds the correct getPrimaryKey() method for this object.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"correct",
"getPrimaryKey",
"()",
"method",
"for",
"this",
"object",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3337-L3348 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addGetPrimaryKey_SinglePK | protected function addGetPrimaryKey_SinglePK(&$script)
{
$table = $this->getTable();
$pkeys = $table->getPrimaryKey();
$cptype = $pkeys[0]->getPhpType();
$script .= "
/**
* Returns the primary key for this object (row).
* @return $cptype
*/
public function get... | php | protected function addGetPrimaryKey_SinglePK(&$script)
{
$table = $this->getTable();
$pkeys = $table->getPrimaryKey();
$cptype = $pkeys[0]->getPhpType();
$script .= "
/**
* Returns the primary key for this object (row).
* @return $cptype
*/
public function get... | [
"protected",
"function",
"addGetPrimaryKey_SinglePK",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"pkeys",
"=",
"$",
"table",
"->",
"getPrimaryKey",
"(",
")",
";",
"$",
"cptype",
"=",
"$",
... | Adds the getPrimaryKey() method for tables that contain a single-column primary key.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"getPrimaryKey",
"()",
"method",
"for",
"tables",
"that",
"contain",
"a",
"single",
"-",
"column",
"primary",
"key",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3354-L3370 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addGetPrimaryKey_MultiPK | protected function addGetPrimaryKey_MultiPK(&$script)
{
$script .= "
/**
* Returns the composite primary key for this object.
* The array elements will be in same order as specified in XML.
* @return array
*/
public function getPrimaryKey()
{
\$pks = array();";
... | php | protected function addGetPrimaryKey_MultiPK(&$script)
{
$script .= "
/**
* Returns the composite primary key for this object.
* The array elements will be in same order as specified in XML.
* @return array
*/
public function getPrimaryKey()
{
\$pks = array();";
... | [
"protected",
"function",
"addGetPrimaryKey_MultiPK",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"script",
".=",
"\"\n /**\n * Returns the composite primary key for this object.\n * The array elements will be in same order as specified in XML.\n * @return array\n */\n publi... | Adds the setPrimaryKey() method for tables that contain a multi-column primary key.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"setPrimaryKey",
"()",
"method",
"for",
"tables",
"that",
"contain",
"a",
"multi",
"-",
"column",
"primary",
"key",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3376-L3399 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addSetPrimaryKey | protected function addSetPrimaryKey(&$script)
{
$pkeys = $this->getTable()->getPrimaryKey();
if (count($pkeys) == 1) {
$this->addSetPrimaryKey_SinglePK($script);
} elseif (count($pkeys) > 1) {
$this->addSetPrimaryKey_MultiPK($script);
} else {
// n... | php | protected function addSetPrimaryKey(&$script)
{
$pkeys = $this->getTable()->getPrimaryKey();
if (count($pkeys) == 1) {
$this->addSetPrimaryKey_SinglePK($script);
} elseif (count($pkeys) > 1) {
$this->addSetPrimaryKey_MultiPK($script);
} else {
// n... | [
"protected",
"function",
"addSetPrimaryKey",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"pkeys",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getPrimaryKey",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"pkeys",
")",
"==",
"1",
")",
"{",
"$",
... | Adds the correct setPrimaryKey() method for this object.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"correct",
"setPrimaryKey",
"()",
"method",
"for",
"this",
"object",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3428-L3439 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addSetPrimaryKey_SinglePK | protected function addSetPrimaryKey_SinglePK(&$script)
{
$pkeys = $this->getTable()->getPrimaryKey();
$col = $pkeys[0];
$clo=$col->getLowercasedName();
$ctype = $col->getPhpType();
$script .= "
/**
* Generic method to set the primary key ($clo column).
*
... | php | protected function addSetPrimaryKey_SinglePK(&$script)
{
$pkeys = $this->getTable()->getPrimaryKey();
$col = $pkeys[0];
$clo=$col->getLowercasedName();
$ctype = $col->getPhpType();
$script .= "
/**
* Generic method to set the primary key ($clo column).
*
... | [
"protected",
"function",
"addSetPrimaryKey_SinglePK",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"pkeys",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getPrimaryKey",
"(",
")",
";",
"$",
"col",
"=",
"$",
"pkeys",
"[",
"0",
"]",
";",
"$",
"clo",
... | Adds the setPrimaryKey() method for tables that contain a single-column primary key.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"setPrimaryKey",
"()",
"method",
"for",
"tables",
"that",
"contain",
"a",
"single",
"-",
"column",
"primary",
"key",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3445-L3465 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addIsPrimaryKeyNull | protected function addIsPrimaryKeyNull(&$script)
{
$table = $this->getTable();
$pkeys = $table->getPrimaryKey();
$script .= "
/**
* Returns true if the primary key for this object is null.
* @return boolean
*/
public function isPrimaryKeyNull()
{";
if (cou... | php | protected function addIsPrimaryKeyNull(&$script)
{
$table = $this->getTable();
$pkeys = $table->getPrimaryKey();
$script .= "
/**
* Returns true if the primary key for this object is null.
* @return boolean
*/
public function isPrimaryKeyNull()
{";
if (cou... | [
"protected",
"function",
"addIsPrimaryKeyNull",
"(",
"&",
"$",
"script",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"pkeys",
"=",
"$",
"table",
"->",
"getPrimaryKey",
"(",
")",
";",
"$",
"script",
".=",
"\"\n /**... | Adds the isPrimaryKeyNull() method
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"isPrimaryKeyNull",
"()",
"method"
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3525-L3551 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addFKMethods | protected function addFKMethods(&$script)
{
foreach ($this->getTable()->getForeignKeys() as $fk) {
$this->declareClassFromBuilder($this->getNewStubObjectBuilder($fk->getForeignTable()), 'Child');
$this->declareClassFromBuilder($this->getNewStubQueryBuilder($fk->getForeignTable()));
... | php | protected function addFKMethods(&$script)
{
foreach ($this->getTable()->getForeignKeys() as $fk) {
$this->declareClassFromBuilder($this->getNewStubObjectBuilder($fk->getForeignTable()), 'Child');
$this->declareClassFromBuilder($this->getNewStubQueryBuilder($fk->getForeignTable()));
... | [
"protected",
"function",
"addFKMethods",
"(",
"&",
"$",
"script",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getForeignKeys",
"(",
")",
"as",
"$",
"fk",
")",
"{",
"$",
"this",
"->",
"declareClassFromBuilder",
"(",
"$",
"t... | Adds the methods that get & set objects related by foreign key to the current object.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"methods",
"that",
"get",
"&",
"set",
"objects",
"related",
"by",
"foreign",
"key",
"to",
"the",
"current",
"object",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3588-L3596 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addFKAttributes | protected function addFKAttributes(&$script, ForeignKey $fk)
{
$className = $this->getClassNameFromTable($fk->getForeignTable());
$varName = $this->getFKVarName($fk);
$script .= "
/**
* @var $className
*/
protected $".$varName.";
";
} | php | protected function addFKAttributes(&$script, ForeignKey $fk)
{
$className = $this->getClassNameFromTable($fk->getForeignTable());
$varName = $this->getFKVarName($fk);
$script .= "
/**
* @var $className
*/
protected $".$varName.";
";
} | [
"protected",
"function",
"addFKAttributes",
"(",
"&",
"$",
"script",
",",
"ForeignKey",
"$",
"fk",
")",
"{",
"$",
"className",
"=",
"$",
"this",
"->",
"getClassNameFromTable",
"(",
"$",
"fk",
"->",
"getForeignTable",
"(",
")",
")",
";",
"$",
"varName",
"... | Adds the class attributes that are needed to store fkey related objects.
@param string &$script The script will be modified in this method.
@param ForeignKey $fk | [
"Adds",
"the",
"class",
"attributes",
"that",
"are",
"needed",
"to",
"store",
"fkey",
"related",
"objects",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3603-L3614 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addFKMutator | protected function addFKMutator(&$script, ForeignKey $fk)
{
$table = $this->getTable();
$fkTable = $fk->getForeignTable();
if ($interface = $fk->getInterface()) {
$className = $this->declareClass($interface);
} else {
$className = $this->getClassNameFromTable... | php | protected function addFKMutator(&$script, ForeignKey $fk)
{
$table = $this->getTable();
$fkTable = $fk->getForeignTable();
if ($interface = $fk->getInterface()) {
$className = $this->declareClass($interface);
} else {
$className = $this->getClassNameFromTable... | [
"protected",
"function",
"addFKMutator",
"(",
"&",
"$",
"script",
",",
"ForeignKey",
"$",
"fk",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"fkTable",
"=",
"$",
"fk",
"->",
"getForeignTable",
"(",
")",
";",
"if",
... | Adds the mutator (setter) method for setting an fkey related object.
@param string &$script The script will be modified in this method.
@param ForeignKey $fk | [
"Adds",
"the",
"mutator",
"(",
"setter",
")",
"method",
"for",
"setting",
"an",
"fkey",
"related",
"object",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3621-L3699 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addFKAccessor | protected function addFKAccessor(&$script, ForeignKey $fk)
{
$table = $this->getTable();
$varName = $this->getFKVarName($fk);
$fkQueryBuilder = $this->getNewStubQueryBuilder($fk->getForeignTable());
$fkObjectBuilder = $this->getNewObjectBuilder($fk->getForeignTable())->getStubObjec... | php | protected function addFKAccessor(&$script, ForeignKey $fk)
{
$table = $this->getTable();
$varName = $this->getFKVarName($fk);
$fkQueryBuilder = $this->getNewStubQueryBuilder($fk->getForeignTable());
$fkObjectBuilder = $this->getNewObjectBuilder($fk->getForeignTable())->getStubObjec... | [
"protected",
"function",
"addFKAccessor",
"(",
"&",
"$",
"script",
",",
"ForeignKey",
"$",
"fk",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"varName",
"=",
"$",
"this",
"->",
"getFKVarName",
"(",
"$",
"fk",
")",
... | Adds the accessor (getter) method for getting an fkey related object.
@param string &$script The script will be modified in this method.
@param ForeignKey $fk | [
"Adds",
"the",
"accessor",
"(",
"getter",
")",
"method",
"for",
"getting",
"an",
"fkey",
"related",
"object",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3706-L3804 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addRefFKGetJoinMethods | protected function addRefFKGetJoinMethods(&$script, ForeignKey $refFK)
{
$table = $this->getTable();
$tblFK = $refFK->getTable();
$joinBehavior = $this->getBuildProperty('generator.objectModel.useLeftJoinsInDoJoinMethods') ? 'Criteria::LEFT_JOIN' : 'Criteria::INNER_JOIN';
$fkQueryCl... | php | protected function addRefFKGetJoinMethods(&$script, ForeignKey $refFK)
{
$table = $this->getTable();
$tblFK = $refFK->getTable();
$joinBehavior = $this->getBuildProperty('generator.objectModel.useLeftJoinsInDoJoinMethods') ? 'Criteria::LEFT_JOIN' : 'Criteria::INNER_JOIN';
$fkQueryCl... | [
"protected",
"function",
"addRefFKGetJoinMethods",
"(",
"&",
"$",
"script",
",",
"ForeignKey",
"$",
"refFK",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
";",
"$",
"tblFK",
"=",
"$",
"refFK",
"->",
"getTable",
"(",
")",
";",
... | Adds the method that fetches fkey-related (referencing) objects but also joins in data from another table.
@param string &$script The script will be modified in this method.
@param ForeignKey $refFK | [
"Adds",
"the",
"method",
"that",
"fetches",
"fkey",
"-",
"related",
"(",
"referencing",
")",
"objects",
"but",
"also",
"joins",
"in",
"data",
"from",
"another",
"table",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3811-L3872 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addRefFKAttributes | protected function addRefFKAttributes(&$script, ForeignKey $refFK)
{
$className = $this->getClassNameFromTable($refFK->getTable());
if ($refFK->isLocalPrimaryKey()) {
$script .= "
/**
* @var $className one-to-one related $className object
*/
protected $".$this->... | php | protected function addRefFKAttributes(&$script, ForeignKey $refFK)
{
$className = $this->getClassNameFromTable($refFK->getTable());
if ($refFK->isLocalPrimaryKey()) {
$script .= "
/**
* @var $className one-to-one related $className object
*/
protected $".$this->... | [
"protected",
"function",
"addRefFKAttributes",
"(",
"&",
"$",
"script",
",",
"ForeignKey",
"$",
"refFK",
")",
"{",
"$",
"className",
"=",
"$",
"this",
"->",
"getClassNameFromTable",
"(",
"$",
"refFK",
"->",
"getTable",
"(",
")",
")",
";",
"if",
"(",
"$",... | Adds the attributes used to store objects that have referrer fkey relationships to this object.
<code>protected collVarName;</code>
<code>private lastVarNameCriteria = null;</code>
@param string &$script The script will be modified in this method.
@param ForeignKey $refFK | [
"Adds",
"the",
"attributes",
"used",
"to",
"store",
"objects",
"that",
"have",
"referrer",
"fkey",
"relationships",
"to",
"this",
"object",
".",
"<code",
">",
"protected",
"collVarName",
";",
"<",
"/",
"code",
">",
"<code",
">",
"private",
"lastVarNameCriteria... | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3881-L3901 |
propelorm/Propel2 | src/Propel/Generator/Builder/Om/ObjectBuilder.php | ObjectBuilder.addRefFKMethods | protected function addRefFKMethods(&$script)
{
if (!$referrers = $this->getTable()->getReferrers()) {
return;
}
$this->addInitRelations($script, $referrers);
foreach ($referrers as $refFK) {
$this->declareClassFromBuilder($this->getNewStubObjectBuilder($refFK-... | php | protected function addRefFKMethods(&$script)
{
if (!$referrers = $this->getTable()->getReferrers()) {
return;
}
$this->addInitRelations($script, $referrers);
foreach ($referrers as $refFK) {
$this->declareClassFromBuilder($this->getNewStubObjectBuilder($refFK-... | [
"protected",
"function",
"addRefFKMethods",
"(",
"&",
"$",
"script",
")",
"{",
"if",
"(",
"!",
"$",
"referrers",
"=",
"$",
"this",
"->",
"getTable",
"(",
")",
"->",
"getReferrers",
"(",
")",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"addInitRe... | Adds the methods for retrieving, initializing, adding objects that are related to this one by foreign keys.
@param string &$script The script will be modified in this method. | [
"Adds",
"the",
"methods",
"for",
"retrieving",
"initializing",
"adding",
"objects",
"that",
"are",
"related",
"to",
"this",
"one",
"by",
"foreign",
"keys",
"."
] | train | https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ObjectBuilder.php#L3907-L3932 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.