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/Propel
runtime/lib/collection/PropelObjectCollection.php
PropelObjectCollection.populateRelation
public function populateRelation($relation, $criteria = null, $con = null) { if (!Propel::isInstancePoolingEnabled()) { throw new PropelException('populateRelation() needs instance pooling to be enabled prior to populating the collection'); } $relationMap = $this->getFormatter()-...
php
public function populateRelation($relation, $criteria = null, $con = null) { if (!Propel::isInstancePoolingEnabled()) { throw new PropelException('populateRelation() needs instance pooling to be enabled prior to populating the collection'); } $relationMap = $this->getFormatter()-...
[ "public", "function", "populateRelation", "(", "$", "relation", ",", "$", "criteria", "=", "null", ",", "$", "con", "=", "null", ")", "{", "if", "(", "!", "Propel", "::", "isInstancePoolingEnabled", "(", ")", ")", "{", "throw", "new", "PropelException", ...
Makes an additional query to populate the objects related to the collection objects by a certain relation @param string $relation Relation name (e.g. 'Book') @param Criteria $criteria Optional Criteria object to filter the related object collection @param PropelPDO $con Optional connection object @return Pro...
[ "Makes", "an", "additional", "query", "to", "populate", "the", "objects", "related", "to", "the", "collection", "objects", "by", "a", "certain", "relation" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelObjectCollection.php#L224-L270
propelorm/Propel
runtime/lib/collection/PropelObjectCollection.php
PropelObjectCollection.search
public function search($element) { if ($element instanceof BaseObject) { if (null !== $elt = $this->getIdenticalObject($element)) { $element = $elt; } } return parent::search($element); }
php
public function search($element) { if ($element instanceof BaseObject) { if (null !== $elt = $this->getIdenticalObject($element)) { $element = $elt; } } return parent::search($element); }
[ "public", "function", "search", "(", "$", "element", ")", "{", "if", "(", "$", "element", "instanceof", "BaseObject", ")", "{", "if", "(", "null", "!==", "$", "elt", "=", "$", "this", "->", "getIdenticalObject", "(", "$", "element", ")", ")", "{", "$...
{@inheritdoc}
[ "{" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelObjectCollection.php#L275-L284
propelorm/Propel
runtime/lib/collection/PropelObjectCollection.php
PropelObjectCollection.contains
public function contains($element) { if ($element instanceof BaseObject) { if (null !== $elt = $this->getIdenticalObject($element)) { $element = $elt; } } return parent::contains($element); }
php
public function contains($element) { if ($element instanceof BaseObject) { if (null !== $elt = $this->getIdenticalObject($element)) { $element = $elt; } } return parent::contains($element); }
[ "public", "function", "contains", "(", "$", "element", ")", "{", "if", "(", "$", "element", "instanceof", "BaseObject", ")", "{", "if", "(", "null", "!==", "$", "elt", "=", "$", "this", "->", "getIdenticalObject", "(", "$", "element", ")", ")", "{", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelObjectCollection.php#L289-L298
propelorm/Propel
generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php
ArchivableBehaviorObjectBuilderModifier.objectAttributes
public function objectAttributes(PHP5ObjectBuilder $builder) { if (!$this->behavior->hasArchiveClass()) { $builder->declareClassFromBuilder($builder->getNewStubQueryBuilder($this->behavior->getArchiveTable())); } $script = ''; if ($this->behavior->isArchiveOnInsert()) { ...
php
public function objectAttributes(PHP5ObjectBuilder $builder) { if (!$this->behavior->hasArchiveClass()) { $builder->declareClassFromBuilder($builder->getNewStubQueryBuilder($this->behavior->getArchiveTable())); } $script = ''; if ($this->behavior->isArchiveOnInsert()) { ...
[ "public", "function", "objectAttributes", "(", "PHP5ObjectBuilder", "$", "builder", ")", "{", "if", "(", "!", "$", "this", "->", "behavior", "->", "hasArchiveClass", "(", ")", ")", "{", "$", "builder", "->", "declareClassFromBuilder", "(", "$", "builder", "-...
Add object attributes to the built class. @param PHP5ObjectBuilder $builder @return string The PHP code to be added to the builder.
[ "Add", "object", "attributes", "to", "the", "built", "class", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php#L39-L60
propelorm/Propel
generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php
ArchivableBehaviorObjectBuilderModifier.preDelete
public function preDelete($builder) { if ($this->behavior->isArchiveOnDelete()) { return $this->behavior->renderTemplate('objectPreDelete', array( 'queryClassname' => $builder->getStubQueryBuilder()->getClassname(), 'isAddHooks' => $builder->getGeneratorConfig...
php
public function preDelete($builder) { if ($this->behavior->isArchiveOnDelete()) { return $this->behavior->renderTemplate('objectPreDelete', array( 'queryClassname' => $builder->getStubQueryBuilder()->getClassname(), 'isAddHooks' => $builder->getGeneratorConfig...
[ "public", "function", "preDelete", "(", "$", "builder", ")", "{", "if", "(", "$", "this", "->", "behavior", "->", "isArchiveOnDelete", "(", ")", ")", "{", "return", "$", "this", "->", "behavior", "->", "renderTemplate", "(", "'objectPreDelete'", ",", "arra...
Using preDelete rather than postDelete to allow user to retrieve related records and archive them before cascade deletion. The actual deletion is made by the query object, so the AR class must tell the query class to enable or disable archiveOnDelete. @return string the PHP code to be added to the builder
[ "Using", "preDelete", "rather", "than", "postDelete", "to", "allow", "user", "to", "retrieve", "related", "records", "and", "archive", "them", "before", "cascade", "deletion", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php#L111-L119
propelorm/Propel
generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php
ArchivableBehaviorObjectBuilderModifier.addPopulateFromArchive
public function addPopulateFromArchive($builder) { return $this->behavior->renderTemplate('objectPopulateFromArchive', array( 'archiveTablePhpName' => $this->behavior->getArchiveTablePhpName($builder), 'usesAutoIncrement' => $this->table->hasAutoIncrementPrimaryKey(), '...
php
public function addPopulateFromArchive($builder) { return $this->behavior->renderTemplate('objectPopulateFromArchive', array( 'archiveTablePhpName' => $this->behavior->getArchiveTablePhpName($builder), 'usesAutoIncrement' => $this->table->hasAutoIncrementPrimaryKey(), '...
[ "public", "function", "addPopulateFromArchive", "(", "$", "builder", ")", "{", "return", "$", "this", "->", "behavior", "->", "renderTemplate", "(", "'objectPopulateFromArchive'", ",", "array", "(", "'archiveTablePhpName'", "=>", "$", "this", "->", "behavior", "->...
Generates a method to populate the current AR object based on an archive object. This method is necessary because the archive's copyInto() may include the archived_at column and therefore cannot be used. Besides, the way autoincremented PKs are handled should be explicit. @return string the PHP code to be added to the...
[ "Generates", "a", "method", "to", "populate", "the", "current", "AR", "object", "based", "on", "an", "archive", "object", ".", "This", "method", "is", "necessary", "because", "the", "archive", "s", "copyInto", "()", "may", "include", "the", "archived_at", "c...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php#L191-L200
propelorm/Propel
generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php
ArchivableBehaviorObjectBuilderModifier.fakeAutoIncrementPrimaryKeyForConcreteInheritance
public function fakeAutoIncrementPrimaryKeyForConcreteInheritance() { if ($this->table->hasBehavior('concrete_inheritance')) { $concrete_inheritance_behavior = $this->table->getBehavior('concrete_inheritance'); $database = $this->table->getDatabase(); $tableName = $datab...
php
public function fakeAutoIncrementPrimaryKeyForConcreteInheritance() { if ($this->table->hasBehavior('concrete_inheritance')) { $concrete_inheritance_behavior = $this->table->getBehavior('concrete_inheritance'); $database = $this->table->getDatabase(); $tableName = $datab...
[ "public", "function", "fakeAutoIncrementPrimaryKeyForConcreteInheritance", "(", ")", "{", "if", "(", "$", "this", "->", "table", "->", "hasBehavior", "(", "'concrete_inheritance'", ")", ")", "{", "$", "concrete_inheritance_behavior", "=", "$", "this", "->", "table",...
Checks if the current table uses concrete_inheritance, and if it's parent has an auto-increment primary key. In this case, we need to define the populateFromArchive() method with the second parameter, in order to comply with php strict standards. The parameter is not used (PKs are inserted regardless if it is set to tr...
[ "Checks", "if", "the", "current", "table", "uses", "concrete_inheritance", "and", "if", "it", "s", "parent", "has", "an", "auto", "-", "increment", "primary", "key", ".", "In", "this", "case", "we", "need", "to", "define", "the", "populateFromArchive", "()",...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/archivable/ArchivableBehaviorObjectBuilderModifier.php#L211-L229
propelorm/Propel
runtime/lib/parser/yaml/sfYamlParser.php
sfYamlParser.parseValue
protected function parseValue($value) { if ('*' === substr($value, 0, 1)) { if (false !== $pos = strpos($value, '#')) { $value = substr($value, 1, $pos - 2); } else { $value = substr($value, 1); } if (!array_key_exists($value, $this->refs)) { throw new InvalidArgum...
php
protected function parseValue($value) { if ('*' === substr($value, 0, 1)) { if (false !== $pos = strpos($value, '#')) { $value = substr($value, 1, $pos - 2); } else { $value = substr($value, 1); } if (!array_key_exists($value, $this->refs)) { throw new InvalidArgum...
[ "protected", "function", "parseValue", "(", "$", "value", ")", "{", "if", "(", "'*'", "===", "substr", "(", "$", "value", ",", "0", ",", "1", ")", ")", "{", "if", "(", "false", "!==", "$", "pos", "=", "strpos", "(", "$", "value", ",", "'#'", ")...
Parses a YAML value. @param string $value A YAML value @return mixed A PHP value
[ "Parses", "a", "YAML", "value", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/yaml/sfYamlParser.php#L311-L334
propelorm/Propel
runtime/lib/parser/yaml/sfYamlParser.php
sfYamlParser.parseFoldedScalar
protected function parseFoldedScalar($separator, $indicator = '', $indentation = 0) { $separator = '|' == $separator ? "\n" : ' '; $text = ''; $notEOF = $this->moveToNextLine(); while ($notEOF && $this->isCurrentLineBlank()) { $text .= "\n"; $notEOF = $this->moveToNextLine(); } ...
php
protected function parseFoldedScalar($separator, $indicator = '', $indentation = 0) { $separator = '|' == $separator ? "\n" : ' '; $text = ''; $notEOF = $this->moveToNextLine(); while ($notEOF && $this->isCurrentLineBlank()) { $text .= "\n"; $notEOF = $this->moveToNextLine(); } ...
[ "protected", "function", "parseFoldedScalar", "(", "$", "separator", ",", "$", "indicator", "=", "''", ",", "$", "indentation", "=", "0", ")", "{", "$", "separator", "=", "'|'", "==", "$", "separator", "?", "\"\\n\"", ":", "' '", ";", "$", "text", "=",...
Parses a folded scalar. @param string $separator The separator that was used to begin this folded scalar (| or >) @param string $indicator The indicator that was used to begin this folded scalar (+ or -) @param integer $indentation The indentation that was used to begin this folded scalar @return string The...
[ "Parses", "a", "folded", "scalar", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/yaml/sfYamlParser.php#L345-L408
propelorm/Propel
runtime/lib/parser/yaml/sfYamlParser.php
sfYamlParser.isNextLineIndented
protected function isNextLineIndented() { $currentIndentation = $this->getCurrentLineIndentation(); $notEOF = $this->moveToNextLine(); while ($notEOF && $this->isCurrentLineEmpty()) { $notEOF = $this->moveToNextLine(); } if (false === $notEOF) { return false; } $ret = false;...
php
protected function isNextLineIndented() { $currentIndentation = $this->getCurrentLineIndentation(); $notEOF = $this->moveToNextLine(); while ($notEOF && $this->isCurrentLineEmpty()) { $notEOF = $this->moveToNextLine(); } if (false === $notEOF) { return false; } $ret = false;...
[ "protected", "function", "isNextLineIndented", "(", ")", "{", "$", "currentIndentation", "=", "$", "this", "->", "getCurrentLineIndentation", "(", ")", ";", "$", "notEOF", "=", "$", "this", "->", "moveToNextLine", "(", ")", ";", "while", "(", "$", "notEOF", ...
Returns true if the next line is indented. @return Boolean Returns true if the next line is indented, false otherwise
[ "Returns", "true", "if", "the", "next", "line", "is", "indented", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/yaml/sfYamlParser.php#L415-L436
propelorm/Propel
generator/lib/model/VendorInfo.php
VendorInfo.getMergedVendorInfo
public function getMergedVendorInfo(VendorInfo $merge) { $newParams = array_merge($this->getParameters(), $merge->getParameters()); $newInfo = new VendorInfo($this->getType()); $newInfo->setParameters($newParams); return $newInfo; }
php
public function getMergedVendorInfo(VendorInfo $merge) { $newParams = array_merge($this->getParameters(), $merge->getParameters()); $newInfo = new VendorInfo($this->getType()); $newInfo->setParameters($newParams); return $newInfo; }
[ "public", "function", "getMergedVendorInfo", "(", "VendorInfo", "$", "merge", ")", "{", "$", "newParams", "=", "array_merge", "(", "$", "this", "->", "getParameters", "(", ")", ",", "$", "merge", "->", "getParameters", "(", ")", ")", ";", "$", "newInfo", ...
Gets a new merged VendorInfo object. @param VendorInfo $info @return VendorInfo new object with merged parameters
[ "Gets", "a", "new", "merged", "VendorInfo", "object", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/VendorInfo.php#L165-L172
propelorm/Propel
runtime/lib/adapter/DBPostgres.php
DBPostgres.doExplainPlan
public function doExplainPlan(PropelPDO $con, $query) { if ($query instanceof ModelCriteria) { $params = array(); $dbMap = Propel::getDatabaseMap($query->getDbName()); $sql = BasePeer::createSelectSql($query, $params); } else { $sql = $query; }...
php
public function doExplainPlan(PropelPDO $con, $query) { if ($query instanceof ModelCriteria) { $params = array(); $dbMap = Propel::getDatabaseMap($query->getDbName()); $sql = BasePeer::createSelectSql($query, $params); } else { $sql = $query; }...
[ "public", "function", "doExplainPlan", "(", "PropelPDO", "$", "con", ",", "$", "query", ")", "{", "if", "(", "$", "query", "instanceof", "ModelCriteria", ")", "{", "$", "params", "=", "array", "(", ")", ";", "$", "dbMap", "=", "Propel", "::", "getDatab...
Do Explain Plan for query object or query string @param PropelPDO $con propel connection @param ModelCriteria|string $query query the criteria or the query string @throws PropelException @return PDOStatement A PDO statement executed using the connection, ready to be fetched
[ "Do", "Explain", "Plan", "for", "query", "object", "or", "query", "string" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBPostgres.php#L220-L239
propelorm/Propel
generator/lib/model/diff/PropelTableComparator.php
PropelTableComparator.compareColumns
public function compareColumns($caseInsensitive = false) { $fromTableColumns = $this->getFromTable()->getColumns(); $toTableColumns = $this->getToTable()->getColumns(); $columnDifferences = 0; // check for new columns in $toTable foreach ($toTableColumns as $column) { ...
php
public function compareColumns($caseInsensitive = false) { $fromTableColumns = $this->getFromTable()->getColumns(); $toTableColumns = $this->getToTable()->getColumns(); $columnDifferences = 0; // check for new columns in $toTable foreach ($toTableColumns as $column) { ...
[ "public", "function", "compareColumns", "(", "$", "caseInsensitive", "=", "false", ")", "{", "$", "fromTableColumns", "=", "$", "this", "->", "getFromTable", "(", ")", "->", "getColumns", "(", ")", ";", "$", "toTableColumns", "=", "$", "this", "->", "getTo...
Compare the columns of the fromTable and the toTable, and modifies the inner tableDiff if necessary. Returns the number of differences. @param boolean $caseInsensitive Whether the comparison is case insensitive. False by default. @return integer The number of column differences
[ "Compare", "the", "columns", "of", "the", "fromTable", "and", "the", "toTable", "and", "modifies", "the", "inner", "tableDiff", "if", "necessary", ".", "Returns", "the", "number", "of", "differences", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelTableComparator.php#L113-L163
propelorm/Propel
generator/lib/model/diff/PropelTableComparator.php
PropelTableComparator.comparePrimaryKeys
public function comparePrimaryKeys($caseInsensitive = false) { $pkDifferences = 0; $fromTablePk = $this->getFromTable()->getPrimaryKey(); $toTablePk = $this->getToTable()->getPrimaryKey(); // check for new pk columns in $toTable foreach ($toTablePk as $column) { ...
php
public function comparePrimaryKeys($caseInsensitive = false) { $pkDifferences = 0; $fromTablePk = $this->getFromTable()->getPrimaryKey(); $toTablePk = $this->getToTable()->getPrimaryKey(); // check for new pk columns in $toTable foreach ($toTablePk as $column) { ...
[ "public", "function", "comparePrimaryKeys", "(", "$", "caseInsensitive", "=", "false", ")", "{", "$", "pkDifferences", "=", "0", ";", "$", "fromTablePk", "=", "$", "this", "->", "getFromTable", "(", ")", "->", "getPrimaryKey", "(", ")", ";", "$", "toTableP...
Compare the primary keys of the fromTable and the toTable, and modifies the inner tableDiff if necessary. Returns the number of differences. @param boolean $caseInsensitive Whether the comparison is case insensitive. False by default. @return integer The number of primary key differences
[ "Compare", "the", "primary", "keys", "of", "the", "fromTable", "and", "the", "toTable", "and", "modifies", "the", "inner", "tableDiff", "if", "necessary", ".", "Returns", "the", "number", "of", "differences", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelTableComparator.php#L175-L213
propelorm/Propel
generator/lib/model/diff/PropelTableComparator.php
PropelTableComparator.compareIndices
public function compareIndices($caseInsensitive = false) { $indexDifferences = 0; $fromTableIndices = array_merge($this->getFromTable()->getIndices(), $this->getFromTable()->getUnices()); $toTableIndices = array_merge($this->getToTable()->getIndices(), $this->getToTable()->getUnices()); ...
php
public function compareIndices($caseInsensitive = false) { $indexDifferences = 0; $fromTableIndices = array_merge($this->getFromTable()->getIndices(), $this->getFromTable()->getUnices()); $toTableIndices = array_merge($this->getToTable()->getIndices(), $this->getToTable()->getUnices()); ...
[ "public", "function", "compareIndices", "(", "$", "caseInsensitive", "=", "false", ")", "{", "$", "indexDifferences", "=", "0", ";", "$", "fromTableIndices", "=", "array_merge", "(", "$", "this", "->", "getFromTable", "(", ")", "->", "getIndices", "(", ")", ...
Compare the indices and unique indices of the fromTable and the toTable, and modifies the inner tableDiff if necessary. Returns the number of differences. @param boolean $caseInsensitive Whether the comparison is case insensitive. False by default. @return integer The number of index differences
[ "Compare", "the", "indices", "and", "unique", "indices", "of", "the", "fromTable", "and", "the", "toTable", "and", "modifies", "the", "inner", "tableDiff", "if", "necessary", ".", "Returns", "the", "number", "of", "differences", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelTableComparator.php#L225-L262
propelorm/Propel
generator/lib/model/diff/PropelTableComparator.php
PropelTableComparator.compareForeignKeys
public function compareForeignKeys($caseInsensitive = false) { $fkDifferences = 0; $fromTableFks = $this->getFromTable()->getForeignKeys(); $toTableFks = $this->getToTable()->getForeignKeys(); foreach ($fromTableFks as $fromTableFkPos => $fromTableFk) { foreach ($toTable...
php
public function compareForeignKeys($caseInsensitive = false) { $fkDifferences = 0; $fromTableFks = $this->getFromTable()->getForeignKeys(); $toTableFks = $this->getToTable()->getForeignKeys(); foreach ($fromTableFks as $fromTableFkPos => $fromTableFk) { foreach ($toTable...
[ "public", "function", "compareForeignKeys", "(", "$", "caseInsensitive", "=", "false", ")", "{", "$", "fkDifferences", "=", "0", ";", "$", "fromTableFks", "=", "$", "this", "->", "getFromTable", "(", ")", "->", "getForeignKeys", "(", ")", ";", "$", "toTabl...
Compare the foreign keys of the fromTable and the toTable, and modifies the inner tableDiff if necessary. Returns the number of differences. @param boolean $caseInsensitive Whether the comparison is case insensitive. False by default. @return integer The number of foreign key differences
[ "Compare", "the", "foreign", "keys", "of", "the", "fromTable", "and", "the", "toTable", "and", "modifies", "the", "inner", "tableDiff", "if", "necessary", ".", "Returns", "the", "number", "of", "differences", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelTableComparator.php#L274-L315
propelorm/Propel
generator/lib/builder/util/XmlToDataSQL.php
XmlToDataSQL.transform
public function transform(PhingFile $xmlFile, Writer $out) { $this->sqlWriter = $out; // Reset some vars just in case this is being run multiple times. $this->currTableName = $this->currBuilder = null; $this->builderClazz = $this->generatorConfig->getBuilderClassname('datasql'); ...
php
public function transform(PhingFile $xmlFile, Writer $out) { $this->sqlWriter = $out; // Reset some vars just in case this is being run multiple times. $this->currTableName = $this->currBuilder = null; $this->builderClazz = $this->generatorConfig->getBuilderClassname('datasql'); ...
[ "public", "function", "transform", "(", "PhingFile", "$", "xmlFile", ",", "Writer", "$", "out", ")", "{", "$", "this", "->", "sqlWriter", "=", "$", "out", ";", "// Reset some vars just in case this is being run multiple times.", "$", "this", "->", "currTableName", ...
Transform the data dump input file into SQL and writes it to the output stream. @param PhingFile $xmlFile @param Writer $out @throws BuildException
[ "Transform", "the", "data", "dump", "input", "file", "into", "SQL", "and", "writes", "it", "to", "the", "output", "stream", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/util/XmlToDataSQL.php#L114-L142
propelorm/Propel
generator/lib/builder/util/XmlToDataSQL.php
XmlToDataSQL.startElement
public function startElement($name, $attributes) { try { if ($name == "dataset") { // Clear any start/end DLL call_user_func(array($this->builderClazz, 'reset')); $this->sqlWriter->write(call_user_func(array($this->builderClazz, 'getDatabaseStartSq...
php
public function startElement($name, $attributes) { try { if ($name == "dataset") { // Clear any start/end DLL call_user_func(array($this->builderClazz, 'reset')); $this->sqlWriter->write(call_user_func(array($this->builderClazz, 'getDatabaseStartSq...
[ "public", "function", "startElement", "(", "$", "name", ",", "$", "attributes", ")", "{", "try", "{", "if", "(", "$", "name", "==", "\"dataset\"", ")", "{", "// Clear any start/end DLL", "call_user_func", "(", "array", "(", "$", "this", "->", "builderClazz",...
Handles opening elements of the xml file.
[ "Handles", "opening", "elements", "of", "the", "xml", "file", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/util/XmlToDataSQL.php#L147-L191
propelorm/Propel
generator/lib/builder/util/XmlToDataSQL.php
XmlToDataSQL.endElement
public function endElement($name) { if (self::DEBUG) { print("endElement(" . $name . ") called\n"); } if ($name == "dataset") { if ($this->currBuilder !== null) { $this->sqlWriter->write($this->currBuilder->getTableEndSql()); } ...
php
public function endElement($name) { if (self::DEBUG) { print("endElement(" . $name . ") called\n"); } if ($name == "dataset") { if ($this->currBuilder !== null) { $this->sqlWriter->write($this->currBuilder->getTableEndSql()); } ...
[ "public", "function", "endElement", "(", "$", "name", ")", "{", "if", "(", "self", "::", "DEBUG", ")", "{", "print", "(", "\"endElement(\"", ".", "$", "name", ".", "\") called\\n\"", ")", ";", "}", "if", "(", "$", "name", "==", "\"dataset\"", ")", "{...
Handles closing elements of the xml file. @param $name The local name (without prefix), or the empty string if Namespace processing is not being performed.
[ "Handles", "closing", "elements", "of", "the", "xml", "file", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/util/XmlToDataSQL.php#L200-L211
propelorm/Propel
generator/lib/model/diff/PropelTableDiff.php
PropelTableDiff.addModifiedIndex
public function addModifiedIndex($indexName, Index $fromIndex, Index $toIndex) { $this->modifiedIndices[$indexName] = array($fromIndex, $toIndex); }
php
public function addModifiedIndex($indexName, Index $fromIndex, Index $toIndex) { $this->modifiedIndices[$indexName] = array($fromIndex, $toIndex); }
[ "public", "function", "addModifiedIndex", "(", "$", "indexName", ",", "Index", "$", "fromIndex", ",", "Index", "$", "toIndex", ")", "{", "$", "this", "->", "modifiedIndices", "[", "$", "indexName", "]", "=", "array", "(", "$", "fromIndex", ",", "$", "toI...
Add a modified Index @param string $indexName @param Index $fromIndex @param Index $toIndex
[ "Add", "a", "modified", "Index" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelTableDiff.php#L453-L456
propelorm/Propel
generator/lib/model/diff/PropelTableDiff.php
PropelTableDiff.getReverseDiff
public function getReverseDiff() { $diff = new self(); // tables $diff->setFromTable($this->getToTable()); $diff->setToTable($this->getFromTable()); // columns $diff->setAddedColumns($this->getRemovedColumns()); $diff->setRemovedColumns($this->getAddedColumn...
php
public function getReverseDiff() { $diff = new self(); // tables $diff->setFromTable($this->getToTable()); $diff->setToTable($this->getFromTable()); // columns $diff->setAddedColumns($this->getRemovedColumns()); $diff->setRemovedColumns($this->getAddedColumn...
[ "public", "function", "getReverseDiff", "(", ")", "{", "$", "diff", "=", "new", "self", "(", ")", ";", "// tables", "$", "diff", "->", "setFromTable", "(", "$", "this", "->", "getToTable", "(", ")", ")", ";", "$", "diff", "->", "setToTable", "(", "$"...
Get the reverse diff for this diff @return PropelTableDiff
[ "Get", "the", "reverse", "diff", "for", "this", "diff" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelTableDiff.php#L587-L637
propelorm/Propel
runtime/lib/util/PropelAutoloader.php
PropelAutoloader.register
public static function register() { ini_set('unserialize_callback_func', 'spl_autoload_call'); if (false === spl_autoload_register(array(self::getInstance(), 'autoload'))) { throw new Exception(sprintf('Unable to register %s::autoload as an autoloading method.', get_class(self::getInsta...
php
public static function register() { ini_set('unserialize_callback_func', 'spl_autoload_call'); if (false === spl_autoload_register(array(self::getInstance(), 'autoload'))) { throw new Exception(sprintf('Unable to register %s::autoload as an autoloading method.', get_class(self::getInsta...
[ "public", "static", "function", "register", "(", ")", "{", "ini_set", "(", "'unserialize_callback_func'", ",", "'spl_autoload_call'", ")", ";", "if", "(", "false", "===", "spl_autoload_register", "(", "array", "(", "self", "::", "getInstance", "(", ")", ",", "...
Register PropelAutoloader in spl autoloader. @return void @throws Exception
[ "Register", "PropelAutoloader", "in", "spl", "autoloader", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/util/PropelAutoloader.php#L48-L55
propelorm/Propel
runtime/lib/util/PropelAutoloader.php
PropelAutoloader.autoload
public function autoload($class) { if (isset($this->classes[$class])) { require $this->classes[$class]; return true; } // fallback for classes defined with leading backslash if (strpos($class, '\\') === 0) { $class = substr($class, 1); ...
php
public function autoload($class) { if (isset($this->classes[$class])) { require $this->classes[$class]; return true; } // fallback for classes defined with leading backslash if (strpos($class, '\\') === 0) { $class = substr($class, 1); ...
[ "public", "function", "autoload", "(", "$", "class", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "classes", "[", "$", "class", "]", ")", ")", "{", "require", "$", "this", "->", "classes", "[", "$", "class", "]", ";", "return", "true", "...
Handles autoloading of classes that have been registered in this instance @param string $class A class name. @return boolean Returns true if the class has been loaded
[ "Handles", "autoloading", "of", "classes", "that", "have", "been", "registered", "in", "this", "instance" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/util/PropelAutoloader.php#L107-L122
propelorm/Propel
generator/lib/model/ScopedElement.php
ScopedElement.setupObject
protected function setupObject() { $this->setPackage($this->getAttribute("package", $this->pkg)); $this->setSchema($this->getAttribute("schema", $this->schema)); $this->setNamespace($this->getAttribute("namespace", $this->namespace)); }
php
protected function setupObject() { $this->setPackage($this->getAttribute("package", $this->pkg)); $this->setSchema($this->getAttribute("schema", $this->schema)); $this->setNamespace($this->getAttribute("namespace", $this->namespace)); }
[ "protected", "function", "setupObject", "(", ")", "{", "$", "this", "->", "setPackage", "(", "$", "this", "->", "getAttribute", "(", "\"package\"", ",", "$", "this", "->", "pkg", ")", ")", ";", "$", "this", "->", "setSchema", "(", "$", "this", "->", ...
Sets up the Rule object based on the attributes that were passed to loadFromXML(). @see parent::loadFromXML()
[ "Sets", "up", "the", "Rule", "object", "based", "on", "the", "attributes", "that", "were", "passed", "to", "loadFromXML", "()", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/ScopedElement.php#L61-L66
propelorm/Propel
generator/lib/model/ScopedElement.php
ScopedElement.setNamespace
public function setNamespace($v) { if ($v == $this->namespace) { return; } $this->namespace = $v; if ($v && (!$this->pkg || $this->pkgOverridden) && $this->getBuildProperty('namespaceAutoPackage')) { $this->pkg = str_replace('\\', '.', $v); $this->...
php
public function setNamespace($v) { if ($v == $this->namespace) { return; } $this->namespace = $v; if ($v && (!$this->pkg || $this->pkgOverridden) && $this->getBuildProperty('namespaceAutoPackage')) { $this->pkg = str_replace('\\', '.', $v); $this->...
[ "public", "function", "setNamespace", "(", "$", "v", ")", "{", "if", "(", "$", "v", "==", "$", "this", "->", "namespace", ")", "{", "return", ";", "}", "$", "this", "->", "namespace", "=", "$", "v", ";", "if", "(", "$", "v", "&&", "(", "!", "...
Set the value of the namespace. @param $v Value to assign to namespace.
[ "Set", "the", "value", "of", "the", "namespace", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/ScopedElement.php#L83-L93
propelorm/Propel
generator/lib/model/ScopedElement.php
ScopedElement.setPackage
public function setPackage($v) { if ($v == $this->pkg) { return; } $this->pkg = $v; $this->pkgOverridden = false; }
php
public function setPackage($v) { if ($v == $this->pkg) { return; } $this->pkg = $v; $this->pkgOverridden = false; }
[ "public", "function", "setPackage", "(", "$", "v", ")", "{", "if", "(", "$", "v", "==", "$", "this", "->", "pkg", ")", "{", "return", ";", "}", "$", "this", "->", "pkg", "=", "$", "v", ";", "$", "this", "->", "pkgOverridden", "=", "false", ";",...
Set the value of package. @param $v Value to assign to package.
[ "Set", "the", "value", "of", "package", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/ScopedElement.php#L110-L117
propelorm/Propel
generator/lib/model/ScopedElement.php
ScopedElement.setSchema
public function setSchema($v) { if ($v == $this->schema) { return; } $this->schema = $v; if ($v && !$this->pkg && $this->getBuildProperty('schemaAutoPackage')) { $this->pkg = $v; $this->pkgOverridden = true; } if ($v && !$this->name...
php
public function setSchema($v) { if ($v == $this->schema) { return; } $this->schema = $v; if ($v && !$this->pkg && $this->getBuildProperty('schemaAutoPackage')) { $this->pkg = $v; $this->pkgOverridden = true; } if ($v && !$this->name...
[ "public", "function", "setSchema", "(", "$", "v", ")", "{", "if", "(", "$", "v", "==", "$", "this", "->", "schema", ")", "{", "return", ";", "}", "$", "this", "->", "schema", "=", "$", "v", ";", "if", "(", "$", "v", "&&", "!", "$", "this", ...
Set the value of schema. @param $v Value to assign to schema.
[ "Set", "the", "value", "of", "schema", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/ScopedElement.php#L134-L147
propelorm/Propel
generator/lib/util/PropelDotGenerator.php
PropelDotGenerator.create
public static function create(Database $database) { $dotSyntax = ''; // table nodes foreach ($database->getTables() as $table) { $columnsSyntax = ''; foreach ($table->getColumns() as $column) { $attributes = ''; if (count($column->get...
php
public static function create(Database $database) { $dotSyntax = ''; // table nodes foreach ($database->getTables() as $table) { $columnsSyntax = ''; foreach ($table->getColumns() as $column) { $attributes = ''; if (count($column->get...
[ "public", "static", "function", "create", "(", "Database", "$", "database", ")", "{", "$", "dotSyntax", "=", "''", ";", "// table nodes", "foreach", "(", "$", "database", "->", "getTables", "(", ")", "as", "$", "table", ")", "{", "$", "columnsSyntax", "=...
Create the DOT syntax for a given databases. @param $database Database @return string The DOT syntax created.
[ "Create", "the", "DOT", "syntax", "for", "a", "given", "databases", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/util/PropelDotGenerator.php#L28-L64
propelorm/Propel
runtime/lib/validator/TypeValidator.php
TypeValidator.isValid
public function isValid(ValidatorMap $map, $value) { switch ($map->getValue()) { case 'array': return is_array($value); break; case 'bool': case 'boolean': return is_bool($value); break; case 'flo...
php
public function isValid(ValidatorMap $map, $value) { switch ($map->getValue()) { case 'array': return is_array($value); break; case 'bool': case 'boolean': return is_bool($value); break; case 'flo...
[ "public", "function", "isValid", "(", "ValidatorMap", "$", "map", ",", "$", "value", ")", "{", "switch", "(", "$", "map", "->", "getValue", "(", ")", ")", "{", "case", "'array'", ":", "return", "is_array", "(", "$", "value", ")", ";", "break", ";", ...
@see BasicValidator::isValid() @param ValidatorMap $map @param mixed $value @return boolean @throws PropelException
[ "@see", "BasicValidator", "::", "isValid", "()" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/validator/TypeValidator.php#L38-L77
propelorm/Propel
runtime/lib/Propel.php
Propel.initialize
public static function initialize() { if (self::$configuration === null) { throw new PropelException("Propel cannot be initialized without a valid configuration. Please check the log files for further details."); } self::configureLogging(); // check whether the generate...
php
public static function initialize() { if (self::$configuration === null) { throw new PropelException("Propel cannot be initialized without a valid configuration. Please check the log files for further details."); } self::configureLogging(); // check whether the generate...
[ "public", "static", "function", "initialize", "(", ")", "{", "if", "(", "self", "::", "$", "configuration", "===", "null", ")", "{", "throw", "new", "PropelException", "(", "\"Propel cannot be initialized without a valid configuration. Please check the log files for further...
Initializes Propel @throws PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.
[ "Initializes", "Propel" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L262-L290
propelorm/Propel
runtime/lib/Propel.php
Propel.configure
public static function configure($configFile) { $configuration = include($configFile); if ($configuration === false) { throw new PropelException("Unable to open configuration file: " . var_export($configFile, true)); } self::setConfiguration($configuration); }
php
public static function configure($configFile) { $configuration = include($configFile); if ($configuration === false) { throw new PropelException("Unable to open configuration file: " . var_export($configFile, true)); } self::setConfiguration($configuration); }
[ "public", "static", "function", "configure", "(", "$", "configFile", ")", "{", "$", "configuration", "=", "include", "(", "$", "configFile", ")", ";", "if", "(", "$", "configuration", "===", "false", ")", "{", "throw", "new", "PropelException", "(", "\"Una...
Configure Propel a PHP (array) config file. @param string Path (absolute or relative to include_path) to config file. @throws PropelException If configuration file cannot be opened. (E_WARNING probably will also be raised by PHP)
[ "Configure", "Propel", "a", "PHP", "(", "array", ")", "config", "file", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L300-L307
propelorm/Propel
runtime/lib/Propel.php
Propel.configureLogging
protected static function configureLogging() { if (self::$logger === null) { if (isset(self::$configuration['log']) && is_array(self::$configuration['log']) && count(self::$configuration['log'])) { include_once 'Log.php'; // PEAR Log class $c = self::$configuratio...
php
protected static function configureLogging() { if (self::$logger === null) { if (isset(self::$configuration['log']) && is_array(self::$configuration['log']) && count(self::$configuration['log'])) { include_once 'Log.php'; // PEAR Log class $c = self::$configuratio...
[ "protected", "static", "function", "configureLogging", "(", ")", "{", "if", "(", "self", "::", "$", "logger", "===", "null", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "configuration", "[", "'log'", "]", ")", "&&", "is_array", "(", "self", ...
Configure the logging system, if config is specified in the runtime configuration.
[ "Configure", "the", "logging", "system", "if", "config", "is", "specified", "in", "the", "runtime", "configuration", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L312-L326
propelorm/Propel
runtime/lib/Propel.php
Propel.setConfiguration
public static function setConfiguration($c) { if (is_array($c)) { if (isset($c['propel']) && is_array($c['propel'])) { $c = $c['propel']; } $c = new PropelConfiguration($c); } self::$configuration = $c; }
php
public static function setConfiguration($c) { if (is_array($c)) { if (isset($c['propel']) && is_array($c['propel'])) { $c = $c['propel']; } $c = new PropelConfiguration($c); } self::$configuration = $c; }
[ "public", "static", "function", "setConfiguration", "(", "$", "c", ")", "{", "if", "(", "is_array", "(", "$", "c", ")", ")", "{", "if", "(", "isset", "(", "$", "c", "[", "'propel'", "]", ")", "&&", "is_array", "(", "$", "c", "[", "'propel'", "]",...
Sets the configuration for Propel and all dependencies. @param mixed The Configuration (array or PropelConfiguration)
[ "Sets", "the", "configuration", "for", "Propel", "and", "all", "dependencies", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L357-L366
propelorm/Propel
runtime/lib/Propel.php
Propel.log
public static function log($message, $level = self::LOG_DEBUG) { if (self::hasLogger()) { $logger = self::logger(); switch ($level) { case self::LOG_EMERG: return $logger->log($message, $level); case self::LOG_ALERT: ...
php
public static function log($message, $level = self::LOG_DEBUG) { if (self::hasLogger()) { $logger = self::logger(); switch ($level) { case self::LOG_EMERG: return $logger->log($message, $level); case self::LOG_ALERT: ...
[ "public", "static", "function", "log", "(", "$", "message", ",", "$", "level", "=", "self", "::", "LOG_DEBUG", ")", "{", "if", "(", "self", "::", "hasLogger", "(", ")", ")", "{", "$", "logger", "=", "self", "::", "logger", "(", ")", ";", "switch", ...
Logs a message If a logger has been configured, the logger will be used, otherwrise the logging message will be discarded without any further action @param string The message that will be logged. @param string The logging level. @return bool True if the message was logged successfully or no logger was used.
[ "Logs", "a", "message", "If", "a", "logger", "has", "been", "configured", "the", "logger", "will", "be", "used", "otherwrise", "the", "logging", "message", "will", "be", "discarded", "without", "any", "further", "action" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L432-L457
propelorm/Propel
runtime/lib/Propel.php
Propel.getDatabaseMap
public static function getDatabaseMap($name = null) { if ($name === null) { $name = self::getDefaultDB(); if ($name === null) { throw new PropelException("DatabaseMap name is null!"); } } if (!isset(self::$dbMaps[$name])) { $cl...
php
public static function getDatabaseMap($name = null) { if ($name === null) { $name = self::getDefaultDB(); if ($name === null) { throw new PropelException("DatabaseMap name is null!"); } } if (!isset(self::$dbMaps[$name])) { $cl...
[ "public", "static", "function", "getDatabaseMap", "(", "$", "name", "=", "null", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "$", "name", "=", "self", "::", "getDefaultDB", "(", ")", ";", "if", "(", "$", "name", "===", "null", ")", ...
Returns the database map information. Name relates to the name of the connection pool to associate with the map. The database maps are "registered" by the generated map builder classes. @param string The name of the database corresponding to the DatabaseMap to retrieve. @return DatabaseMap The named <code>Datab...
[ "Returns", "the", "database", "map", "information", ".", "Name", "relates", "to", "the", "name", "of", "the", "connection", "pool", "to", "associate", "with", "the", "map", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L471-L486
propelorm/Propel
runtime/lib/Propel.php
Propel.setDatabaseMap
public static function setDatabaseMap($name, DatabaseMap $map) { if ($name === null) { $name = self::getDefaultDB(); } self::$dbMaps[$name] = $map; }
php
public static function setDatabaseMap($name, DatabaseMap $map) { if ($name === null) { $name = self::getDefaultDB(); } self::$dbMaps[$name] = $map; }
[ "public", "static", "function", "setDatabaseMap", "(", "$", "name", ",", "DatabaseMap", "$", "map", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "$", "name", "=", "self", "::", "getDefaultDB", "(", ")", ";", "}", "self", "::", "$", "d...
Sets the database map object to use for specified datasource. @param string $name The datasource name. @param DatabaseMap $map The database map object to use for specified datasource.
[ "Sets", "the", "database", "map", "object", "to", "use", "for", "specified", "datasource", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L494-L500
propelorm/Propel
runtime/lib/Propel.php
Propel.setConnection
public static function setConnection($name, PropelPDO $con, $mode = Propel::CONNECTION_WRITE) { if ($name === null) { $name = self::getDefaultDB(); } if ($mode == Propel::CONNECTION_READ) { self::$connectionMap[$name]['slave'] = $con; } else { self...
php
public static function setConnection($name, PropelPDO $con, $mode = Propel::CONNECTION_WRITE) { if ($name === null) { $name = self::getDefaultDB(); } if ($mode == Propel::CONNECTION_READ) { self::$connectionMap[$name]['slave'] = $con; } else { self...
[ "public", "static", "function", "setConnection", "(", "$", "name", ",", "PropelPDO", "$", "con", ",", "$", "mode", "=", "Propel", "::", "CONNECTION_WRITE", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "$", "name", "=", "self", "::", "ge...
Sets a Connection for specified datasource name. @param string $name The datasource name for the connection being set. @param PropelPDO $con The PDO connection. @param string $mode Whether this is a READ or WRITE connection (Propel::CONNECTION_READ, Propel::CONNECTION_WRITE)
[ "Sets", "a", "Connection", "for", "specified", "datasource", "name", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L529-L539
propelorm/Propel
runtime/lib/Propel.php
Propel.getConnection
public static function getConnection($name = null, $mode = Propel::CONNECTION_WRITE) { if ($name === null) { $name = self::getDefaultDB(); } // IF a WRITE-mode connection was requested // or Propel is configured to always use the master connection // THEN return ...
php
public static function getConnection($name = null, $mode = Propel::CONNECTION_WRITE) { if ($name === null) { $name = self::getDefaultDB(); } // IF a WRITE-mode connection was requested // or Propel is configured to always use the master connection // THEN return ...
[ "public", "static", "function", "getConnection", "(", "$", "name", "=", "null", ",", "$", "mode", "=", "Propel", "::", "CONNECTION_WRITE", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "$", "name", "=", "self", "::", "getDefaultDB", "(", ...
Gets an already-opened PDO connection or opens a new one for passed-in db name. @param string $name The datasource name that is used to look up the DSN from the runtime configuration file. @param string $mode The connection mode (this applies to replication systems). @return PDO A database connection @throws PropelE...
[ "Gets", "an", "already", "-", "opened", "PDO", "connection", "or", "opens", "a", "new", "one", "for", "passed", "-", "in", "db", "name", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L551-L565
propelorm/Propel
runtime/lib/Propel.php
Propel.getMasterConnection
public static function getMasterConnection($name) { if (!isset(self::$connectionMap[$name]['master'])) { // load connection parameter for master connection $conparams = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['conne...
php
public static function getMasterConnection($name) { if (!isset(self::$connectionMap[$name]['master'])) { // load connection parameter for master connection $conparams = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['conne...
[ "public", "static", "function", "getMasterConnection", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "connectionMap", "[", "$", "name", "]", "[", "'master'", "]", ")", ")", "{", "// load connection parameter for master connection...
Gets an already-opened write PDO connection or opens a new one for passed-in db name. @param string $name The datasource name that is used to look up the DSN from the runtime configuation file. Empty name not allowed. @return PDO A database connection @throws PropelException - if connection cannot be configured or i...
[ "Gets", "an", "already", "-", "opened", "write", "PDO", "connection", "or", "opens", "a", "new", "one", "for", "passed", "-", "in", "db", "name", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L577-L591
propelorm/Propel
runtime/lib/Propel.php
Propel.getSlaveConnection
public static function getSlaveConnection($name) { if (!isset(self::$connectionMap[$name]['slave'])) { $slaveconfigs = isset(self::$configuration['datasources'][$name]['slaves']) ? self::$configuration['datasources'][$name]['slaves'] : null; if (empty($slaveconfigs)) { ...
php
public static function getSlaveConnection($name) { if (!isset(self::$connectionMap[$name]['slave'])) { $slaveconfigs = isset(self::$configuration['datasources'][$name]['slaves']) ? self::$configuration['datasources'][$name]['slaves'] : null; if (empty($slaveconfigs)) { ...
[ "public", "static", "function", "getSlaveConnection", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "connectionMap", "[", "$", "name", "]", "[", "'slave'", "]", ")", ")", "{", "$", "slaveconfigs", "=", "isset", "(", "se...
Gets an already-opened read PDO connection or opens a new one for passed-in db name. @param string $name The datasource name that is used to look up the DSN from the runtime configuation file. Empty name not allowed. @return PDO A database connection @throws PropelException - if connection cannot be configured or in...
[ "Gets", "an", "already", "-", "opened", "read", "PDO", "connection", "or", "opens", "a", "new", "one", "for", "passed", "-", "in", "db", "name", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L603-L635
propelorm/Propel
runtime/lib/Propel.php
Propel.initConnection
public static function initConnection($conparams, $name, $defaultClass = Propel::CLASS_PROPEL_PDO) { $adapter = isset($conparams['adapter']) ? DBAdapter::factory($conparams['adapter']) : self::getDB($name); if (null === $conparams['dsn']) { throw new PropelException('No dsn specified in...
php
public static function initConnection($conparams, $name, $defaultClass = Propel::CLASS_PROPEL_PDO) { $adapter = isset($conparams['adapter']) ? DBAdapter::factory($conparams['adapter']) : self::getDB($name); if (null === $conparams['dsn']) { throw new PropelException('No dsn specified in...
[ "public", "static", "function", "initConnection", "(", "$", "conparams", ",", "$", "name", ",", "$", "defaultClass", "=", "Propel", "::", "CLASS_PROPEL_PDO", ")", "{", "$", "adapter", "=", "isset", "(", "$", "conparams", "[", "'adapter'", "]", ")", "?", ...
Opens a new PDO connection for passed-in db name. @param array $conparams Connection paramters. @param string $name Datasource name. @param string $defaultClass The PDO subclass to instantiate if there is no explicit classname specified in the connection params (default is Propel::CLASS_PROPEL_PDO) @retur...
[ "Opens", "a", "new", "PDO", "connection", "for", "passed", "-", "in", "db", "name", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L649-L709
propelorm/Propel
runtime/lib/Propel.php
Propel.processDriverOptions
private static function processDriverOptions($source, &$write_to) { foreach ($source as $option => $optiondata) { if (is_string($option) && strpos($option, '::') !== false) { $key = $option; } elseif (is_string($option)) { $key = 'PropelPDO::' . $optio...
php
private static function processDriverOptions($source, &$write_to) { foreach ($source as $option => $optiondata) { if (is_string($option) && strpos($option, '::') !== false) { $key = $option; } elseif (is_string($option)) { $key = 'PropelPDO::' . $optio...
[ "private", "static", "function", "processDriverOptions", "(", "$", "source", ",", "&", "$", "write_to", ")", "{", "foreach", "(", "$", "source", "as", "$", "option", "=>", "$", "optiondata", ")", "{", "if", "(", "is_string", "(", "$", "option", ")", "&...
Internal function to handle driver options or conneciton attributes in PDO. Process the INI file flags to be passed to each connection. @param array Where to find the list of constant flags and their new setting. @param array Put the data into here @throws PropelException If invalid options were specified.
[ "Internal", "function", "to", "handle", "driver", "options", "or", "conneciton", "attributes", "in", "PDO", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L721-L744
propelorm/Propel
runtime/lib/Propel.php
Propel.getDB
public static function getDB($name = null) { if ($name === null) { $name = self::getDefaultDB(); } if (!isset(self::$adapterMap[$name])) { if (!isset(self::$configuration['datasources'][$name]['adapter'])) { throw new PropelException("Unable to find a...
php
public static function getDB($name = null) { if ($name === null) { $name = self::getDefaultDB(); } if (!isset(self::$adapterMap[$name])) { if (!isset(self::$configuration['datasources'][$name]['adapter'])) { throw new PropelException("Unable to find a...
[ "public", "static", "function", "getDB", "(", "$", "name", "=", "null", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "$", "name", "=", "self", "::", "getDefaultDB", "(", ")", ";", "}", "if", "(", "!", "isset", "(", "self", "::", "...
Returns database adapter for a specific datasource. @param string The datasource name. @return DBAdapter The corresponding database adapter. @throws PropelException If unable to find DBdapter for specified db.
[ "Returns", "database", "adapter", "for", "a", "specific", "datasource", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L755-L771
propelorm/Propel
runtime/lib/Propel.php
Propel.setDB
public static function setDB($name, DBAdapter $adapter) { if ($name === null) { $name = self::getDefaultDB(); } self::$adapterMap[$name] = $adapter; }
php
public static function setDB($name, DBAdapter $adapter) { if ($name === null) { $name = self::getDefaultDB(); } self::$adapterMap[$name] = $adapter; }
[ "public", "static", "function", "setDB", "(", "$", "name", ",", "DBAdapter", "$", "adapter", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "$", "name", "=", "self", "::", "getDefaultDB", "(", ")", ";", "}", "self", "::", "$", "adapterM...
Sets a database adapter for specified datasource. @param string $name The datasource name. @param DBAdapter $adapter The DBAdapter implementation to use.
[ "Sets", "a", "database", "adapter", "for", "specified", "datasource", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L779-L785
propelorm/Propel
runtime/lib/Propel.php
Propel.getDefaultDB
public static function getDefaultDB() { if (self::$defaultDBName === null) { // Determine default database name. self::$defaultDBName = isset(self::$configuration['datasources']['default']) && is_scalar(self::$configuration['datasources']['default']) ? self::$configuration['datasourc...
php
public static function getDefaultDB() { if (self::$defaultDBName === null) { // Determine default database name. self::$defaultDBName = isset(self::$configuration['datasources']['default']) && is_scalar(self::$configuration['datasources']['default']) ? self::$configuration['datasourc...
[ "public", "static", "function", "getDefaultDB", "(", ")", "{", "if", "(", "self", "::", "$", "defaultDBName", "===", "null", ")", "{", "// Determine default database name.", "self", "::", "$", "defaultDBName", "=", "isset", "(", "self", "::", "$", "configurati...
Returns the name of the default database. @return string Name of the default DB
[ "Returns", "the", "name", "of", "the", "default", "database", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L792-L800
propelorm/Propel
runtime/lib/Propel.php
Propel.autoload
public static function autoload($className) { if (isset(self::$autoloadMap[$className])) { require self::$baseDir . self::$autoloadMap[$className]; return true; } return false; }
php
public static function autoload($className) { if (isset(self::$autoloadMap[$className])) { require self::$baseDir . self::$autoloadMap[$className]; return true; } return false; }
[ "public", "static", "function", "autoload", "(", "$", "className", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "autoloadMap", "[", "$", "className", "]", ")", ")", "{", "require", "self", "::", "$", "baseDir", ".", "self", "::", "$", "autol...
Autoload function for loading propel dependencies. @param string The class name needing loading. @return boolean TRUE if the class was loaded, false otherwise.
[ "Autoload", "function", "for", "loading", "propel", "dependencies", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L823-L832
propelorm/Propel
runtime/lib/Propel.php
Propel.importClass
public static function importClass($path) { // extract classname if (($pos = strrpos($path, '.')) === false) { $class = $path; } else { $class = substr($path, $pos + 1); } // check if class exists, using autoloader to attempt to load it. if (c...
php
public static function importClass($path) { // extract classname if (($pos = strrpos($path, '.')) === false) { $class = $path; } else { $class = substr($path, $pos + 1); } // check if class exists, using autoloader to attempt to load it. if (c...
[ "public", "static", "function", "importClass", "(", "$", "path", ")", "{", "// extract classname", "if", "(", "(", "$", "pos", "=", "strrpos", "(", "$", "path", ",", "'.'", ")", ")", "===", "false", ")", "{", "$", "class", "=", "$", "path", ";", "}...
Include once a file specified in DOT notation and return unqualified classname. Typically, Propel uses autoload is used to load classes and expects that all classes referenced within Propel are included in Propel's autoload map. This method is only called when a specific non-Propel classname was specified -- for exam...
[ "Include", "once", "a", "file", "specified", "in", "DOT", "notation", "and", "return", "unqualified", "classname", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/Propel.php#L859-L884
propelorm/Propel
generator/lib/task/PropelDataSQLTask.php
PropelDataSQLTask.getDatabase
private function getDatabase($name) { foreach ($this->getDataModels() as $dm) { foreach ($dm->getDatabases() as $db) { if ($db->getName() == $name) { return $db; } } } }
php
private function getDatabase($name) { foreach ($this->getDataModels() as $dm) { foreach ($dm->getDatabases() as $db) { if ($db->getName() == $name) { return $db; } } } }
[ "private", "function", "getDatabase", "(", "$", "name", ")", "{", "foreach", "(", "$", "this", "->", "getDataModels", "(", ")", "as", "$", "dm", ")", "{", "foreach", "(", "$", "dm", "->", "getDatabases", "(", ")", "as", "$", "db", ")", "{", "if", ...
Search through all data models looking for matching database. @return Database or NULL if none found.
[ "Search", "through", "all", "data", "models", "looking", "for", "matching", "database", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/task/PropelDataSQLTask.php#L119-L128
propelorm/Propel
generator/lib/task/PropelDataSQLTask.php
PropelDataSQLTask.main
public function main() { $this->validate(); $targetDatabase = $this->getTargetDatabase(); $platform = $this->getGeneratorConfig()->getConfiguredPlatform(); // Load the Data XML -> DB Name properties $map = new Properties(); try { $map->load($this->getDa...
php
public function main() { $this->validate(); $targetDatabase = $this->getTargetDatabase(); $platform = $this->getGeneratorConfig()->getConfiguredPlatform(); // Load the Data XML -> DB Name properties $map = new Properties(); try { $map->load($this->getDa...
[ "public", "function", "main", "(", ")", "{", "$", "this", "->", "validate", "(", ")", ";", "$", "targetDatabase", "=", "$", "this", "->", "getTargetDatabase", "(", ")", ";", "$", "platform", "=", "$", "this", "->", "getGeneratorConfig", "(", ")", "->",...
Main method parses the XML files and creates SQL files. @return void @throws Exception If there is an error parsing the data xml. @throws BuildException
[ "Main", "method", "parses", "the", "XML", "files", "and", "creates", "SQL", "files", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/task/PropelDataSQLTask.php#L137-L196
propelorm/Propel
generator/lib/behavior/SoftDeleteBehavior.php
SoftDeleteBehavior.modifyTable
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('deleted_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('deleted_column'), 'type' => 'TIMESTAMP' )); } }
php
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('deleted_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('deleted_column'), 'type' => 'TIMESTAMP' )); } }
[ "public", "function", "modifyTable", "(", ")", "{", "if", "(", "!", "$", "this", "->", "getTable", "(", ")", "->", "containsColumn", "(", "$", "this", "->", "getParameter", "(", "'deleted_column'", ")", ")", ")", "{", "$", "this", "->", "getTable", "("...
Add the deleted_column to the current table
[ "Add", "the", "deleted_column", "to", "the", "current", "table" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/SoftDeleteBehavior.php#L30-L38
propelorm/Propel
generator/lib/builder/om/PHP5ExtensionObjectBuilder.php
PHP5ExtensionObjectBuilder.addIncludes
protected function addIncludes(&$script) { switch ($this->getTable()->treeMode()) { case 'NestedSet': $requiredClassFilePath = $this->getNestedSetBuilder()->getClassFilePath(); break; case 'MaterializedPath': case 'AdjacencyList': ...
php
protected function addIncludes(&$script) { switch ($this->getTable()->treeMode()) { case 'NestedSet': $requiredClassFilePath = $this->getNestedSetBuilder()->getClassFilePath(); break; case 'MaterializedPath': case 'AdjacencyList': ...
[ "protected", "function", "addIncludes", "(", "&", "$", "script", ")", "{", "switch", "(", "$", "this", "->", "getTable", "(", ")", "->", "treeMode", "(", ")", ")", "{", "case", "'NestedSet'", ":", "$", "requiredClassFilePath", "=", "$", "this", "->", "...
Adds the include() statements for files that this class depends on or utilizes. @param string &$script The script will be modified in this method.
[ "Adds", "the", "include", "()", "statements", "for", "files", "that", "this", "class", "depends", "on", "or", "utilizes", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ExtensionObjectBuilder.php#L40-L57
propelorm/Propel
generator/lib/builder/om/PHP5ExtensionObjectBuilder.php
PHP5ExtensionObjectBuilder.addClassOpen
protected function addClassOpen(&$script) { $table = $this->getTable(); $this->declareClassFromBuilder($this->getObjectBuilder()); $tableName = $table->getName(); $tableDesc = $table->getDescription(); switch ($table->treeMode()) { case 'NestedSet': ...
php
protected function addClassOpen(&$script) { $table = $this->getTable(); $this->declareClassFromBuilder($this->getObjectBuilder()); $tableName = $table->getName(); $tableDesc = $table->getDescription(); switch ($table->treeMode()) { case 'NestedSet': ...
[ "protected", "function", "addClassOpen", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "this", "->", "declareClassFromBuilder", "(", "$", "this", "->", "getObjectBuilder", "(", ")", ")", ";", "...
Adds class phpdoc comment and opening of class. @param string &$script The script will be modified in this method.
[ "Adds", "class", "phpdoc", "comment", "and", "opening", "of", "class", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ExtensionObjectBuilder.php#L64-L111
propelorm/Propel
generator/lib/task/PropelGraphvizTask.php
PropelGraphvizTask.setOutputDirectory
public function setOutputDirectory(PhingFile $out) { if (!$out->exists()) { $out->mkdirs(); } $this->outDir = $out; }
php
public function setOutputDirectory(PhingFile $out) { if (!$out->exists()) { $out->mkdirs(); } $this->outDir = $out; }
[ "public", "function", "setOutputDirectory", "(", "PhingFile", "$", "out", ")", "{", "if", "(", "!", "$", "out", "->", "exists", "(", ")", ")", "{", "$", "out", "->", "mkdirs", "(", ")", ";", "}", "$", "this", "->", "outDir", "=", "$", "out", ";",...
Set the sqldbmap. @param PhingFile $out The db map.
[ "Set", "the", "sqldbmap", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/task/PropelGraphvizTask.php#L48-L54
propelorm/Propel
generator/lib/task/PropelGraphvizTask.php
PropelGraphvizTask.writeDot
public function writeDot($dotSyntax, PhingFile $outputDir, $baseFilename) { $file = new PhingFile($outputDir, $baseFilename . '.schema.dot'); $this->log("Writing dot file to " . $file->getAbsolutePath()); file_put_contents($file->getAbsolutePath(), $dotSyntax); }
php
public function writeDot($dotSyntax, PhingFile $outputDir, $baseFilename) { $file = new PhingFile($outputDir, $baseFilename . '.schema.dot'); $this->log("Writing dot file to " . $file->getAbsolutePath()); file_put_contents($file->getAbsolutePath(), $dotSyntax); }
[ "public", "function", "writeDot", "(", "$", "dotSyntax", ",", "PhingFile", "$", "outputDir", ",", "$", "baseFilename", ")", "{", "$", "file", "=", "new", "PhingFile", "(", "$", "outputDir", ",", "$", "baseFilename", ".", "'.schema.dot'", ")", ";", "$", "...
probably insecure
[ "probably", "insecure" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/task/PropelGraphvizTask.php#L109-L114
propelorm/Propel
generator/lib/model/Inheritance.php
Inheritance.setupObject
protected function setupObject() { // Clean key from special characters not allowed in constant names $this->key = rtrim(preg_replace('/(\W|_)+/', '_', $this->getAttribute("key")), '_'); $this->className = $this->getAttribute("class"); $this->pkg = $this->getAttribute("package"); ...
php
protected function setupObject() { // Clean key from special characters not allowed in constant names $this->key = rtrim(preg_replace('/(\W|_)+/', '_', $this->getAttribute("key")), '_'); $this->className = $this->getAttribute("class"); $this->pkg = $this->getAttribute("package"); ...
[ "protected", "function", "setupObject", "(", ")", "{", "// Clean key from special characters not allowed in constant names", "$", "this", "->", "key", "=", "rtrim", "(", "preg_replace", "(", "'/(\\W|_)+/'", ",", "'_'", ",", "$", "this", "->", "getAttribute", "(", "\...
Sets up the Inheritance object based on the attributes that were passed to loadFromXML(). @see parent::loadFromXML()
[ "Sets", "up", "the", "Inheritance", "object", "based", "on", "the", "attributes", "that", "were", "passed", "to", "loadFromXML", "()", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/Inheritance.php#L35-L42
propelorm/Propel
runtime/lib/adapter/DBOracle.php
DBOracle.initConnection
public function initConnection(PDO $con, array $settings) { $con->exec("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'"); $con->exec("ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'"); if (isset($settings['queries']) && is_array($settings['queries'])) { foreach ($s...
php
public function initConnection(PDO $con, array $settings) { $con->exec("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'"); $con->exec("ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'"); if (isset($settings['queries']) && is_array($settings['queries'])) { foreach ($s...
[ "public", "function", "initConnection", "(", "PDO", "$", "con", ",", "array", "$", "settings", ")", "{", "$", "con", "->", "exec", "(", "\"ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'\"", ")", ";", "$", "con", "->", "exec", "(", "\"ALTER SESSION SET NLS_TIMESTAM...
This method is called after a connection was created to run necessary post-initialization queries or code. Removes the charset query and adds the date queries @see parent::initConnection() @param PDO $con @param array $settings A $PDO PDO connection instance
[ "This", "method", "is", "called", "after", "a", "connection", "was", "created", "to", "run", "necessary", "post", "-", "initialization", "queries", "or", "code", ".", "Removes", "the", "charset", "query", "and", "adds", "the", "date", "queries" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBOracle.php#L35-L46
propelorm/Propel
runtime/lib/adapter/DBOracle.php
DBOracle.applyLimit
public function applyLimit(&$sql, $offset, $limit, $criteria = null) { if (BasePeer::needsSelectAliases($criteria)) { $crit = clone $criteria; $selectSql = $this->createSelectSqlPart($crit, $params, true); $sql = $selectSql . substr($sql, strpos($sql, 'FROM') - 1); ...
php
public function applyLimit(&$sql, $offset, $limit, $criteria = null) { if (BasePeer::needsSelectAliases($criteria)) { $crit = clone $criteria; $selectSql = $this->createSelectSqlPart($crit, $params, true); $sql = $selectSql . substr($sql, strpos($sql, 'FROM') - 1); ...
[ "public", "function", "applyLimit", "(", "&", "$", "sql", ",", "$", "offset", ",", "$", "limit", ",", "$", "criteria", "=", "null", ")", "{", "if", "(", "BasePeer", "::", "needsSelectAliases", "(", "$", "criteria", ")", ")", "{", "$", "crit", "=", ...
@see DBAdapter::applyLimit() @param string $sql @param integer $offset @param integer $limit @param null|Criteria $criteria
[ "@see", "DBAdapter", "::", "applyLimit", "()" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBOracle.php#L119-L138
propelorm/Propel
runtime/lib/adapter/DBOracle.php
DBOracle.getId
public function getId(PDO $con, $name = null) { if ($name === null) { throw new PropelException("Unable to fetch next sequence ID without sequence name."); } $stmt = $con->query("SELECT " . $name . ".nextval FROM dual"); $row = $stmt->fetch(PDO::FETCH_NUM); retu...
php
public function getId(PDO $con, $name = null) { if ($name === null) { throw new PropelException("Unable to fetch next sequence ID without sequence name."); } $stmt = $con->query("SELECT " . $name . ".nextval FROM dual"); $row = $stmt->fetch(PDO::FETCH_NUM); retu...
[ "public", "function", "getId", "(", "PDO", "$", "con", ",", "$", "name", "=", "null", ")", "{", "if", "(", "$", "name", "===", "null", ")", "{", "throw", "new", "PropelException", "(", "\"Unable to fetch next sequence ID without sequence name.\"", ")", ";", ...
@param PDO $con @param string $name @throws PropelException @return integer
[ "@param", "PDO", "$con", "@param", "string", "$name" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBOracle.php#L155-L165
propelorm/Propel
runtime/lib/adapter/DBOracle.php
DBOracle.doExplainPlan
public function doExplainPlan(PropelPDO $con, $query) { $con->beginTransaction(); if ($query instanceof ModelCriteria) { $params = array(); $dbMap = Propel::getDatabaseMap($query->getDbName()); $sql = BasePeer::createSelectSql($query, $params); } else { ...
php
public function doExplainPlan(PropelPDO $con, $query) { $con->beginTransaction(); if ($query instanceof ModelCriteria) { $params = array(); $dbMap = Propel::getDatabaseMap($query->getDbName()); $sql = BasePeer::createSelectSql($query, $params); } else { ...
[ "public", "function", "doExplainPlan", "(", "PropelPDO", "$", "con", ",", "$", "query", ")", "{", "$", "con", "->", "beginTransaction", "(", ")", ";", "if", "(", "$", "query", "instanceof", "ModelCriteria", ")", "{", "$", "params", "=", "array", "(", "...
Do Explain Plan for query object or query string @param PropelPDO $con propel connection @param ModelCriteria|string $query query the criteria or the query string @throws PropelException @return PDOStatement A PDO statement executed using the connection, ready to be fetched
[ "Do", "Explain", "Plan", "for", "query", "object", "or", "query", "string" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBOracle.php#L254-L281
propelorm/Propel
generator/lib/config/GeneratorConfig.php
GeneratorConfig.setBuildProperties
public function setBuildProperties($props) { $this->buildProperties = array(); $renamedPropelProps = array(); foreach ($props as $key => $propValue) { if (strpos($key, "propel.") === 0) { $newKey = substr($key, strlen("propel.")); $j = strpos($new...
php
public function setBuildProperties($props) { $this->buildProperties = array(); $renamedPropelProps = array(); foreach ($props as $key => $propValue) { if (strpos($key, "propel.") === 0) { $newKey = substr($key, strlen("propel.")); $j = strpos($new...
[ "public", "function", "setBuildProperties", "(", "$", "props", ")", "{", "$", "this", "->", "buildProperties", "=", "array", "(", ")", ";", "$", "renamedPropelProps", "=", "array", "(", ")", ";", "foreach", "(", "$", "props", "as", "$", "key", "=>", "$...
Parses the passed-in properties, renaming and saving eligible properties in this object. Renames the propel.xxx properties to just xxx and renames any xxx.yyy properties to xxxYyy as PHP doesn't like the xxx.yyy syntax. @param mixed $props Array or Iterator
[ "Parses", "the", "passed", "-", "in", "properties", "renaming", "and", "saving", "eligible", "properties", "in", "this", "object", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/config/GeneratorConfig.php#L64-L80
propelorm/Propel
generator/lib/config/GeneratorConfig.php
GeneratorConfig.getBuildProperty
public function getBuildProperty($name) { return isset($this->buildProperties[$name]) ? $this->buildProperties[$name] : null; }
php
public function getBuildProperty($name) { return isset($this->buildProperties[$name]) ? $this->buildProperties[$name] : null; }
[ "public", "function", "getBuildProperty", "(", "$", "name", ")", "{", "return", "isset", "(", "$", "this", "->", "buildProperties", "[", "$", "name", "]", ")", "?", "$", "this", "->", "buildProperties", "[", "$", "name", "]", ":", "null", ";", "}" ]
Gets a specific propel (renamed) property from the build. @param string $name @return mixed
[ "Gets", "a", "specific", "propel", "(", "renamed", ")", "property", "from", "the", "build", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/config/GeneratorConfig.php#L89-L92
propelorm/Propel
generator/lib/config/GeneratorConfig.php
GeneratorConfig.getClassname
public function getClassname($propname) { $classpath = $this->getBuildProperty($propname); if (null === $classpath) { throw new BuildException("Unable to find class path for '$propname' property."); } // This is a slight hack to workaround camel case inconsistencies for ...
php
public function getClassname($propname) { $classpath = $this->getBuildProperty($propname); if (null === $classpath) { throw new BuildException("Unable to find class path for '$propname' property."); } // This is a slight hack to workaround camel case inconsistencies for ...
[ "public", "function", "getClassname", "(", "$", "propname", ")", "{", "$", "classpath", "=", "$", "this", "->", "getBuildProperty", "(", "$", "propname", ")", ";", "if", "(", "null", "===", "$", "classpath", ")", "{", "throw", "new", "BuildException", "(...
Resolves and returns the class name based on the specified property value. @param string $propname The name of the property that holds the class path (dot-path notation). @return string The class name. @throws BuildException If the classname cannot be determined or class cannot be loaded.
[ "Resolves", "and", "returns", "the", "class", "name", "based", "on", "the", "specified", "property", "value", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/config/GeneratorConfig.php#L113-L140
propelorm/Propel
generator/lib/config/GeneratorConfig.php
GeneratorConfig.getConfiguredPlatform
public function getConfiguredPlatform(PDO $con = null, $database = null) { $buildConnection = $this->getBuildConnection($database); //First try to load platform from the user provided build properties if ($this->getBuildProperty('platformClass')) { // propel.platform.class = plat...
php
public function getConfiguredPlatform(PDO $con = null, $database = null) { $buildConnection = $this->getBuildConnection($database); //First try to load platform from the user provided build properties if ($this->getBuildProperty('platformClass')) { // propel.platform.class = plat...
[ "public", "function", "getConfiguredPlatform", "(", "PDO", "$", "con", "=", "null", ",", "$", "database", "=", "null", ")", "{", "$", "buildConnection", "=", "$", "this", "->", "getBuildConnection", "(", "$", "database", ")", ";", "//First try to load platform...
Creates and configures a new Platform class. @param PDO $con @return Platform @throws BuildException
[ "Creates", "and", "configures", "a", "new", "Platform", "class", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/config/GeneratorConfig.php#L164-L191
propelorm/Propel
generator/lib/config/GeneratorConfig.php
GeneratorConfig.getConfiguredSchemaParser
public function getConfiguredSchemaParser(PDO $con = null) { $clazz = $this->getClassname("reverseParserClass"); $parser = new $clazz(); if (!$parser instanceof SchemaParser) { throw new BuildException("Specified platform class ($clazz) does implement SchemaParser interface.", $t...
php
public function getConfiguredSchemaParser(PDO $con = null) { $clazz = $this->getClassname("reverseParserClass"); $parser = new $clazz(); if (!$parser instanceof SchemaParser) { throw new BuildException("Specified platform class ($clazz) does implement SchemaParser interface.", $t...
[ "public", "function", "getConfiguredSchemaParser", "(", "PDO", "$", "con", "=", "null", ")", "{", "$", "clazz", "=", "$", "this", "->", "getClassname", "(", "\"reverseParserClass\"", ")", ";", "$", "parser", "=", "new", "$", "clazz", "(", ")", ";", "if",...
Creates and configures a new SchemaParser class for specified platform. @param PDO $con @return SchemaParser @throws BuildException
[ "Creates", "and", "configures", "a", "new", "SchemaParser", "class", "for", "specified", "platform", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/config/GeneratorConfig.php#L201-L213
propelorm/Propel
generator/lib/config/GeneratorConfig.php
GeneratorConfig.getConfiguredBuilder
public function getConfiguredBuilder(Table $table, $type, $cache = true) { $classname = $this->getBuilderClassname($type); $builder = new $classname($table); $builder->setGeneratorConfig($this); return $builder; }
php
public function getConfiguredBuilder(Table $table, $type, $cache = true) { $classname = $this->getBuilderClassname($type); $builder = new $classname($table); $builder->setGeneratorConfig($this); return $builder; }
[ "public", "function", "getConfiguredBuilder", "(", "Table", "$", "table", ",", "$", "type", ",", "$", "cache", "=", "true", ")", "{", "$", "classname", "=", "$", "this", "->", "getBuilderClassname", "(", "$", "type", ")", ";", "$", "builder", "=", "new...
Gets a configured data model builder class for specified table and based on type. @param Table $table @param string $type The type of builder ('ddl', 'sql', etc.) @return DataModelBuilder
[ "Gets", "a", "configured", "data", "model", "builder", "class", "for", "specified", "table", "and", "based", "on", "type", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/config/GeneratorConfig.php#L223-L230
propelorm/Propel
generator/lib/config/GeneratorConfig.php
GeneratorConfig.getConfiguredBehavior
public function getConfiguredBehavior($name) { $propname = 'behavior' . ucfirst(strtolower($name)) . 'Class'; try { $ret = $this->getClassname($propname); } catch (BuildException $e) { // class path not configured $ret = false; } return $r...
php
public function getConfiguredBehavior($name) { $propname = 'behavior' . ucfirst(strtolower($name)) . 'Class'; try { $ret = $this->getClassname($propname); } catch (BuildException $e) { // class path not configured $ret = false; } return $r...
[ "public", "function", "getConfiguredBehavior", "(", "$", "name", ")", "{", "$", "propname", "=", "'behavior'", ".", "ucfirst", "(", "strtolower", "(", "$", "name", ")", ")", ".", "'Class'", ";", "try", "{", "$", "ret", "=", "$", "this", "->", "getClass...
Gets a configured behavior class @param string $name a behavior name @return string a behavior class name
[ "Gets", "a", "configured", "behavior", "class" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/config/GeneratorConfig.php#L252-L263
propelorm/Propel
generator/lib/reverse/mssql/MssqlSchemaParser.php
MssqlSchemaParser.addIndexes
protected function addIndexes(Table $table) { $stmt = $this->dbh->query("sp_indexes_rowset '" . $table->getName() . "'"); $indexes = array(); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $colName = $this->cleanDelimitedIdentifiers($row["COLUMN_NAME"]); $name = $th...
php
protected function addIndexes(Table $table) { $stmt = $this->dbh->query("sp_indexes_rowset '" . $table->getName() . "'"); $indexes = array(); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $colName = $this->cleanDelimitedIdentifiers($row["COLUMN_NAME"]); $name = $th...
[ "protected", "function", "addIndexes", "(", "Table", "$", "table", ")", "{", "$", "stmt", "=", "$", "this", "->", "dbh", "->", "query", "(", "\"sp_indexes_rowset '\"", ".", "$", "table", "->", "getName", "(", ")", ".", "\"'\"", ")", ";", "$", "indexes"...
Load indexes for this table
[ "Load", "indexes", "for", "this", "table" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/reverse/mssql/MssqlSchemaParser.php#L198-L215
propelorm/Propel
generator/lib/behavior/sluggable/SluggableBehavior.php
SluggableBehavior.modifyTable
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('slug_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('slug_column'), 'type' => 'VARCHAR', 'size' => 255 )); ...
php
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('slug_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('slug_column'), 'type' => 'VARCHAR', 'size' => 255 )); ...
[ "public", "function", "modifyTable", "(", ")", "{", "if", "(", "!", "$", "this", "->", "getTable", "(", ")", "->", "containsColumn", "(", "$", "this", "->", "getParameter", "(", "'slug_column'", ")", ")", ")", "{", "$", "this", "->", "getTable", "(", ...
Add the slug_column to the current table
[ "Add", "the", "slug_column", "to", "the", "current", "table" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/sluggable/SluggableBehavior.php#L36-L53
propelorm/Propel
runtime/lib/validator/NotMatchValidator.php
NotMatchValidator.prepareRegexp
private function prepareRegexp($exp) { // remove surrounding '/' marks so that they don't get escaped in next step if ($exp{0} !== '/' || $exp{strlen($exp) - 1} !== '/') { $exp = '/' . $exp . '/'; } // if they did not escape / chars; we do that for them $exp = pr...
php
private function prepareRegexp($exp) { // remove surrounding '/' marks so that they don't get escaped in next step if ($exp{0} !== '/' || $exp{strlen($exp) - 1} !== '/') { $exp = '/' . $exp . '/'; } // if they did not escape / chars; we do that for them $exp = pr...
[ "private", "function", "prepareRegexp", "(", "$", "exp", ")", "{", "// remove surrounding '/' marks so that they don't get escaped in next step", "if", "(", "$", "exp", "{", "0", "}", "!==", "'/'", "||", "$", "exp", "{", "strlen", "(", "$", "exp", ")", "-", "1...
Prepares the regular expression entered in the XML for use with preg_match(). @param string $exp @return string
[ "Prepares", "the", "regular", "expression", "entered", "in", "the", "XML", "for", "use", "with", "preg_match", "()", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/validator/NotMatchValidator.php#L48-L59
propelorm/Propel
runtime/lib/validator/NotMatchValidator.php
NotMatchValidator.isValid
public function isValid(ValidatorMap $map, $str) { return (preg_match($this->prepareRegexp($map->getValue()), $str) == 0); }
php
public function isValid(ValidatorMap $map, $str) { return (preg_match($this->prepareRegexp($map->getValue()), $str) == 0); }
[ "public", "function", "isValid", "(", "ValidatorMap", "$", "map", ",", "$", "str", ")", "{", "return", "(", "preg_match", "(", "$", "this", "->", "prepareRegexp", "(", "$", "map", "->", "getValue", "(", ")", ")", ",", "$", "str", ")", "==", "0", ")...
@see BasicValidator::isValid() @param ValidatorMap $map @param string $str @return boolean
[ "@see", "BasicValidator", "::", "isValid", "()" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/validator/NotMatchValidator.php#L69-L72
propelorm/Propel
runtime/lib/collection/PropelOnDemandIterator.php
PropelOnDemandIterator.next
public function next() { $this->currentRow = $this->stmt->fetch(PDO::FETCH_NUM); $this->currentKey++; $this->isValid = (boolean) $this->currentRow; if (!$this->isValid) { $this->closeCursor(); if ($this->enableInstancePoolingOnFinish) { Propel:...
php
public function next() { $this->currentRow = $this->stmt->fetch(PDO::FETCH_NUM); $this->currentKey++; $this->isValid = (boolean) $this->currentRow; if (!$this->isValid) { $this->closeCursor(); if ($this->enableInstancePoolingOnFinish) { Propel:...
[ "public", "function", "next", "(", ")", "{", "$", "this", "->", "currentRow", "=", "$", "this", "->", "stmt", "->", "fetch", "(", "PDO", "::", "FETCH_NUM", ")", ";", "$", "this", "->", "currentKey", "++", ";", "$", "this", "->", "isValid", "=", "("...
Advances the cursor in the statement Closes the cursor if the end of the statement is reached
[ "Advances", "the", "cursor", "in", "the", "statement", "Closes", "the", "cursor", "if", "the", "end", "of", "the", "statement", "is", "reached" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelOnDemandIterator.php#L97-L108
propelorm/Propel
runtime/lib/collection/PropelOnDemandIterator.php
PropelOnDemandIterator.rewind
public function rewind() { // check that the hydration can begin if (null === $this->formatter) { throw new PropelException('The On Demand collection requires a formatter. Add it by calling setFormatter()'); } if (null === $this->stmt) { throw new PropelExcept...
php
public function rewind() { // check that the hydration can begin if (null === $this->formatter) { throw new PropelException('The On Demand collection requires a formatter. Add it by calling setFormatter()'); } if (null === $this->stmt) { throw new PropelExcept...
[ "public", "function", "rewind", "(", ")", "{", "// check that the hydration can begin", "if", "(", "null", "===", "$", "this", "->", "formatter", ")", "{", "throw", "new", "PropelException", "(", "'The On Demand collection requires a formatter. Add it by calling setFormatte...
Initializes the iterator by advancing to the first position This method can only be called once (this is a NoRewindIterator)
[ "Initializes", "the", "iterator", "by", "advancing", "to", "the", "first", "position", "This", "method", "can", "only", "be", "called", "once", "(", "this", "is", "a", "NoRewindIterator", ")" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelOnDemandIterator.php#L114-L129
propelorm/Propel
generator/lib/builder/util/StandardEnglishPluralizer.php
StandardEnglishPluralizer.getPluralForm
public function getPluralForm($root) { // save some time in the case that singular and plural are the same if (in_array(strtolower($root), $this->_uncountable)) { return $root; } // check for irregular singular words foreach ($this->_irregular as $pattern => $res...
php
public function getPluralForm($root) { // save some time in the case that singular and plural are the same if (in_array(strtolower($root), $this->_uncountable)) { return $root; } // check for irregular singular words foreach ($this->_irregular as $pattern => $res...
[ "public", "function", "getPluralForm", "(", "$", "root", ")", "{", "// save some time in the case that singular and plural are the same", "if", "(", "in_array", "(", "strtolower", "(", "$", "root", ")", ",", "$", "this", "->", "_uncountable", ")", ")", "{", "retur...
Generate a plural name based on the passed in root. @param string $root The root that needs to be pluralized (e.g. Author) @return string The plural form of $root (e.g. Authors).
[ "Generate", "a", "plural", "name", "based", "on", "the", "passed", "in", "root", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/util/StandardEnglishPluralizer.php#L119-L151
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.validateModel
protected function validateModel() { parent::validateModel(); $table = $this->getTable(); // Check to see whether any generated foreign key names // will conflict with column names. $colPhpNames = array(); $fkPhpNames = array(); foreach ($table->getColumns...
php
protected function validateModel() { parent::validateModel(); $table = $this->getTable(); // Check to see whether any generated foreign key names // will conflict with column names. $colPhpNames = array(); $fkPhpNames = array(); foreach ($table->getColumns...
[ "protected", "function", "validateModel", "(", ")", "{", "parent", "::", "validateModel", "(", ")", ";", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "// Check to see whether any generated foreign key names", "// will conflict with column names.", ...
Validates the current table to make sure that it won't result in generated code that will not parse. This method may emit warnings for code which may cause problems and will throw exceptions for errors that will definitely cause problems.
[ "Validates", "the", "current", "table", "to", "make", "sure", "that", "it", "won", "t", "result", "in", "generated", "code", "that", "will", "not", "parse", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L76-L111
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.getTemporalFormatter
protected function getTemporalFormatter(Column $col) { $fmt = null; if ($col->getType() === PropelTypes::DATE) { $fmt = $this->getPlatform()->getDateFormatter(); } elseif ($col->getType() === PropelTypes::TIME) { $fmt = $this->getPlatform()->getTimeFormatter(); ...
php
protected function getTemporalFormatter(Column $col) { $fmt = null; if ($col->getType() === PropelTypes::DATE) { $fmt = $this->getPlatform()->getDateFormatter(); } elseif ($col->getType() === PropelTypes::TIME) { $fmt = $this->getPlatform()->getTimeFormatter(); ...
[ "protected", "function", "getTemporalFormatter", "(", "Column", "$", "col", ")", "{", "$", "fmt", "=", "null", ";", "if", "(", "$", "col", "->", "getType", "(", ")", "===", "PropelTypes", "::", "DATE", ")", "{", "$", "fmt", "=", "$", "this", "->", ...
Returns the appropriate formatter (from platform) for a date/time column. @param Column $col @return string
[ "Returns", "the", "appropriate", "formatter", "(", "from", "platform", ")", "for", "a", "date", "/", "time", "column", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L120-L132
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.getDefaultValueString
protected function getDefaultValueString(Column $col) { $defaultValue = var_export(null, true); $val = $col->getPhpDefaultValue(); if ($val === null) { return $defaultValue; } if ($col->isTemporalType()) { $fmt = $this->getTemporalFormatter($col); ...
php
protected function getDefaultValueString(Column $col) { $defaultValue = var_export(null, true); $val = $col->getPhpDefaultValue(); if ($val === null) { return $defaultValue; } if ($col->isTemporalType()) { $fmt = $this->getTemporalFormatter($col); ...
[ "protected", "function", "getDefaultValueString", "(", "Column", "$", "col", ")", "{", "$", "defaultValue", "=", "var_export", "(", "null", ",", "true", ")", ";", "$", "val", "=", "$", "col", "->", "getPhpDefaultValue", "(", ")", ";", "if", "(", "$", "...
Returns the type-casted and stringified default value for the specified Column. This only works for scalar default values currently. @return string The default value or 'null' if there is none. @throws EngineException
[ "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/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L141-L180
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addClassBody
protected function addClassBody(&$script) { $this->declareClassFromBuilder($this->getStubObjectBuilder()); $this->declareClassFromBuilder($this->getStubPeerBuilder()); $this->declareClassFromBuilder($this->getStubQueryBuilder()); $this->declareClasses('Propel', 'PropelException', 'PD...
php
protected function addClassBody(&$script) { $this->declareClassFromBuilder($this->getStubObjectBuilder()); $this->declareClassFromBuilder($this->getStubPeerBuilder()); $this->declareClassFromBuilder($this->getStubQueryBuilder()); $this->declareClasses('Propel', 'PropelException', 'PD...
[ "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. @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/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L258-L350
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addAttributes
protected function addAttributes(&$script) { $table = $this->getTable(); $script .= " /** * The Peer class. * Instance provides a convenient way of calling static methods on a class * that calling code may not be able to identify. * @var " . $this->getPeerClassname() ...
php
protected function addAttributes(&$script) { $table = $this->getTable(); $script .= " /** * The Peer class. * Instance provides a convenient way of calling static methods on a class * that calling code may not be able to identify. * @var " . $this->getPeerClassname() ...
[ "protected", "function", "addAttributes", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * The Peer class.\n * Instance provides a convenient way of calling static methods on ...
Adds class attributes. @param string &$script The script will be modified in this method.
[ "Adds", "class", "attributes", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L385-L428
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addColumnAttributes
protected function addColumnAttributes(&$script) { $table = $this->getTable(); foreach ($table->getColumns() as $col) { $this->addColumnAttributeComment($script, $col); $this->addColumnAttributeDeclaration($script, $col); if ($col->isLazyLoad()) { ...
php
protected function addColumnAttributes(&$script) { $table = $this->getTable(); foreach ($table->getColumns() as $col) { $this->addColumnAttributeComment($script, $col); $this->addColumnAttributeDeclaration($script, $col); if ($col->isLazyLoad()) { ...
[ "protected", "function", "addColumnAttributes", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "foreach", "(", "$", "table", "->", "getColumns", "(", ")", "as", "$", "col", ")", "{", "$", "this", ...
Adds variables that store column values. @param string &$script The script will be modified in this method. @see addColumnNameConstants()
[ "Adds", "variables", "that", "store", "column", "values", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L437-L454
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addColumnAttributeComment
protected function addColumnAttributeComment(&$script, Column $col) { $cptype = $col->getPhpType(); $clo = strtolower($col->getName()); $script .= " /** * The value for the $clo field."; if ($col->getDefaultValue()) { if ($col->getDefaultValue()->isExpression())...
php
protected function addColumnAttributeComment(&$script, Column $col) { $cptype = $col->getPhpType(); $clo = strtolower($col->getName()); $script .= " /** * The value for the $clo field."; if ($col->getDefaultValue()) { if ($col->getDefaultValue()->isExpression())...
[ "protected", "function", "addColumnAttributeComment", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "cptype", "=", "$", "col", "->", "getPhpType", "(", ")", ";", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(",...
Add comment about the attribute (variable) that stores column values @param string &$script The script will be modified in this method. @param Column $col
[ "Add", "comment", "about", "the", "attribute", "(", "variable", ")", "that", "stores", "column", "values" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L462-L482
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addColumnAttributeDeclaration
protected function addColumnAttributeDeclaration(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " protected \$" . $clo . "; "; }
php
protected function addColumnAttributeDeclaration(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " protected \$" . $clo . "; "; }
[ "protected", "function", "addColumnAttributeDeclaration", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ")", ";", "$", "script", ".=", "\"\n protected \\$\"", "."...
Adds the declaration of a column value storage attribute @param string &$script The script will be modified in this method. @param Column $col
[ "Adds", "the", "declaration", "of", "a", "column", "value", "storage", "attribute" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L490-L496
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addColumnAttributeLoaderDeclaration
protected function addColumnAttributeLoaderDeclaration(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " protected \$" . $clo . "_isLoaded = false; "; }
php
protected function addColumnAttributeLoaderDeclaration(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " protected \$" . $clo . "_isLoaded = false; "; }
[ "protected", "function", "addColumnAttributeLoaderDeclaration", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ")", ";", "$", "script", ".=", "\"\n protected \\$\"",...
Adds the declaration of the attribute keeping track of an attribute's loaded state @param string &$script The script will be modified in this method. @param Column $col
[ "Adds", "the", "declaration", "of", "the", "attribute", "keeping", "track", "of", "an", "attribute", "s", "loaded", "state" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L521-L527
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addColumnAttributeUnserializedDeclaration
protected function addColumnAttributeUnserializedDeclaration(&$script, Column $col) { $clo = strtolower($col->getName()) . "_unserialized"; $script .= " protected \$" . $clo . "; "; }
php
protected function addColumnAttributeUnserializedDeclaration(&$script, Column $col) { $clo = strtolower($col->getName()) . "_unserialized"; $script .= " protected \$" . $clo . "; "; }
[ "protected", "function", "addColumnAttributeUnserializedDeclaration", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ")", ".", "\"_unserialized\"", ";", "$", "script", ...
Adds the declaration of the serialized attribute @param string &$script The script will be modified in this method. @param Column $col
[ "Adds", "the", "declaration", "of", "the", "serialized", "attribute" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L552-L558
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addGetPeer
protected function addGetPeer(&$script) { $this->addGetPeerComment($script); $this->addGetPeerFunctionOpen($script); $this->addGetPeerFunctionBody($script); $this->addGetPeerFunctionClose($script); }
php
protected function addGetPeer(&$script) { $this->addGetPeerComment($script); $this->addGetPeerFunctionOpen($script); $this->addGetPeerFunctionBody($script); $this->addGetPeerFunctionClose($script); }
[ "protected", "function", "addGetPeer", "(", "&", "$", "script", ")", "{", "$", "this", "->", "addGetPeerComment", "(", "$", "script", ")", ";", "$", "this", "->", "addGetPeerFunctionOpen", "(", "$", "script", ")", ";", "$", "this", "->", "addGetPeerFunctio...
Adds the getPeer() method. This is a convenient, non introspective way of getting the Peer class for a particular object. @param string &$script The script will be modified in this method.
[ "Adds", "the", "getPeer", "()", "method", ".", "This", "is", "a", "convenient", "non", "introspective", "way", "of", "getting", "the", "Peer", "class", "for", "a", "particular", "object", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L566-L572
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addApplyDefaultValuesBody
protected function addApplyDefaultValuesBody(&$script) { $table = $this->getTable(); // FIXME - Apply support for PHP default expressions here // see: http://trac.propelorm.org/ticket/378 $colsWithDefaults = array(); foreach ($table->getColumns() as $col) { $def ...
php
protected function addApplyDefaultValuesBody(&$script) { $table = $this->getTable(); // FIXME - Apply support for PHP default expressions here // see: http://trac.propelorm.org/ticket/378 $colsWithDefaults = array(); foreach ($table->getColumns() as $col) { $def ...
[ "protected", "function", "addApplyDefaultValuesBody", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "// FIXME - Apply support for PHP default expressions here", "// see: http://trac.propelorm.org/ticket/378", "$", "col...
Adds the function body of the applyDefault method @param string &$script The script will be modified in this method. @see addApplyDefaultValues()
[ "Adds", "the", "function", "body", "of", "the", "applyDefault", "method" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L752-L773
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addTemporalAccessor
protected function addTemporalAccessor(&$script, Column $col) { $this->addTemporalAccessorComment($script, $col); $this->addTemporalAccessorOpen($script, $col); $this->addTemporalAccessorBody($script, $col); $this->addTemporalAccessorClose($script, $col); }
php
protected function addTemporalAccessor(&$script, Column $col) { $this->addTemporalAccessorComment($script, $col); $this->addTemporalAccessorOpen($script, $col); $this->addTemporalAccessorBody($script, $col); $this->addTemporalAccessorClose($script, $col); }
[ "protected", "function", "addTemporalAccessor", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "this", "->", "addTemporalAccessorComment", "(", "$", "script", ",", "$", "col", ")", ";", "$", "this", "->", "addTemporalAccessorOpen", "(", ...
Adds a date/time/timestamp getter method. @param string &$script The script will be modified in this method. @param Column $col The current column. @see parent::addColumnAccessors()
[ "Adds", "a", "date", "/", "time", "/", "timestamp", "getter", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L804-L810
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addTemporalAccessorComment
public function addTemporalAccessorComment(&$script, Column $col) { $clo = strtolower($col->getName()); $useDateTime = $this->getBuildProperty('useDateTimeClass'); $dateTimeClass = $this->getBuildProperty('dateTimeClass'); if (!$dateTimeClass) { $dateTimeClass = 'DateTim...
php
public function addTemporalAccessorComment(&$script, Column $col) { $clo = strtolower($col->getName()); $useDateTime = $this->getBuildProperty('useDateTimeClass'); $dateTimeClass = $this->getBuildProperty('dateTimeClass'); if (!$dateTimeClass) { $dateTimeClass = 'DateTim...
[ "public", "function", "addTemporalAccessorComment", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ")", ";", "$", "useDateTime", "=", "$", "this", "->", "getBuild...
Adds the comment for a temporal accessor @param string &$script The script will be modified in this method. @param Column $col The current column. @see addTemporalAccessor
[ "Adds", "the", "comment", "for", "a", "temporal", "accessor" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L821-L866
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addTemporalAccessorOpen
public function addTemporalAccessorOpen(&$script, Column $col) { $cfc = $col->getPhpName(); $defaultfmt = null; $visibility = $col->getAccessorVisibility(); // Default date/time formatter strings are specified in build.properties if ($col->getType() === PropelTypes::DATE) {...
php
public function addTemporalAccessorOpen(&$script, Column $col) { $cfc = $col->getPhpName(); $defaultfmt = null; $visibility = $col->getAccessorVisibility(); // Default date/time formatter strings are specified in build.properties if ($col->getType() === PropelTypes::DATE) {...
[ "public", "function", "addTemporalAccessorOpen", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "cfc", "=", "$", "col", "->", "getPhpName", "(", ")", ";", "$", "defaultfmt", "=", "null", ";", "$", "visibility", "=", "$", "col", "-...
Adds the function declaration for a temporal accessor @param string &$script The script will be modified in this method. @param Column $col The current column. @see addTemporalAccessor
[ "Adds", "the", "function", "declaration", "for", "a", "temporal", "accessor" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L877-L906
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addTemporalAccessorBody
protected function addTemporalAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); $useDateTime = $this->getBuildProperty('useDateTimeClass'); $dateTimeClass = $this->getBuildProperty('dateTimeClass'); if (!$dateTimeClass) { ...
php
protected function addTemporalAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); $useDateTime = $this->getBuildProperty('useDateTimeClass'); $dateTimeClass = $this->getBuildProperty('dateTimeClass'); if (!$dateTimeClass) { ...
[ "protected", "function", "addTemporalAccessorBody", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "cfc", "=", "$", "col", "->", "getPhpName", "(", ")", ";", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")...
Adds the body of the temporal accessor @param string &$script The script will be modified in this method. @param Column $col The current column. @see addTemporalAccessor
[ "Adds", "the", "body", "of", "the", "temporal", "accessor" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L934-L1027
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addObjectAccessor
protected function addObjectAccessor(&$script, Column $col) { $this->addDefaultAccessorComment($script, $col); $this->addDefaultAccessorOpen($script, $col); $this->addObjectAccessorBody($script, $col); $this->addDefaultAccessorClose($script, $col); }
php
protected function addObjectAccessor(&$script, Column $col) { $this->addDefaultAccessorComment($script, $col); $this->addDefaultAccessorOpen($script, $col); $this->addObjectAccessorBody($script, $col); $this->addDefaultAccessorClose($script, $col); }
[ "protected", "function", "addObjectAccessor", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "this", "->", "addDefaultAccessorComment", "(", "$", "script", ",", "$", "col", ")", ";", "$", "this", "->", "addDefaultAccessorOpen", "(", "$"...
Adds an object getter method. @param string &$script The script will be modified in this method. @param Column $col The current column. @see parent::addColumnAccessors()
[ "Adds", "an", "object", "getter", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1052-L1058
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addObjectAccessorBody
protected function addObjectAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); $cloUnserialized = $clo . '_unserialized'; if ($col->isLazyLoad()) { $script .= $this->getAccessorLazyLoadSnippet($col); } $sc...
php
protected function addObjectAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); $cloUnserialized = $clo . '_unserialized'; if ($col->isLazyLoad()) { $script .= $this->getAccessorLazyLoadSnippet($col); } $sc...
[ "protected", "function", "addObjectAccessorBody", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "cfc", "=", "$", "col", "->", "getPhpName", "(", ")", ";", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")",...
Adds the function body for an object accessor method @param string &$script The script will be modified in this method. @param Column $col The current column. @see addDefaultAccessor()
[ "Adds", "the", "function", "body", "for", "an", "object", "accessor", "method" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1068-L1083
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addArrayAccessor
protected function addArrayAccessor(&$script, Column $col) { $this->addDefaultAccessorComment($script, $col); $this->addDefaultAccessorOpen($script, $col); $this->addArrayAccessorBody($script, $col); $this->addDefaultAccessorClose($script, $col); }
php
protected function addArrayAccessor(&$script, Column $col) { $this->addDefaultAccessorComment($script, $col); $this->addDefaultAccessorOpen($script, $col); $this->addArrayAccessorBody($script, $col); $this->addDefaultAccessorClose($script, $col); }
[ "protected", "function", "addArrayAccessor", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "this", "->", "addDefaultAccessorComment", "(", "$", "script", ",", "$", "col", ")", ";", "$", "this", "->", "addDefaultAccessorOpen", "(", "$",...
Adds an array getter method. @param string &$script The script will be modified in this method. @param Column $col The current column. @see parent::addColumnAccessors()
[ "Adds", "an", "array", "getter", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1093-L1099
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addEnumAccessor
protected function addEnumAccessor(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " /** * Get the [$clo] column value. * " . $col->getDescription(); if ($col->isLazyLoad()) { $script .= " * @param PropelPDO \$con An optional PropelPDO c...
php
protected function addEnumAccessor(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " /** * Get the [$clo] column value. * " . $col->getDescription(); if ($col->isLazyLoad()) { $script .= " * @param PropelPDO \$con An optional PropelPDO c...
[ "protected", "function", "addEnumAccessor", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ")", ";", "$", "script", ".=", "\"\n /**\n * Get the [$clo] column val...
Adds an enum getter method. @param string &$script The script will be modified in this method. @param Column $col The current column. @see parent::addColumnAccessors()
[ "Adds", "an", "enum", "getter", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1138-L1157
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addEnumAccessorBody
protected function addEnumAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); if ($col->isLazyLoad()) { $script .= $this->getAccessorLazyLoadSnippet($col); } $script .= " if (null === \$this->$clo) { ...
php
protected function addEnumAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); if ($col->isLazyLoad()) { $script .= $this->getAccessorLazyLoadSnippet($col); } $script .= " if (null === \$this->$clo) { ...
[ "protected", "function", "addEnumAccessorBody", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "cfc", "=", "$", "col", "->", "getPhpName", "(", ")", ";", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ...
Adds the function body for an enum accessor method @param string &$script The script will be modified in this method. @param Column $col The current column. @see addDefaultAccessor()
[ "Adds", "the", "function", "body", "for", "an", "enum", "accessor", "method" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1167-L1185
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addHasArrayElement
protected function addHasArrayElement(&$script, Column $col) { $clo = strtolower($col->getName()); $cfc = $col->getPhpName(); $visibility = $col->getAccessorVisibility(); $singularPhpName = rtrim($cfc, 's'); $script .= " /** * Test the presence of a value in the [$cl...
php
protected function addHasArrayElement(&$script, Column $col) { $clo = strtolower($col->getName()); $cfc = $col->getPhpName(); $visibility = $col->getAccessorVisibility(); $singularPhpName = rtrim($cfc, 's'); $script .= " /** * Test the presence of a value in the [$cl...
[ "protected", "function", "addHasArrayElement", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ")", ";", "$", "cfc", "=", "$", "col", "->", "getPhpName", "(", ...
Adds a tester method for an array column. @param string &$script The script will be modified in this method. @param Column $col The current column.
[ "Adds", "a", "tester", "method", "for", "an", "array", "column", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1193-L1224
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addDefaultAccessor
protected function addDefaultAccessor(&$script, Column $col) { $this->addDefaultAccessorComment($script, $col); $this->addDefaultAccessorOpen($script, $col); $this->addDefaultAccessorBody($script, $col); $this->addDefaultAccessorClose($script, $col); }
php
protected function addDefaultAccessor(&$script, Column $col) { $this->addDefaultAccessorComment($script, $col); $this->addDefaultAccessorOpen($script, $col); $this->addDefaultAccessorBody($script, $col); $this->addDefaultAccessorClose($script, $col); }
[ "protected", "function", "addDefaultAccessor", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "this", "->", "addDefaultAccessorComment", "(", "$", "script", ",", "$", "col", ")", ";", "$", "this", "->", "addDefaultAccessorOpen", "(", "$...
Adds a normal (non-temporal) getter method. @param string &$script The script will be modified in this method. @param Column $col The current column. @see parent::addColumnAccessors()
[ "Adds", "a", "normal", "(", "non", "-", "temporal", ")", "getter", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1234-L1240
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addDefaultAccessorComment
public function addDefaultAccessorComment(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " /** * Get the [$clo] column value. * " . $col->getDescription(); if ($col->isLazyLoad()) { $script .= " * @param PropelPDO \$con An optional Pro...
php
public function addDefaultAccessorComment(&$script, Column $col) { $clo = strtolower($col->getName()); $script .= " /** * Get the [$clo] column value. * " . $col->getDescription(); if ($col->isLazyLoad()) { $script .= " * @param PropelPDO \$con An optional Pro...
[ "public", "function", "addDefaultAccessorComment", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")", ")", ";", "$", "script", ".=", "\"\n /**\n * Get the [$clo] col...
Add the comment for a default accessor method (a getter) @param string &$script The script will be modified in this method. @param Column $col The current column. @see addDefaultAccessor()
[ "Add", "the", "comment", "for", "a", "default", "accessor", "method", "(", "a", "getter", ")" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1250-L1265
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addDefaultAccessorOpen
public function addDefaultAccessorOpen(&$script, Column $col) { $cfc = $col->getPhpName(); $visibility = $col->getAccessorVisibility(); $script .= " " . $visibility . " function get$cfc("; if ($col->isLazyLoad()) { $script .= "PropelPDO \$con = null"; } ...
php
public function addDefaultAccessorOpen(&$script, Column $col) { $cfc = $col->getPhpName(); $visibility = $col->getAccessorVisibility(); $script .= " " . $visibility . " function get$cfc("; if ($col->isLazyLoad()) { $script .= "PropelPDO \$con = null"; } ...
[ "public", "function", "addDefaultAccessorOpen", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "cfc", "=", "$", "col", "->", "getPhpName", "(", ")", ";", "$", "visibility", "=", "$", "col", "->", "getAccessorVisibility", "(", ")", "...
Adds the function declaration for a default accessor @param string &$script The script will be modified in this method. @param Column $col The current column. @see addDefaultAccessor()
[ "Adds", "the", "function", "declaration", "for", "a", "default", "accessor" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1275-L1287
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addDefaultAccessorBody
protected function addDefaultAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); if ($col->isLazyLoad()) { $script .= $this->getAccessorLazyLoadSnippet($col); } $script .= " return \$this->$clo;"; }
php
protected function addDefaultAccessorBody(&$script, Column $col) { $cfc = $col->getPhpName(); $clo = strtolower($col->getName()); if ($col->isLazyLoad()) { $script .= $this->getAccessorLazyLoadSnippet($col); } $script .= " return \$this->$clo;"; }
[ "protected", "function", "addDefaultAccessorBody", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "cfc", "=", "$", "col", "->", "getPhpName", "(", ")", ";", "$", "clo", "=", "strtolower", "(", "$", "col", "->", "getName", "(", ")"...
Adds the function body for a default accessor method @param string &$script The script will be modified in this method. @param Column $col The current column. @see addDefaultAccessor()
[ "Adds", "the", "function", "body", "for", "a", "default", "accessor", "method" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1297-L1308
propelorm/Propel
generator/lib/builder/om/PHP5ObjectBuilder.php
PHP5ObjectBuilder.addLazyLoader
protected function addLazyLoader(&$script, Column $col) { $this->addLazyLoaderComment($script, $col); $this->addLazyLoaderOpen($script, $col); $this->addLazyLoaderBody($script, $col); $this->addLazyLoaderClose($script, $col); }
php
protected function addLazyLoader(&$script, Column $col) { $this->addLazyLoaderComment($script, $col); $this->addLazyLoaderOpen($script, $col); $this->addLazyLoaderBody($script, $col); $this->addLazyLoaderClose($script, $col); }
[ "protected", "function", "addLazyLoader", "(", "&", "$", "script", ",", "Column", "$", "col", ")", "{", "$", "this", "->", "addLazyLoaderComment", "(", "$", "script", ",", "$", "col", ")", ";", "$", "this", "->", "addLazyLoaderOpen", "(", "$", "script", ...
Adds the lazy loader method. @param string &$script The script will be modified in this method. @param Column $col The current column. @see parent::addColumnAccessors()
[ "Adds", "the", "lazy", "loader", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5ObjectBuilder.php#L1333-L1339