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/map/DatabaseMap.php
DatabaseMap.getTable
public function getTable($name) { if (!isset($this->tables[$name])) { throw new PropelException("Cannot fetch TableMap for undefined table: " . $name); } return $this->tables[$name]; }
php
public function getTable($name) { if (!isset($this->tables[$name])) { throw new PropelException("Cannot fetch TableMap for undefined table: " . $name); } return $this->tables[$name]; }
[ "public", "function", "getTable", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "tables", "[", "$", "name", "]", ")", ")", "{", "throw", "new", "PropelException", "(", "\"Cannot fetch TableMap for undefined table: \"", ".", "...
Get a TableMap for the table by name. @param string $name Name of the table. @return TableMap A TableMap @throws PropelException if the table is undefined
[ "Get", "a", "TableMap", "for", "the", "table", "by", "name", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/map/DatabaseMap.php#L123-L130
propelorm/Propel
generator/lib/reverse/pgsql/PgsqlSchemaParser.php
PgsqlSchemaParser.addColumns
protected function addColumns(Table $table, $oid, $version) { // Get the columns, types, etc. // Based on code from pgAdmin3 (http://www.pgadmin.org/) $stmt = $this->dbh->prepare("SELECT att.attname, att.atttypmo...
php
protected function addColumns(Table $table, $oid, $version) { // Get the columns, types, etc. // Based on code from pgAdmin3 (http://www.pgadmin.org/) $stmt = $this->dbh->prepare("SELECT att.attname, att.atttypmo...
[ "protected", "function", "addColumns", "(", "Table", "$", "table", ",", "$", "oid", ",", "$", "version", ")", "{", "// Get the columns, types, etc.", "// Based on code from pgAdmin3 (http://www.pgadmin.org/)", "$", "stmt", "=", "$", "this", "->", "dbh", "->", "prepa...
Adds Columns to the specified table. @param Table $table The Table model class to add columns to. @param int $oid The table OID @param string $version The database version. @throws EngineException
[ "Adds", "Columns", "to", "the", "specified", "table", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/reverse/pgsql/PgsqlSchemaParser.php#L169-L275
propelorm/Propel
generator/lib/reverse/pgsql/PgsqlSchemaParser.php
PgsqlSchemaParser.addPrimaryKey
protected function addPrimaryKey(Table $table, $oid, $version) { $stmt = $this->dbh->prepare("SELECT DISTINCT ON(cls.relname) cls.relname as idxname, indkey, ...
php
protected function addPrimaryKey(Table $table, $oid, $version) { $stmt = $this->dbh->prepare("SELECT DISTINCT ON(cls.relname) cls.relname as idxname, indkey, ...
[ "protected", "function", "addPrimaryKey", "(", "Table", "$", "table", ",", "$", "oid", ",", "$", "version", ")", "{", "$", "stmt", "=", "$", "this", "->", "dbh", "->", "prepare", "(", "\"SELECT\n DISTINCT ON(cls.relname)\n ...
Loads the primary key for this table.
[ "Loads", "the", "primary", "key", "for", "this", "table", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/reverse/pgsql/PgsqlSchemaParser.php#L507-L540
propelorm/Propel
generator/lib/builder/om/PHP5ExtensionPeerBuilder.php
PHP5ExtensionPeerBuilder.addIncludes
protected function addIncludes(&$script) { switch ($this->getTable()->treeMode()) { case 'NestedSet': $requiredClassFilePath = $this->getNestedSetPeerBuilder()->getClassFilePath(); break; case 'MaterializedPath': case 'AdjacencyList': ...
php
protected function addIncludes(&$script) { switch ($this->getTable()->treeMode()) { case 'NestedSet': $requiredClassFilePath = $this->getNestedSetPeerBuilder()->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/PHP5ExtensionPeerBuilder.php#L40-L57
propelorm/Propel
generator/lib/builder/om/PHP5ExtensionPeerBuilder.php
PHP5ExtensionPeerBuilder.addClassOpen
protected function addClassOpen(&$script) { $table = $this->getTable(); $this->declareClassFromBuilder($this->getPeerBuilder()); $tableName = $table->getName(); $tableDesc = $table->getDescription(); switch ($table->treeMode()) { case 'NestedSet': ...
php
protected function addClassOpen(&$script) { $table = $this->getTable(); $this->declareClassFromBuilder($this->getPeerBuilder()); $tableName = $table->getName(); $tableDesc = $table->getDescription(); switch ($table->treeMode()) { case 'NestedSet': ...
[ "protected", "function", "addClassOpen", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "this", "->", "declareClassFromBuilder", "(", "$", "this", "->", "getPeerBuilder", "(", ")", ")", ";", "$"...
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/PHP5ExtensionPeerBuilder.php#L64-L111
propelorm/Propel
runtime/lib/parser/PropelParser.php
PropelParser.load
public function load($path) { if (!file_exists($path)) { throw new PropelException(sprintf('File "%s" does not exist or is unreadable', $path)); } ob_start(); include($path); $contents = ob_get_clean(); return $contents; }
php
public function load($path) { if (!file_exists($path)) { throw new PropelException(sprintf('File "%s" does not exist or is unreadable', $path)); } ob_start(); include($path); $contents = ob_get_clean(); return $contents; }
[ "public", "function", "load", "(", "$", "path", ")", "{", "if", "(", "!", "file_exists", "(", "$", "path", ")", ")", "{", "throw", "new", "PropelException", "(", "sprintf", "(", "'File \"%s\" does not exist or is unreadable'", ",", "$", "path", ")", ")", "...
Loads data from a file. Executes PHP code blocks in the file. @param string $path Path to the file to load @return string The file content processed by PHP @throws PropelException
[ "Loads", "data", "from", "a", "file", ".", "Executes", "PHP", "code", "blocks", "in", "the", "file", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/PropelParser.php#L61-L71
propelorm/Propel
runtime/lib/parser/PropelParser.php
PropelParser.dump
public function dump($data, $path = null) { if ($path !== null) { return file_put_contents($path, $data); } else { echo $data; } }
php
public function dump($data, $path = null) { if ($path !== null) { return file_put_contents($path, $data); } else { echo $data; } }
[ "public", "function", "dump", "(", "$", "data", ",", "$", "path", "=", "null", ")", "{", "if", "(", "$", "path", "!==", "null", ")", "{", "return", "file_put_contents", "(", "$", "path", ",", "$", "data", ")", ";", "}", "else", "{", "echo", "$", ...
Dumps data to a file, or to STDOUT if no filename is given @param string $data The file content @param string $path Path of the file to create @return int|null If path given, the written bytes, null otherwise.
[ "Dumps", "data", "to", "a", "file", "or", "to", "STDOUT", "if", "no", "filename", "is", "given" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/PropelParser.php#L81-L88
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.getPrevious
public function getPrevious() { $pos = $this->getPosition(); if ($pos == 0) { return null; } else { $this->getInternalIterator()->seek($pos - 1); return $this->getCurrent(); } }
php
public function getPrevious() { $pos = $this->getPosition(); if ($pos == 0) { return null; } else { $this->getInternalIterator()->seek($pos - 1); return $this->getCurrent(); } }
[ "public", "function", "getPrevious", "(", ")", "{", "$", "pos", "=", "$", "this", "->", "getPosition", "(", ")", ";", "if", "(", "$", "pos", "==", "0", ")", "{", "return", "null", ";", "}", "else", "{", "$", "this", "->", "getInternalIterator", "("...
Move the internal pointer backward And get the previous element in the collection @return mixed
[ "Move", "the", "internal", "pointer", "backward", "And", "get", "the", "previous", "element", "in", "the", "collection" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L107-L117
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.getLast
public function getLast() { $count = $this->count(); if ($count == 0) { return null; } else { $this->getInternalIterator()->seek($count - 1); return $this->getCurrent(); } }
php
public function getLast() { $count = $this->count(); if ($count == 0) { return null; } else { $this->getInternalIterator()->seek($count - 1); return $this->getCurrent(); } }
[ "public", "function", "getLast", "(", ")", "{", "$", "count", "=", "$", "this", "->", "count", "(", ")", ";", "if", "(", "$", "count", "==", "0", ")", "{", "return", "null", ";", "}", "else", "{", "$", "this", "->", "getInternalIterator", "(", ")...
Move the internal pointer to the end of the list And get the last element in the collection @return mixed
[ "Move", "the", "internal", "pointer", "to", "the", "end", "of", "the", "list", "And", "get", "the", "last", "element", "in", "the", "collection" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L148-L158
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.get
public function get($key) { if (!$this->offsetExists($key)) { throw new PropelException('Unknown key ' . $key); } return $this->offsetGet($key); }
php
public function get($key) { if (!$this->offsetExists($key)) { throw new PropelException('Unknown key ' . $key); } return $this->offsetGet($key); }
[ "public", "function", "get", "(", "$", "key", ")", "{", "if", "(", "!", "$", "this", "->", "offsetExists", "(", "$", "key", ")", ")", "{", "throw", "new", "PropelException", "(", "'Unknown key '", ".", "$", "key", ")", ";", "}", "return", "$", "thi...
Get an element from its key Alias for ArrayObject::offsetGet() @param mixed $key @return mixed The element @throws PropelException
[ "Get", "an", "element", "from", "its", "key", "Alias", "for", "ArrayObject", "::", "offsetGet", "()" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L216-L223
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.pop
public function pop() { if ($this->count() == 0) { return null; } $ret = $this->getLast(); $lastKey = $this->getInternalIterator()->key(); $this->offsetUnset((string) $lastKey); return $ret; }
php
public function pop() { if ($this->count() == 0) { return null; } $ret = $this->getLast(); $lastKey = $this->getInternalIterator()->key(); $this->offsetUnset((string) $lastKey); return $ret; }
[ "public", "function", "pop", "(", ")", "{", "if", "(", "$", "this", "->", "count", "(", ")", "==", "0", ")", "{", "return", "null", ";", "}", "$", "ret", "=", "$", "this", "->", "getLast", "(", ")", ";", "$", "lastKey", "=", "$", "this", "->"...
Pops an element off the end of the collection @return mixed The popped element
[ "Pops", "an", "element", "off", "the", "end", "of", "the", "collection" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L230-L240
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.remove
public function remove($key) { if (!$this->offsetExists($key)) { throw new PropelException('Unknown key ' . $key); } return $this->offsetUnset($key); }
php
public function remove($key) { if (!$this->offsetExists($key)) { throw new PropelException('Unknown key ' . $key); } return $this->offsetUnset($key); }
[ "public", "function", "remove", "(", "$", "key", ")", "{", "if", "(", "!", "$", "this", "->", "offsetExists", "(", "$", "key", ")", ")", "{", "throw", "new", "PropelException", "(", "'Unknown key '", ".", "$", "key", ")", ";", "}", "return", "$", "...
Removes a specified collection element Alias for ArrayObject::offsetUnset() @param mixed $key @return mixed The removed element @throws PropelException
[ "Removes", "a", "specified", "collection", "element", "Alias", "for", "ArrayObject", "::", "offsetUnset", "()" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L298-L305
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.diff
public function diff(PropelCollection $collection) { $diff = clone $this; $diff->clear(); foreach ($this as $object) { if (!$collection->contains($object)) { $diff[] = $object; } } return $diff; }
php
public function diff(PropelCollection $collection) { $diff = clone $this; $diff->clear(); foreach ($this as $object) { if (!$collection->contains($object)) { $diff[] = $object; } } return $diff; }
[ "public", "function", "diff", "(", "PropelCollection", "$", "collection", ")", "{", "$", "diff", "=", "clone", "$", "this", ";", "$", "diff", "->", "clear", "(", ")", ";", "foreach", "(", "$", "this", "as", "$", "object", ")", "{", "if", "(", "!", ...
Returns an array of objects present in the collection that are not presents in the given collection. @param PropelCollection $collection A Propel collection. @return PropelCollection An array of Propel objects from the collection that are not presents in the given collection.
[ "Returns", "an", "array", "of", "objects", "present", "in", "the", "collection", "that", "are", "not", "presents", "in", "the", "given", "collection", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L349-L361
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.getConnection
public function getConnection($type = Propel::CONNECTION_READ) { $databaseName = constant($this->getPeerClass() . '::DATABASE_NAME'); return Propel::getConnection($databaseName, $type); }
php
public function getConnection($type = Propel::CONNECTION_READ) { $databaseName = constant($this->getPeerClass() . '::DATABASE_NAME'); return Propel::getConnection($databaseName, $type); }
[ "public", "function", "getConnection", "(", "$", "type", "=", "Propel", "::", "CONNECTION_READ", ")", "{", "$", "databaseName", "=", "constant", "(", "$", "this", "->", "getPeerClass", "(", ")", ".", "'::DATABASE_NAME'", ")", ";", "return", "Propel", "::", ...
Get a connection object for the database containing the elements of the collection @param string $type The connection type (Propel::CONNECTION_READ by default; can be Propel::connection_WRITE) @return PropelPDO A PropelPDO connection object
[ "Get", "a", "connection", "object", "for", "the", "database", "containing", "the", "elements", "of", "the", "collection" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L490-L495
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.importFrom
public function importFrom($parser, $data) { if (!$parser instanceof PropelParser) { $parser = PropelParser::getParser($parser); } return $this->fromArray($parser->listToArray($data), BasePeer::TYPE_PHPNAME); }
php
public function importFrom($parser, $data) { if (!$parser instanceof PropelParser) { $parser = PropelParser::getParser($parser); } return $this->fromArray($parser->listToArray($data), BasePeer::TYPE_PHPNAME); }
[ "public", "function", "importFrom", "(", "$", "parser", ",", "$", "data", ")", "{", "if", "(", "!", "$", "parser", "instanceof", "PropelParser", ")", "{", "$", "parser", "=", "PropelParser", "::", "getParser", "(", "$", "parser", ")", ";", "}", "return...
Populate the current collection from a string, using a given parser format <code> $coll = new PropelObjectCollection(); $coll->setModel('Book'); $coll->importFrom('JSON', '{{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}}'); </code> @param mixed $parser A PropelPars...
[ "Populate", "the", "current", "collection", "from", "a", "string", "using", "a", "given", "parser", "format", "<code", ">", "$coll", "=", "new", "PropelObjectCollection", "()", ";", "$coll", "-", ">", "setModel", "(", "Book", ")", ";", "$coll", "-", ">", ...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L510-L517
propelorm/Propel
runtime/lib/collection/PropelCollection.php
PropelCollection.exportTo
public function exportTo($parser, $usePrefix = true, $includeLazyLoadColumns = true) { if (!$parser instanceof PropelParser) { $parser = PropelParser::getParser($parser); } return $parser->listFromArray($this->toArray(null, $usePrefix, BasePeer::TYPE_PHPNAME, $includeLazyLoadCol...
php
public function exportTo($parser, $usePrefix = true, $includeLazyLoadColumns = true) { if (!$parser instanceof PropelParser) { $parser = PropelParser::getParser($parser); } return $parser->listFromArray($this->toArray(null, $usePrefix, BasePeer::TYPE_PHPNAME, $includeLazyLoadCol...
[ "public", "function", "exportTo", "(", "$", "parser", ",", "$", "usePrefix", "=", "true", ",", "$", "includeLazyLoadColumns", "=", "true", ")", "{", "if", "(", "!", "$", "parser", "instanceof", "PropelParser", ")", "{", "$", "parser", "=", "PropelParser", ...
Export the current collection to a string, using a given parser format <code> $books = BookQuery::create()->find(); echo $book->exportTo('JSON'); => {{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}}'); </code> A PropelOnDemandCollection cannot be exported. Any attemp...
[ "Export", "the", "current", "collection", "to", "a", "string", "using", "a", "given", "parser", "format", "<code", ">", "$books", "=", "BookQuery", "::", "create", "()", "-", ">", "find", "()", ";", "echo", "$book", "-", ">", "exportTo", "(", "JSON", "...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/collection/PropelCollection.php#L540-L547
propelorm/Propel
generator/lib/builder/om/PHP5NodePeerBuilder.php
PHP5NodePeerBuilder.addClassBody
protected function addClassBody(&$script) { $table = $this->getTable(); // FIXME // - Probably the build needs to be customized for supporting // tables that are "aliases". -- definitely a fringe usecase, though. $this->addConstants($script); $this->addIsCodeBase(...
php
protected function addClassBody(&$script) { $table = $this->getTable(); // FIXME // - Probably the build needs to be customized for supporting // tables that are "aliases". -- definitely a fringe usecase, though. $this->addConstants($script); $this->addIsCodeBase(...
[ "protected", "function", "addClassBody", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "// FIXME", "// - Probably the build needs to be customized for supporting", "// tables that are \"aliases\". -- definitely a fringe...
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/PHP5NodePeerBuilder.php#L93-L116
propelorm/Propel
generator/lib/builder/om/PHP5NodePeerBuilder.php
PHP5NodePeerBuilder.addRetrieveMethods
protected function addRetrieveMethods(&$script) { $this->addRetrieveNodes($script); $this->addRetrieveNodeByPK($script); $this->addRetrieveNodeByNP($script); $this->addRetrieveRootNode($script); }
php
protected function addRetrieveMethods(&$script) { $this->addRetrieveNodes($script); $this->addRetrieveNodeByPK($script); $this->addRetrieveNodeByNP($script); $this->addRetrieveRootNode($script); }
[ "protected", "function", "addRetrieveMethods", "(", "&", "$", "script", ")", "{", "$", "this", "->", "addRetrieveNodes", "(", "$", "script", ")", ";", "$", "this", "->", "addRetrieveNodeByPK", "(", "$", "script", ")", ";", "$", "this", "->", "addRetrieveNo...
Adds the methods for retrieving nodes.
[ "Adds", "the", "methods", "for", "retrieving", "nodes", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5NodePeerBuilder.php#L273-L279
propelorm/Propel
generator/lib/behavior/TimestampableBehavior.php
TimestampableBehavior.modifyTable
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('create_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('create_column'), 'type' => 'TIMESTAMP' )); } if ($this->...
php
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('create_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('create_column'), 'type' => 'TIMESTAMP' )); } if ($this->...
[ "public", "function", "modifyTable", "(", ")", "{", "if", "(", "!", "$", "this", "->", "getTable", "(", ")", "->", "containsColumn", "(", "$", "this", "->", "getParameter", "(", "'create_column'", ")", ")", ")", "{", "$", "this", "->", "getTable", "(",...
Add the create_column and update_columns to the current table
[ "Add", "the", "create_column", "and", "update_columns", "to", "the", "current", "table" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/TimestampableBehavior.php#L31-L48
propelorm/Propel
generator/lib/behavior/TimestampableBehavior.php
TimestampableBehavior.preUpdate
public function preUpdate(PHP5ObjectBuilder $builder) { if ($this->withUpdatedAt()) { return "if (\$this->isModified() && !\$this->isColumnModified(" . $this->getColumnConstant('update_column', $builder) . ")) { \$this->" . $this->getColumnSetter('update_column') . "(time()); }"; } ...
php
public function preUpdate(PHP5ObjectBuilder $builder) { if ($this->withUpdatedAt()) { return "if (\$this->isModified() && !\$this->isColumnModified(" . $this->getColumnConstant('update_column', $builder) . ")) { \$this->" . $this->getColumnSetter('update_column') . "(time()); }"; } ...
[ "public", "function", "preUpdate", "(", "PHP5ObjectBuilder", "$", "builder", ")", "{", "if", "(", "$", "this", "->", "withUpdatedAt", "(", ")", ")", "{", "return", "\"if (\\$this->isModified() && !\\$this->isColumnModified(\"", ".", "$", "this", "->", "getColumnCons...
Add code in ObjectBuilder::preUpdate @param PHP5ObjectBuilder $builder @return string The code to put at the hook
[ "Add", "code", "in", "ObjectBuilder", "::", "preUpdate" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/TimestampableBehavior.php#L82-L91
propelorm/Propel
generator/lib/behavior/TimestampableBehavior.php
TimestampableBehavior.preInsert
public function preInsert(PHP5ObjectBuilder $builder) { $script = "if (!\$this->isColumnModified(" . $this->getColumnConstant('create_column', $builder) . ")) { \$this->" . $this->getColumnSetter('create_column') . "(time()); }"; if ($this->withUpdatedAt()) { $script .= " if (!\$thi...
php
public function preInsert(PHP5ObjectBuilder $builder) { $script = "if (!\$this->isColumnModified(" . $this->getColumnConstant('create_column', $builder) . ")) { \$this->" . $this->getColumnSetter('create_column') . "(time()); }"; if ($this->withUpdatedAt()) { $script .= " if (!\$thi...
[ "public", "function", "preInsert", "(", "PHP5ObjectBuilder", "$", "builder", ")", "{", "$", "script", "=", "\"if (!\\$this->isColumnModified(\"", ".", "$", "this", "->", "getColumnConstant", "(", "'create_column'", ",", "$", "builder", ")", ".", "\")) {\n \\$this...
Add code in ObjectBuilder::preInsert @param PHP5ObjectBuilder $builder @return string The code to put at the hook
[ "Add", "code", "in", "ObjectBuilder", "::", "preInsert" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/TimestampableBehavior.php#L100-L114
propelorm/Propel
generator/lib/model/XMLElement.php
XMLElement.booleanValue
protected function booleanValue($val) { if (is_numeric($val)) { return (bool) $val; } else { return (in_array(strtolower($val), array('true', 't', 'y', 'yes'), true) ? true : false); } }
php
protected function booleanValue($val) { if (is_numeric($val)) { return (bool) $val; } else { return (in_array(strtolower($val), array('true', 't', 'y', 'yes'), true) ? true : false); } }
[ "protected", "function", "booleanValue", "(", "$", "val", ")", "{", "if", "(", "is_numeric", "(", "$", "val", ")", ")", "{", "return", "(", "bool", ")", "$", "val", ";", "}", "else", "{", "return", "(", "in_array", "(", "strtolower", "(", "$", "val...
Converts value specified in XML to a boolean value. This is to support the default value when used w/ a boolean column. @return bool
[ "Converts", "value", "specified", "in", "XML", "to", "a", "boolean", "value", ".", "This", "is", "to", "support", "the", "default", "value", "when", "used", "w", "/", "a", "boolean", "column", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/XMLElement.php#L90-L97
propelorm/Propel
generator/lib/model/XMLElement.php
XMLElement.addVendorInfo
public function addVendorInfo($data) { if ($data instanceof VendorInfo) { $vi = $data; $this->vendorInfos[$vi->getType()] = $vi; return $vi; } else { $vi = new VendorInfo(); $vi->loadFromXML($data); return $this->addVendorInfo...
php
public function addVendorInfo($data) { if ($data instanceof VendorInfo) { $vi = $data; $this->vendorInfos[$vi->getType()] = $vi; return $vi; } else { $vi = new VendorInfo(); $vi->loadFromXML($data); return $this->addVendorInfo...
[ "public", "function", "addVendorInfo", "(", "$", "data", ")", "{", "if", "(", "$", "data", "instanceof", "VendorInfo", ")", "{", "$", "vi", "=", "$", "data", ";", "$", "this", "->", "vendorInfos", "[", "$", "vi", "->", "getType", "(", ")", "]", "="...
Sets an associated VendorInfo object. @param mixed $data VendorInfo object or XML attrib data (array) @return VendorInfo
[ "Sets", "an", "associated", "VendorInfo", "object", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/XMLElement.php#L134-L147
propelorm/Propel
generator/lib/model/XMLElement.php
XMLElement.getVendorInfoForType
public function getVendorInfoForType($type) { if (isset($this->vendorInfos[$type])) { return $this->vendorInfos[$type]; } else { // return an empty object return new VendorInfo($type); } }
php
public function getVendorInfoForType($type) { if (isset($this->vendorInfos[$type])) { return $this->vendorInfos[$type]; } else { // return an empty object return new VendorInfo($type); } }
[ "public", "function", "getVendorInfoForType", "(", "$", "type", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "vendorInfos", "[", "$", "type", "]", ")", ")", "{", "return", "$", "this", "->", "vendorInfos", "[", "$", "type", "]", ";", "}", ...
Gets the any associated VendorInfo object. @return VendorInfo
[ "Gets", "the", "any", "associated", "VendorInfo", "object", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/XMLElement.php#L154-L162
propelorm/Propel
generator/lib/model/XMLElement.php
XMLElement.getConfiguredBehavior
public function getConfiguredBehavior($bname) { if ($config = $this->getGeneratorConfig()) { if ($class = $config->getConfiguredBehavior($bname)) { return $class; } } // fallback: maybe the behavior is loaded or autoloaded $gen = new PhpNameGen...
php
public function getConfiguredBehavior($bname) { if ($config = $this->getGeneratorConfig()) { if ($class = $config->getConfiguredBehavior($bname)) { return $class; } } // fallback: maybe the behavior is loaded or autoloaded $gen = new PhpNameGen...
[ "public", "function", "getConfiguredBehavior", "(", "$", "bname", ")", "{", "if", "(", "$", "config", "=", "$", "this", "->", "getGeneratorConfig", "(", ")", ")", "{", "if", "(", "$", "class", "=", "$", "config", "->", "getConfiguredBehavior", "(", "$", ...
Find the best class name for a given behavior Looks in build.properties for path like propel.behavior.[bname].class If not found, tries to autoload [Bname]Behavior If no success, returns 'Behavior' @param string $bname behavior name, e.g. 'timestampable' @return string behavior class name, e.g. 'TimestampableBehavior...
[ "Find", "the", "best", "class", "name", "for", "a", "given", "behavior", "Looks", "in", "build", ".", "properties", "for", "path", "like", "propel", ".", "behavior", ".", "[", "bname", "]", ".", "class", "If", "not", "found", "tries", "to", "autoload", ...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/XMLElement.php#L176-L190
propelorm/Propel
generator/lib/model/XMLElement.php
XMLElement.toString
public function toString() { $doc = new DOMDocument('1.0'); $doc->formatOutput = true; $this->appendXml($doc); $xmlstr = $doc->saveXML(); return trim(preg_replace('/<\?xml.*?\?>/', '', $xmlstr)); }
php
public function toString() { $doc = new DOMDocument('1.0'); $doc->formatOutput = true; $this->appendXml($doc); $xmlstr = $doc->saveXML(); return trim(preg_replace('/<\?xml.*?\?>/', '', $xmlstr)); }
[ "public", "function", "toString", "(", ")", "{", "$", "doc", "=", "new", "DOMDocument", "(", "'1.0'", ")", ";", "$", "doc", "->", "formatOutput", "=", "true", ";", "$", "this", "->", "appendXml", "(", "$", "doc", ")", ";", "$", "xmlstr", "=", "$", ...
String representation of the current object. This is an xml representation with the XML declaration removed. @see appendXml()
[ "String", "representation", "of", "the", "current", "object", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/XMLElement.php#L199-L207
propelorm/Propel
generator/lib/behavior/DelegateBehavior.php
DelegateBehavior.modifyTable
public function modifyTable() { $table = $this->getTable(); $database = $table->getDatabase(); $delegates = explode(',', $this->parameters['to']); foreach ($delegates as $delegate) { $delegate = $database->getTablePrefix() . trim($delegate); if (!$database->ha...
php
public function modifyTable() { $table = $this->getTable(); $database = $table->getDatabase(); $delegates = explode(',', $this->parameters['to']); foreach ($delegates as $delegate) { $delegate = $database->getTablePrefix() . trim($delegate); if (!$database->ha...
[ "public", "function", "modifyTable", "(", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "database", "=", "$", "table", "->", "getDatabase", "(", ")", ";", "$", "delegates", "=", "explode", "(", "','", ",", "$", "th...
Lists the delegates and checks that the behavior can use them, And adds a fk from the delegate to the main table if not already set
[ "Lists", "the", "delegates", "and", "checks", "that", "the", "behavior", "can", "use", "them", "And", "adds", "a", "fk", "from", "the", "delegate", "to", "the", "main", "table", "if", "not", "already", "set" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/DelegateBehavior.php#L33-L64
propelorm/Propel
runtime/lib/query/ModelCriterion.php
ModelCriterion.dispatchPsHandling
protected function dispatchPsHandling(&$sb, array &$params) { switch ($this->comparison) { case Criteria::CUSTOM: // custom expression with no parameter binding $this->appendCustomToPs($sb, $params); break; case Criteria::IN: ...
php
protected function dispatchPsHandling(&$sb, array &$params) { switch ($this->comparison) { case Criteria::CUSTOM: // custom expression with no parameter binding $this->appendCustomToPs($sb, $params); break; case Criteria::IN: ...
[ "protected", "function", "dispatchPsHandling", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "switch", "(", "$", "this", "->", "comparison", ")", "{", "case", "Criteria", "::", "CUSTOM", ":", "// custom expression with no parameter binding", ...
Figure out which ModelCriterion method to use to build the prepared statement and parameters using to the Criterion comparison and call it to append the prepared statement and the parameters of the current clause. For performance reasons, this method tests the cases of parent::dispatchPsHandling() first, and that is no...
[ "Figure", "out", "which", "ModelCriterion", "method", "to", "use", "to", "build", "the", "prepared", "statement", "and", "parameters", "using", "to", "the", "Criterion", "comparison", "and", "call", "it", "to", "append", "the", "prepared", "statement", "and", ...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/query/ModelCriterion.php#L71-L114
propelorm/Propel
runtime/lib/query/ModelCriterion.php
ModelCriterion.appendModelClauseToPs
public function appendModelClauseToPs(&$sb, array &$params) { if ($this->value !== null) { $params[] = array('table' => $this->realtable, 'column' => $this->column, 'value' => $this->value); $sb .= str_replace('?', ':p' . count($params), $this->clause); } else { $...
php
public function appendModelClauseToPs(&$sb, array &$params) { if ($this->value !== null) { $params[] = array('table' => $this->realtable, 'column' => $this->column, 'value' => $this->value); $sb .= str_replace('?', ':p' . count($params), $this->clause); } else { $...
[ "public", "function", "appendModelClauseToPs", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "if", "(", "$", "this", "->", "value", "!==", "null", ")", "{", "$", "params", "[", "]", "=", "array", "(", "'table'", "=>", "$", "this"...
Appends a Prepared Statement representation of the ModelCriterion onto the buffer For regular model clauses, e.g. 'book.TITLE = ?' @param string &$sb The string that will receive the Prepared Statement @param array $params A list to which Prepared Statement parameters will be appended
[ "Appends", "a", "Prepared", "Statement", "representation", "of", "the", "ModelCriterion", "onto", "the", "buffer", "For", "regular", "model", "clauses", "e", ".", "g", ".", "book", ".", "TITLE", "=", "?" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/query/ModelCriterion.php#L123-L131
propelorm/Propel
runtime/lib/query/ModelCriterion.php
ModelCriterion.appendModelClauseLikeToPs
public function appendModelClauseLikeToPs(&$sb, array &$params) { // LIKE is case insensitive in mySQL and SQLite, but not in PostGres // If the column is case insensitive, use ILIKE / NOT ILIKE instead of LIKE / NOT LIKE if ($this->ignoreStringCase && $this->getDb() instanceof DBPostgres) {...
php
public function appendModelClauseLikeToPs(&$sb, array &$params) { // LIKE is case insensitive in mySQL and SQLite, but not in PostGres // If the column is case insensitive, use ILIKE / NOT ILIKE instead of LIKE / NOT LIKE if ($this->ignoreStringCase && $this->getDb() instanceof DBPostgres) {...
[ "public", "function", "appendModelClauseLikeToPs", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "// LIKE is case insensitive in mySQL and SQLite, but not in PostGres", "// If the column is case insensitive, use ILIKE / NOT ILIKE instead of LIKE / NOT LIKE", "if", ...
Appends a Prepared Statement representation of the ModelCriterion onto the buffer For LIKE model clauses, e.g. 'book.TITLE LIKE ?' Handles case insensitivity for VARCHAR columns @param string &$sb The string that will receive the Prepared Statement @param array $params A list to which Prepared Statement parameters...
[ "Appends", "a", "Prepared", "Statement", "representation", "of", "the", "ModelCriterion", "onto", "the", "buffer", "For", "LIKE", "model", "clauses", "e", ".", "g", ".", "book", ".", "TITLE", "LIKE", "?", "Handles", "case", "insensitivity", "for", "VARCHAR", ...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/query/ModelCriterion.php#L141-L149
propelorm/Propel
runtime/lib/query/ModelCriterion.php
ModelCriterion.appendModelClauseSeveralToPs
public function appendModelClauseSeveralToPs(&$sb, array &$params) { $clause = $this->clause; foreach ((array) $this->value as $value) { if ($value === null) { // FIXME we eventually need to translate a BETWEEN to // something like WHERE (col < :p1 OR :p1 ...
php
public function appendModelClauseSeveralToPs(&$sb, array &$params) { $clause = $this->clause; foreach ((array) $this->value as $value) { if ($value === null) { // FIXME we eventually need to translate a BETWEEN to // something like WHERE (col < :p1 OR :p1 ...
[ "public", "function", "appendModelClauseSeveralToPs", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "$", "clause", "=", "$", "this", "->", "clause", ";", "foreach", "(", "(", "array", ")", "$", "this", "->", "value", "as", "$", "va...
Appends a Prepared Statement representation of the ModelCriterion onto the buffer For ternary model clauses, e.G 'book.ID BETWEEN ? AND ?' @param string &$sb The string that will receive the Prepared Statement @param array $params A list to which Prepared Statement parameters will be appended @throws PropelExcept...
[ "Appends", "a", "Prepared", "Statement", "representation", "of", "the", "ModelCriterion", "onto", "the", "buffer", "For", "ternary", "model", "clauses", "e", ".", "G", "book", ".", "ID", "BETWEEN", "?", "AND", "?" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/query/ModelCriterion.php#L160-L174
propelorm/Propel
runtime/lib/query/ModelCriterion.php
ModelCriterion.appendModelClauseArrayToPs
public function appendModelClauseArrayToPs(&$sb, array &$params) { $_bindParams = array(); // the param names used in query building $_idxstart = count($params); $valuesLength = 0; foreach ((array) $this->value as $value) { $valuesLength++; // increment this first to corr...
php
public function appendModelClauseArrayToPs(&$sb, array &$params) { $_bindParams = array(); // the param names used in query building $_idxstart = count($params); $valuesLength = 0; foreach ((array) $this->value as $value) { $valuesLength++; // increment this first to corr...
[ "public", "function", "appendModelClauseArrayToPs", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "$", "_bindParams", "=", "array", "(", ")", ";", "// the param names used in query building", "$", "_idxstart", "=", "count", "(", "$", "params...
Appends a Prepared Statement representation of the ModelCriterion onto the buffer For IN or NOT IN model clauses, e.g. 'book.TITLE NOT IN ?' @param string &$sb The string that will receive the Prepared Statement @param array $params A list to which Prepared Statement parameters will be appended
[ "Appends", "a", "Prepared", "Statement", "representation", "of", "the", "ModelCriterion", "onto", "the", "buffer", "For", "IN", "or", "NOT", "IN", "model", "clauses", "e", ".", "g", ".", "book", ".", "TITLE", "NOT", "IN", "?" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/query/ModelCriterion.php#L183-L199
propelorm/Propel
runtime/lib/query/ModelCriterion.php
ModelCriterion.appendModelClauseRawToPs
protected function appendModelClauseRawToPs(&$sb, array &$params) { if (substr_count($this->clause, '?') != 1) { throw new PropelException(sprintf('Could not build SQL for expression "%s" because Criteria::RAW works only with a clause containing a single question mark placeholder', $this->column...
php
protected function appendModelClauseRawToPs(&$sb, array &$params) { if (substr_count($this->clause, '?') != 1) { throw new PropelException(sprintf('Could not build SQL for expression "%s" because Criteria::RAW works only with a clause containing a single question mark placeholder', $this->column...
[ "protected", "function", "appendModelClauseRawToPs", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "if", "(", "substr_count", "(", "$", "this", "->", "clause", ",", "'?'", ")", "!=", "1", ")", "{", "throw", "new", "PropelException", ...
Appends a Prepared Statement representation of the Criterion onto the buffer For custom expressions with a typed binding, e.g. 'foobar = ?' @param string &$sb The string that will receive the Prepared Statement @param array $params A list to which Prepared Statement parameters will be appended @throws PropelExcep...
[ "Appends", "a", "Prepared", "Statement", "representation", "of", "the", "Criterion", "onto", "the", "buffer", "For", "custom", "expressions", "with", "a", "typed", "binding", "e", ".", "g", ".", "foobar", "=", "?" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/query/ModelCriterion.php#L210-L217
propelorm/Propel
generator/lib/model/diff/PropelForeignKeyComparator.php
PropelForeignKeyComparator.computeDiff
public static function computeDiff(ForeignKey $fromFk, ForeignKey $toFk, $caseInsensitive = false) { // Check for differences in local and remote table $test = $caseInsensitive ? strtolower($fromFk->getTableName()) != strtolower($toFk->getTableName()) : $fromFk->getTableName(...
php
public static function computeDiff(ForeignKey $fromFk, ForeignKey $toFk, $caseInsensitive = false) { // Check for differences in local and remote table $test = $caseInsensitive ? strtolower($fromFk->getTableName()) != strtolower($toFk->getTableName()) : $fromFk->getTableName(...
[ "public", "static", "function", "computeDiff", "(", "ForeignKey", "$", "fromFk", ",", "ForeignKey", "$", "toFk", ",", "$", "caseInsensitive", "=", "false", ")", "{", "// Check for differences in local and remote table", "$", "test", "=", "$", "caseInsensitive", "?",...
Compute the difference between two Foreign key objects @param ForeignKey $fromFk @param ForeignKey $toFk @param boolean $caseInsensitive Whether the comparison is case insensitive. False by default. @return boolean false if the two fks are similar, true if they have differences
[ "Compute", "the", "difference", "between", "two", "Foreign", "key", "objects" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelForeignKeyComparator.php#L33-L90
propelorm/Propel
runtime/lib/logger/MojaviLogAdapter.php
MojaviLogAdapter.log
public function log($message, $severity = null) { if (is_null($this->logger)) { $this->logger = LogManager::getLogger('propel'); } switch ($severity) { case 'crit': $method = 'fatal'; break; case 'err': $met...
php
public function log($message, $severity = null) { if (is_null($this->logger)) { $this->logger = LogManager::getLogger('propel'); } switch ($severity) { case 'crit': $method = 'fatal'; break; case 'err': $met...
[ "public", "function", "log", "(", "$", "message", ",", "$", "severity", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "logger", ")", ")", "{", "$", "this", "->", "logger", "=", "LogManager", "::", "getLogger", "(", "'propel'", ...
Primary method to handle logging. @param mixed $message String or Exception object containing the message to log. @param integer $severity The numeric severity. Defaults to null so that no assumptions are made about the logging backend.
[ "Primary", "method", "to", "handle", "logging", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/logger/MojaviLogAdapter.php#L113-L150
propelorm/Propel
runtime/lib/connection/DebugPDOStatement.php
DebugPDOStatement.getExecutedQueryString
public function getExecutedQueryString(array $values = array()) { $sql = $this->queryString; $boundValues = empty($values) ? $this->boundValues : $values; $matches = array(); if (preg_match_all('/(:p[0-9]+\b)/', $sql, $matches)) { $size = count($matches[1]); f...
php
public function getExecutedQueryString(array $values = array()) { $sql = $this->queryString; $boundValues = empty($values) ? $this->boundValues : $values; $matches = array(); if (preg_match_all('/(:p[0-9]+\b)/', $sql, $matches)) { $size = count($matches[1]); f...
[ "public", "function", "getExecutedQueryString", "(", "array", "$", "values", "=", "array", "(", ")", ")", "{", "$", "sql", "=", "$", "this", "->", "queryString", ";", "$", "boundValues", "=", "empty", "(", "$", "values", ")", "?", "$", "this", "->", ...
@param array $values Parameters which were passed to execute(), if any. Default: bound parameters. @return string
[ "@param", "array", "$values", "Parameters", "which", "were", "passed", "to", "execute", "()", "if", "any", ".", "Default", ":", "bound", "parameters", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/connection/DebugPDOStatement.php#L68-L89
propelorm/Propel
runtime/lib/connection/DebugPDOStatement.php
DebugPDOStatement.execute
public function execute($input_parameters = null) { $debug = $this->pdo->getDebugSnapshot(); $return = parent::execute($input_parameters); $sql = $this->getExecutedQueryString($input_parameters?$input_parameters:array()); $this->pdo->log($sql, null, __METHOD__, $debug); $thi...
php
public function execute($input_parameters = null) { $debug = $this->pdo->getDebugSnapshot(); $return = parent::execute($input_parameters); $sql = $this->getExecutedQueryString($input_parameters?$input_parameters:array()); $this->pdo->log($sql, null, __METHOD__, $debug); $thi...
[ "public", "function", "execute", "(", "$", "input_parameters", "=", "null", ")", "{", "$", "debug", "=", "$", "this", "->", "pdo", "->", "getDebugSnapshot", "(", ")", ";", "$", "return", "=", "parent", "::", "execute", "(", "$", "input_parameters", ")", ...
Executes a prepared statement. Returns a boolean value indicating success. Overridden for query counting and logging. @param string $input_parameters @return boolean
[ "Executes", "a", "prepared", "statement", ".", "Returns", "a", "boolean", "value", "indicating", "success", ".", "Overridden", "for", "query", "counting", "and", "logging", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/connection/DebugPDOStatement.php#L99-L110
propelorm/Propel
runtime/lib/connection/DebugPDOStatement.php
DebugPDOStatement.bindValue
public function bindValue($pos, $value, $type = PDO::PARAM_STR) { $debug = $this->pdo->getDebugSnapshot(); $typestr = isset(self::$typeMap[$type]) ? self::$typeMap[$type] : '(default)'; $return = parent::bindValue($pos, $value, $type); $valuestr = $type == PDO::PARAM_LOB ? '[LOB valu...
php
public function bindValue($pos, $value, $type = PDO::PARAM_STR) { $debug = $this->pdo->getDebugSnapshot(); $typestr = isset(self::$typeMap[$type]) ? self::$typeMap[$type] : '(default)'; $return = parent::bindValue($pos, $value, $type); $valuestr = $type == PDO::PARAM_LOB ? '[LOB valu...
[ "public", "function", "bindValue", "(", "$", "pos", ",", "$", "value", ",", "$", "type", "=", "PDO", "::", "PARAM_STR", ")", "{", "$", "debug", "=", "$", "this", "->", "pdo", "->", "getDebugSnapshot", "(", ")", ";", "$", "typestr", "=", "isset", "(...
Binds a value to a corresponding named or question mark placeholder in the SQL statement that was use to prepare the statement. Returns a boolean value indicating success. @param integer $pos Parameter identifier (for determining what to replace in the query). @param mixed $value The value to bind to the parameter...
[ "Binds", "a", "value", "to", "a", "corresponding", "named", "or", "question", "mark", "placeholder", "in", "the", "SQL", "statement", "that", "was", "use", "to", "prepare", "the", "statement", ".", "Returns", "a", "boolean", "value", "indicating", "success", ...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/connection/DebugPDOStatement.php#L122-L135
propelorm/Propel
runtime/lib/connection/DebugPDOStatement.php
DebugPDOStatement.bindParam
public function bindParam($pos, &$value, $type = PDO::PARAM_STR, $length = 0, $driver_options = null) { $originalValue = $value; $debug = $this->pdo->getDebugSnapshot(); $typestr = isset(self::$typeMap[$type]) ? self::$typeMap[$type] : '(default)'; $return = parent::bindParam($pos, $...
php
public function bindParam($pos, &$value, $type = PDO::PARAM_STR, $length = 0, $driver_options = null) { $originalValue = $value; $debug = $this->pdo->getDebugSnapshot(); $typestr = isset(self::$typeMap[$type]) ? self::$typeMap[$type] : '(default)'; $return = parent::bindParam($pos, $...
[ "public", "function", "bindParam", "(", "$", "pos", ",", "&", "$", "value", ",", "$", "type", "=", "PDO", "::", "PARAM_STR", ",", "$", "length", "=", "0", ",", "$", "driver_options", "=", "null", ")", "{", "$", "originalValue", "=", "$", "value", "...
Binds a PHP variable to a corresponding named or question mark placeholder in the SQL statement that was use to prepare the statement. Unlike PDOStatement::bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement::execute() is called. Returns a boolean value indicating ...
[ "Binds", "a", "PHP", "variable", "to", "a", "corresponding", "named", "or", "question", "mark", "placeholder", "in", "the", "SQL", "statement", "that", "was", "use", "to", "prepare", "the", "statement", ".", "Unlike", "PDOStatement", "::", "bindValue", "()", ...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/connection/DebugPDOStatement.php#L151-L165
propelorm/Propel
runtime/lib/parser/PropelCSVParser.php
PropelCSVParser.fromArray
public function fromArray($array, $isList = false, $includeHeading = true) { $rows = array(); if ($isList) { if ($includeHeading) { $rows[] = implode($this->formatRow(array_keys(reset($array))), $this->delimiter); } foreach ($array as $row) { ...
php
public function fromArray($array, $isList = false, $includeHeading = true) { $rows = array(); if ($isList) { if ($includeHeading) { $rows[] = implode($this->formatRow(array_keys(reset($array))), $this->delimiter); } foreach ($array as $row) { ...
[ "public", "function", "fromArray", "(", "$", "array", ",", "$", "isList", "=", "false", ",", "$", "includeHeading", "=", "true", ")", "{", "$", "rows", "=", "array", "(", ")", ";", "if", "(", "$", "isList", ")", "{", "if", "(", "$", "includeHeading...
Converts data from an associative array to CSV. @param array $array Source data to convert @param boolean $isList Whether the input data contains more than one row @param boolean $includeHeading Whether the output should contain a heading line @return string Converted data, as a CSV string
[ "Converts", "data", "from", "an", "associative", "array", "to", "CSV", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/PropelCSVParser.php#L43-L61
propelorm/Propel
runtime/lib/parser/PropelCSVParser.php
PropelCSVParser.formatRow
protected function formatRow($row) { foreach ($row as &$column) { if (!is_scalar($column)) { $column = $this->serialize($column); } switch ($this->quoting) { case self::QUOTE_NONE: // do nothing... no quoting is happenin...
php
protected function formatRow($row) { foreach ($row as &$column) { if (!is_scalar($column)) { $column = $this->serialize($column); } switch ($this->quoting) { case self::QUOTE_NONE: // do nothing... no quoting is happenin...
[ "protected", "function", "formatRow", "(", "$", "row", ")", "{", "foreach", "(", "$", "row", "as", "&", "$", "column", ")", "{", "if", "(", "!", "is_scalar", "(", "$", "column", ")", ")", "{", "$", "column", "=", "$", "this", "->", "serialize", "...
Accepts a row of data and returns it formatted @param array $row An array of data to be formatted for output to the file @return array The formatted array
[ "Accepts", "a", "row", "of", "data", "and", "returns", "it", "formatted" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/PropelCSVParser.php#L75-L103
propelorm/Propel
runtime/lib/parser/PropelCSVParser.php
PropelCSVParser.containsSpecialChars
protected function containsSpecialChars($input) { $special_chars = str_split($this->lineTerminator, 1); $special_chars[] = $this->quotechar; $special_chars[] = $this->delimiter; foreach ($special_chars as $char) { if (strpos($input, $char) !== false) { ret...
php
protected function containsSpecialChars($input) { $special_chars = str_split($this->lineTerminator, 1); $special_chars[] = $this->quotechar; $special_chars[] = $this->delimiter; foreach ($special_chars as $char) { if (strpos($input, $char) !== false) { ret...
[ "protected", "function", "containsSpecialChars", "(", "$", "input", ")", "{", "$", "special_chars", "=", "str_split", "(", "$", "this", "->", "lineTerminator", ",", "1", ")", ";", "$", "special_chars", "[", "]", "=", "$", "this", "->", "quotechar", ";", ...
Returns true if input contains quotechar, delimiter or any of the characters in lineTerminator @param string $input A single value to be checked for special characters @return boolean True if contains any special characters
[ "Returns", "true", "if", "input", "contains", "quotechar", "delimiter", "or", "any", "of", "the", "characters", "in", "lineTerminator" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/PropelCSVParser.php#L140-L152
propelorm/Propel
runtime/lib/parser/PropelCSVParser.php
PropelCSVParser.fromCSV
public function fromCSV($data, $isList = false, $includeHeading = true) { return $this->toArray($data, $isList, $includeHeading); }
php
public function fromCSV($data, $isList = false, $includeHeading = true) { return $this->toArray($data, $isList, $includeHeading); }
[ "public", "function", "fromCSV", "(", "$", "data", ",", "$", "isList", "=", "false", ",", "$", "includeHeading", "=", "true", ")", "{", "return", "$", "this", "->", "toArray", "(", "$", "data", ",", "$", "isList", ",", "$", "includeHeading", ")", ";"...
Alias for PropelCSVParser::toArray() @param string $data Source data to convert, as a CSV string @param boolean $isList Whether the input data contains more than one row @param boolean $includeHeading Whether the input contains a heading line @return array Converted data
[ "Alias", "for", "PropelCSVParser", "::", "toArray", "()" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/parser/PropelCSVParser.php#L310-L313
propelorm/Propel
runtime/lib/adapter/DBAdapter.php
DBAdapter.factory
public static function factory($driver) { $adapterClass = isset(self::$adapters[$driver]) ? self::$adapters[$driver] : null; if ($adapterClass !== null) { $a = new $adapterClass(); return $a; } else { throw new PropelException("Unsupported Propel driver: ...
php
public static function factory($driver) { $adapterClass = isset(self::$adapters[$driver]) ? self::$adapters[$driver] : null; if ($adapterClass !== null) { $a = new $adapterClass(); return $a; } else { throw new PropelException("Unsupported Propel driver: ...
[ "public", "static", "function", "factory", "(", "$", "driver", ")", "{", "$", "adapterClass", "=", "isset", "(", "self", "::", "$", "adapters", "[", "$", "driver", "]", ")", "?", "self", "::", "$", "adapters", "[", "$", "driver", "]", ":", "null", ...
Creates a new instance of the database adapter associated with the specified Propel driver. @param string $driver The name of the Propel driver to create a new adapter instance for or a shorter form adapter key. @throws PropelException If the adapter could not be instantiated. @return DBAdapter An instance of a...
[ "Creates", "a", "new", "instance", "of", "the", "database", "adapter", "associated", "with", "the", "specified", "Propel", "driver", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBAdapter.php#L66-L76
propelorm/Propel
runtime/lib/adapter/DBAdapter.php
DBAdapter.formatTemporalValue
public function formatTemporalValue($value, $type) { /** @var $dt PropelDateTime */ if ($dt = PropelDateTime::newInstance($value)) { if ($type instanceof ColumnMap) { $type = $type->getType(); } switch ($type) { case PropelColumnTyp...
php
public function formatTemporalValue($value, $type) { /** @var $dt PropelDateTime */ if ($dt = PropelDateTime::newInstance($value)) { if ($type instanceof ColumnMap) { $type = $type->getType(); } switch ($type) { case PropelColumnTyp...
[ "public", "function", "formatTemporalValue", "(", "$", "value", ",", "$", "type", ")", "{", "/** @var $dt PropelDateTime */", "if", "(", "$", "dt", "=", "PropelDateTime", "::", "newInstance", "(", "$", "value", ")", ")", "{", "if", "(", "$", "type", "insta...
Formats a temporal value before binding, given a ColumnMap object. @param mixed $value The temporal value @param mixed $type PropelColumnTypes constant, or ColumnMap object @return string The formatted temporal value
[ "Formats", "a", "temporal", "value", "before", "binding", "given", "a", "ColumnMap", "object", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBAdapter.php#L288-L311
propelorm/Propel
runtime/lib/adapter/DBAdapter.php
DBAdapter.getDeleteFromClause
public function getDeleteFromClause($criteria, $tableName) { $sql = 'DELETE '; if ($queryComment = $criteria->getComment()) { $sql .= '/* ' . $queryComment . ' */ '; } if ($realTableName = $criteria->getTableForAlias($tableName)) { if ($this->useQuoteIdentifie...
php
public function getDeleteFromClause($criteria, $tableName) { $sql = 'DELETE '; if ($queryComment = $criteria->getComment()) { $sql .= '/* ' . $queryComment . ' */ '; } if ($realTableName = $criteria->getTableForAlias($tableName)) { if ($this->useQuoteIdentifie...
[ "public", "function", "getDeleteFromClause", "(", "$", "criteria", ",", "$", "tableName", ")", "{", "$", "sql", "=", "'DELETE '", ";", "if", "(", "$", "queryComment", "=", "$", "criteria", "->", "getComment", "(", ")", ")", "{", "$", "sql", ".=", "'/* ...
Returns the "DELETE FROM <table> [AS <alias>]" part of DELETE query. @param Criteria $criteria @param string $tableName @return string
[ "Returns", "the", "DELETE", "FROM", "<table", ">", "[", "AS", "<alias", ">", "]", "part", "of", "DELETE", "query", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBAdapter.php#L395-L414
propelorm/Propel
runtime/lib/adapter/DBAdapter.php
DBAdapter.createSelectSqlPart
public function createSelectSqlPart(Criteria $criteria, &$fromClause, $aliasAll = false) { $selectClause = array(); if ($aliasAll) { $this->turnSelectColumnsToAliases($criteria); // no select columns after that, they are all aliases } else { foreach ($cri...
php
public function createSelectSqlPart(Criteria $criteria, &$fromClause, $aliasAll = false) { $selectClause = array(); if ($aliasAll) { $this->turnSelectColumnsToAliases($criteria); // no select columns after that, they are all aliases } else { foreach ($cri...
[ "public", "function", "createSelectSqlPart", "(", "Criteria", "$", "criteria", ",", "&", "$", "fromClause", ",", "$", "aliasAll", "=", "false", ")", "{", "$", "selectClause", "=", "array", "(", ")", ";", "if", "(", "$", "aliasAll", ")", "{", "$", "this...
Builds the SELECT part of a SQL statement based on a Criteria taking into account select columns and 'as' columns (i.e. columns aliases) Move from BasePeer to DBAdapter and turn from static to non static @param Criteria $criteria @param array $fromClause @param boolean $aliasAll @return string
[ "Builds", "the", "SELECT", "part", "of", "a", "SQL", "statement", "based", "on", "a", "Criteria", "taking", "into", "account", "select", "columns", "and", "as", "columns", "(", "i", ".", "e", ".", "columns", "aliases", ")", "Move", "from", "BasePeer", "t...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/adapter/DBAdapter.php#L427-L486
propelorm/Propel
generator/lib/model/diff/PropelColumnDiff.php
PropelColumnDiff.getReverseDiff
public function getReverseDiff() { $diff = new self(); // columns $diff->setFromColumn($this->getToColumn()); $diff->setToColumn($this->getFromColumn()); // properties $changedProperties = array(); foreach ($this->getChangedProperties() as $name => $property...
php
public function getReverseDiff() { $diff = new self(); // columns $diff->setFromColumn($this->getToColumn()); $diff->setToColumn($this->getFromColumn()); // properties $changedProperties = array(); foreach ($this->getChangedProperties() as $name => $property...
[ "public", "function", "getReverseDiff", "(", ")", "{", "$", "diff", "=", "new", "self", "(", ")", ";", "// columns", "$", "diff", "->", "setFromColumn", "(", "$", "this", "->", "getToColumn", "(", ")", ")", ";", "$", "diff", "->", "setToColumn", "(", ...
Get the reverse diff for this diff @return PropelColumnDiff
[ "Get", "the", "reverse", "diff", "for", "this", "diff" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/model/diff/PropelColumnDiff.php#L91-L107
propelorm/Propel
generator/lib/builder/om/PHP5NodeBuilder.php
PHP5NodeBuilder.addClassOpen
protected function addClassOpen(&$script) { $table = $this->getTable(); $tableName = $table->getName(); $tableDesc = $table->getDescription(); $script .= " /** * Base class that represents a row from the '$tableName' table. * * $tableDesc *"; if ($this->getBuildProperty...
php
protected function addClassOpen(&$script) { $table = $this->getTable(); $tableName = $table->getName(); $tableDesc = $table->getDescription(); $script .= " /** * Base class that represents a row from the '$tableName' table. * * $tableDesc *"; if ($this->getBuildProperty...
[ "protected", "function", "addClassOpen", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "tableName", "=", "$", "table", "->", "getName", "(", ")", ";", "$", "tableDesc", "=", "$", "table", "...
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/PHP5NodeBuilder.php#L59-L85
propelorm/Propel
generator/lib/builder/om/PHP5NodeBuilder.php
PHP5NodeBuilder.addClassBody
protected function addClassBody(&$script) { $table = $this->getTable(); $this->addAttributes($script); $this->addConstructor($script); $this->addCallOverload($script); $this->addSetIteratorOptions($script); $this->addGetIterator($script); $this->addGetNode...
php
protected function addClassBody(&$script) { $table = $this->getTable(); $this->addAttributes($script); $this->addConstructor($script); $this->addCallOverload($script); $this->addSetIteratorOptions($script); $this->addGetIterator($script); $this->addGetNode...
[ "protected", "function", "addClassBody", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "this", "->", "addAttributes", "(", "$", "script", ")", ";", "$", "this", "->", "addConstructor", "(", "...
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/PHP5NodeBuilder.php#L93-L138
propelorm/Propel
generator/lib/builder/om/PHP5NodeBuilder.php
PHP5NodeBuilder.addConstructor
protected function addConstructor(&$script) { $script .= " /** * Constructor. * * @param " . $this->getStubObjectBuilder()->getClassname() . " \$obj Object wrapped by this node. */ public function __construct(\$obj = null) { if (\$obj !== null) { \$this->o...
php
protected function addConstructor(&$script) { $script .= " /** * Constructor. * * @param " . $this->getStubObjectBuilder()->getClassname() . " \$obj Object wrapped by this node. */ public function __construct(\$obj = null) { if (\$obj !== null) { \$this->o...
[ "protected", "function", "addConstructor", "(", "&", "$", "script", ")", "{", "$", "script", ".=", "\"\n /**\n * Constructor.\n *\n * @param \"", ".", "$", "this", "->", "getStubObjectBuilder", "(", ")", "->", "getClassname", "(", ")", ".", "\" \\$obj...
Adds the constructor. @param string &$script The script will be modified in this method.
[ "Adds", "the", "constructor", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5NodeBuilder.php#L184-L203
propelorm/Propel
runtime/lib/util/PropelDateTime.php
PropelDateTime.newInstance
public static function newInstance($value, DateTimeZone $timeZone = null, $dateTimeClass = 'DateTime') { if ($value instanceof DateTime) { return $value; } if ($value === null || $value === '') { // '' is seen as NULL for temporal objects // because DateTi...
php
public static function newInstance($value, DateTimeZone $timeZone = null, $dateTimeClass = 'DateTime') { if ($value instanceof DateTime) { return $value; } if ($value === null || $value === '') { // '' is seen as NULL for temporal objects // because DateTi...
[ "public", "static", "function", "newInstance", "(", "$", "value", ",", "DateTimeZone", "$", "timeZone", "=", "null", ",", "$", "dateTimeClass", "=", "'DateTime'", ")", "{", "if", "(", "$", "value", "instanceof", "DateTime", ")", "{", "return", "$", "value"...
Factory method to get a DateTime object from a temporal input @param mixed $value The value to convert (can be a string, a timestamp, or another DateTime) @param DateTimeZone $timeZone (optional) timezone @param string $dateTimeClass The class of the object to create, defaults to DateTime @r...
[ "Factory", "method", "to", "get", "a", "DateTime", "object", "from", "a", "temporal", "input" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/lib/util/PropelDateTime.php#L51-L80
propelorm/Propel
generator/lib/behavior/nestedset/NestedSetBehavior.php
NestedSetBehavior.modifyTable
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('left_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('left_column'), 'type' => 'INTEGER' )); } if (!$this->getTab...
php
public function modifyTable() { if (!$this->getTable()->containsColumn($this->getParameter('left_column'))) { $this->getTable()->addColumn(array( 'name' => $this->getParameter('left_column'), 'type' => 'INTEGER' )); } if (!$this->getTab...
[ "public", "function", "modifyTable", "(", ")", "{", "if", "(", "!", "$", "this", "->", "getTable", "(", ")", "->", "containsColumn", "(", "$", "this", "->", "getParameter", "(", "'left_column'", ")", ")", ")", "{", "$", "this", "->", "getTable", "(", ...
Add the left, right and scope to the current table
[ "Add", "the", "left", "right", "and", "scope", "to", "the", "current", "table" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/nestedset/NestedSetBehavior.php#L38-L65
propelorm/Propel
runtime/lib/validator/UniqueValidator.php
UniqueValidator.isValid
public function isValid(ValidatorMap $map, $str) { $column = $map->getColumn(); $c = new Criteria(); $c->add($column->getFullyQualifiedName(), $str, Criteria::EQUAL); $table = $column->getTable()->getClassName(); $clazz = $table . 'Peer'; $count = call_user_func(ar...
php
public function isValid(ValidatorMap $map, $str) { $column = $map->getColumn(); $c = new Criteria(); $c->add($column->getFullyQualifiedName(), $str, Criteria::EQUAL); $table = $column->getTable()->getClassName(); $clazz = $table . 'Peer'; $count = call_user_func(ar...
[ "public", "function", "isValid", "(", "ValidatorMap", "$", "map", ",", "$", "str", ")", "{", "$", "column", "=", "$", "map", "->", "getColumn", "(", ")", ";", "$", "c", "=", "new", "Criteria", "(", ")", ";", "$", "c", "->", "add", "(", "$", "co...
@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/UniqueValidator.php#L36-L51
propelorm/Propel
generator/lib/builder/om/PHP5NestedSetBuilder.php
PHP5NestedSetBuilder.addClassBody
protected function addClassBody(&$script) { $table = $this->getTable(); $this->addAttributes($script); $this->addGetIterator($script); $this->addSave($script); $this->addDelete($script); $this->addMakeRoot($script); $this->addGetLevel($script); $t...
php
protected function addClassBody(&$script) { $table = $this->getTable(); $this->addAttributes($script); $this->addGetIterator($script); $this->addSave($script); $this->addDelete($script); $this->addMakeRoot($script); $this->addGetLevel($script); $t...
[ "protected", "function", "addClassBody", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "this", "->", "addAttributes", "(", "$", "script", ")", ";", "$", "this", "->", "addGetIterator", "(", "...
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/PHP5NestedSetBuilder.php#L97-L162
propelorm/Propel
runtime/pear/BuildPropelPEARPackageTask.php
BuildPropelPEARPackageTask.main
public function main() { if ($this->dir === null) { throw new BuildException("You must specify the \"dir\" attribute for PEAR package task."); } if ($this->version === null) { throw new BuildException("You must specify the \"version\" attribute for PEAR package task....
php
public function main() { if ($this->dir === null) { throw new BuildException("You must specify the \"dir\" attribute for PEAR package task."); } if ($this->version === null) { throw new BuildException("You must specify the \"version\" attribute for PEAR package task....
[ "public", "function", "main", "(", ")", "{", "if", "(", "$", "this", "->", "dir", "===", "null", ")", "{", "throw", "new", "BuildException", "(", "\"You must specify the \\\"dir\\\" attribute for PEAR package task.\"", ")", ";", "}", "if", "(", "$", "this", "-...
Main entry point. @return void @throws BuildException
[ "Main", "entry", "point", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/runtime/pear/BuildPropelPEARPackageTask.php#L80-L134
propelorm/Propel
generator/lib/builder/om/ClassTools.php
ClassTools.getFilePath
public static function getFilePath($path, $classname = null, $extension = '.php') { $path = strtr(ltrim($path, '.'), '.', '/'); return self::createFilePath($path, $classname, $extension); }
php
public static function getFilePath($path, $classname = null, $extension = '.php') { $path = strtr(ltrim($path, '.'), '.', '/'); return self::createFilePath($path, $classname, $extension); }
[ "public", "static", "function", "getFilePath", "(", "$", "path", ",", "$", "classname", "=", "null", ",", "$", "extension", "=", "'.php'", ")", "{", "$", "path", "=", "strtr", "(", "ltrim", "(", "$", "path", ",", "'.'", ")", ",", "'.'", ",", "'/'",...
Gets the path to be used in include()/require() statement. Supports multiple function signatures: (1) getFilePath($dotPathClass); (2) getFilePath($dotPathPrefix, $className); (3) getFilePath($dotPathPrefix, $className, $extension); @param string $path dot-path to class or to package prefix. @param string $class...
[ "Gets", "the", "path", "to", "be", "used", "in", "include", "()", "/", "require", "()", "statement", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/ClassTools.php#L54-L59
propelorm/Propel
generator/lib/builder/om/ClassTools.php
ClassTools.createFilePath
public static function createFilePath($path, $classname = null, $extension = '.php') { if ($classname !== null) { if ($path !== '') { $path .= '/'; } return $path . $classname . $extension; } else { return $path . $extension; }...
php
public static function createFilePath($path, $classname = null, $extension = '.php') { if ($classname !== null) { if ($path !== '') { $path .= '/'; } return $path . $classname . $extension; } else { return $path . $extension; }...
[ "public", "static", "function", "createFilePath", "(", "$", "path", ",", "$", "classname", "=", "null", ",", "$", "extension", "=", "'.php'", ")", "{", "if", "(", "$", "classname", "!==", "null", ")", "{", "if", "(", "$", "path", "!==", "''", ")", ...
This method replaces the `getFilePath()` method in OMBuilder as we consider `$path` as a real path instead of a dot-notation value. `$path` is generated by the `getPackagePath()` method. @param string $path path to class or to package prefix. @param string $classname class name @param string $extension The exten...
[ "This", "method", "replaces", "the", "getFilePath", "()", "method", "in", "OMBuilder", "as", "we", "consider", "$path", "as", "a", "real", "path", "instead", "of", "a", "dot", "-", "notation", "value", ".", "$path", "is", "generated", "by", "the", "getPack...
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/ClassTools.php#L72-L83
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.validateModel
protected function validateModel() { parent::validateModel(); $table = $this->getTable(); // Check to see if any of the column constants are PHP reserved words. $colConstants = array(); foreach ($table->getColumns() as $col) { $colConstants[] = $this->getColumn...
php
protected function validateModel() { parent::validateModel(); $table = $this->getTable(); // Check to see if any of the column constants are PHP reserved words. $colConstants = array(); foreach ($table->getColumns() as $col) { $colConstants[] = $this->getColumn...
[ "protected", "function", "validateModel", "(", ")", "{", "parent", "::", "validateModel", "(", ")", ";", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "// Check to see if any of the column constants are PHP reserved words.", "$", "colConstants", "...
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/PHP5PeerBuilder.php#L34-L53
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addClassOpen
protected function addClassOpen(&$script) { $tableName = $this->getTable()->getName(); $tableDesc = $this->getTable()->getDescription(); if ($this->getBuildProperty('addClassLevelComment')) { $script .= " /** * Base static class for performing query and update operations on the...
php
protected function addClassOpen(&$script) { $tableName = $this->getTable()->getName(); $tableDesc = $this->getTable()->getDescription(); if ($this->getBuildProperty('addClassLevelComment')) { $script .= " /** * Base static class for performing query and update operations on the...
[ "protected", "function", "addClassOpen", "(", "&", "$", "script", ")", "{", "$", "tableName", "=", "$", "this", "->", "getTable", "(", ")", "->", "getName", "(", ")", ";", "$", "tableDesc", "=", "$", "this", "->", "getTable", "(", ")", "->", "getDesc...
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/PHP5PeerBuilder.php#L100-L136
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addClassClose
protected function addClassClose(&$script) { // apply behaviors $this->applyBehaviorModifier('staticMethods', $script, " "); $script .= " } // " . $this->getClassname() . " "; $this->addStaticTableMapRegistration($script); }
php
protected function addClassClose(&$script) { // apply behaviors $this->applyBehaviorModifier('staticMethods', $script, " "); $script .= " } // " . $this->getClassname() . " "; $this->addStaticTableMapRegistration($script); }
[ "protected", "function", "addClassClose", "(", "&", "$", "script", ")", "{", "// apply behaviors", "$", "this", "->", "applyBehaviorModifier", "(", "'staticMethods'", ",", "$", "script", ",", "\"\t\"", ")", ";", "$", "script", ".=", "\"\n} // \"", ".", "$", ...
Closes class. Adds closing brace at end of class and the static map builder registration code. @param string &$script The script will be modified in this method. @see addStaticTableMapRegistration()
[ "Closes", "class", ".", "Adds", "closing", "brace", "at", "end", "of", "class", "and", "the", "static", "map", "builder", "registration", "code", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L154-L163
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addStaticTableMapRegistration
protected function addStaticTableMapRegistration(&$script) { $table = $this->getTable(); $script .= " // This is the static code needed to register the TableMap for this table with the main Propel class. // " . $this->getClassName() . "::buildTableMap(); "; $this->applyBehaviorModifier('pe...
php
protected function addStaticTableMapRegistration(&$script) { $table = $this->getTable(); $script .= " // This is the static code needed to register the TableMap for this table with the main Propel class. // " . $this->getClassName() . "::buildTableMap(); "; $this->applyBehaviorModifier('pe...
[ "protected", "function", "addStaticTableMapRegistration", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n// This is the static code needed to register the TableMap for this table with the main ...
Adds the static map builder registration code. @param string &$script The script will be modified in this method.
[ "Adds", "the", "static", "map", "builder", "registration", "code", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L170-L181
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addConstantsAndAttributes
protected function addConstantsAndAttributes(&$script) { $dbName = $this->getDatabase()->getName(); $tableName = $this->getTable()->getName(); $tablePhpName = $this->getTable()->isAbstract() ? '' : addslashes($this->getStubObjectBuilder()->getFullyQualifiedClassname()); $script .= " ...
php
protected function addConstantsAndAttributes(&$script) { $dbName = $this->getDatabase()->getName(); $tableName = $this->getTable()->getName(); $tablePhpName = $this->getTable()->isAbstract() ? '' : addslashes($this->getStubObjectBuilder()->getFullyQualifiedClassname()); $script .= " ...
[ "protected", "function", "addConstantsAndAttributes", "(", "&", "$", "script", ")", "{", "$", "dbName", "=", "$", "this", "->", "getDatabase", "(", ")", "->", "getName", "(", ")", ";", "$", "tableName", "=", "$", "this", "->", "getTable", "(", ")", "->...
Adds constant and variable declarations that go at the top of the class. @param string &$script The script will be modified in this method. @see addColumnNameConstants()
[ "Adds", "constant", "and", "variable", "declarations", "that", "go", "at", "the", "top", "of", "the", "class", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L207-L264
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addEnumColumnConstants
protected function addEnumColumnConstants(&$script) { foreach ($this->getTable()->getColumns() as $col) { if ($col->isEnumType() || $col->getValueSet()) { $script .= " /** The enumerated values for the " . $col->getName() . " field */"; foreach ($col->getValue...
php
protected function addEnumColumnConstants(&$script) { foreach ($this->getTable()->getColumns() as $col) { if ($col->isEnumType() || $col->getValueSet()) { $script .= " /** The enumerated values for the " . $col->getName() . " field */"; foreach ($col->getValue...
[ "protected", "function", "addEnumColumnConstants", "(", "&", "$", "script", ")", "{", "foreach", "(", "$", "this", "->", "getTable", "(", ")", "->", "getColumns", "(", ")", "as", "$", "col", ")", "{", "if", "(", "$", "col", "->", "isEnumType", "(", "...
Adds the valueSet constants for ENUM columns. @param string &$script The script will be modified in this method.
[ "Adds", "the", "valueSet", "constants", "for", "ENUM", "columns", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L286-L300
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addEnumColumnAttributes
protected function addEnumColumnAttributes(&$script) { $script .= " /** The enumerated values for this table */ protected static \$enumValueSets = array("; foreach ($this->getTable()->getColumns() as $col) { if ($col->isEnumType() || $col->getValueSet()) { $script...
php
protected function addEnumColumnAttributes(&$script) { $script .= " /** The enumerated values for this table */ protected static \$enumValueSets = array("; foreach ($this->getTable()->getColumns() as $col) { if ($col->isEnumType() || $col->getValueSet()) { $script...
[ "protected", "function", "addEnumColumnAttributes", "(", "&", "$", "script", ")", "{", "$", "script", ".=", "\"\n /** The enumerated values for this table */\n protected static \\$enumValueSets = array(\"", ";", "foreach", "(", "$", "this", "->", "getTable", "(", ")",...
Adds the valueSet attributes for ENUM columns. @param string &$script The script will be modified in this method.
[ "Adds", "the", "valueSet", "attributes", "for", "ENUM", "columns", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L408-L428
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addTranslateFieldName
protected function addTranslateFieldName(&$script) { $script .= " /** * Translates a fieldname to another type * * @param string \$name field name * @param string \$fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME * ...
php
protected function addTranslateFieldName(&$script) { $script .= " /** * Translates a fieldname to another type * * @param string \$name field name * @param string \$fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME * ...
[ "protected", "function", "addTranslateFieldName", "(", "&", "$", "script", ")", "{", "$", "script", ".=", "\"\n /**\n * Translates a fieldname to another type\n *\n * @param string \\$name field name\n * @param string \\$fromType One of the class type constants B...
addGetFieldNames()
[ "addGetFieldNames", "()" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L453-L477
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addGetValueSets
protected function addGetValueSets(&$script) { $this->declareClassFromBuilder($this->getTableMapBuilder()); $callingClass = $this->getStubPeerBuilder()->getClassname(); $script .= " /** * Gets the list of values for all ENUM columns * @return array */ public static fun...
php
protected function addGetValueSets(&$script) { $this->declareClassFromBuilder($this->getTableMapBuilder()); $callingClass = $this->getStubPeerBuilder()->getClassname(); $script .= " /** * Gets the list of values for all ENUM columns * @return array */ public static fun...
[ "protected", "function", "addGetValueSets", "(", "&", "$", "script", ")", "{", "$", "this", "->", "declareClassFromBuilder", "(", "$", "this", "->", "getTableMapBuilder", "(", ")", ")", ";", "$", "callingClass", "=", "$", "this", "->", "getStubPeerBuilder", ...
Adds the getValueSets() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "getValueSets", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L484-L498
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addEnumMethods
protected function addEnumMethods(&$script) { foreach ($this->getTable()->getColumns() as $col) { /* @var $col Column */ if ($col->isEnumType()) { $script .= " /** * Gets the SQL value for " . $col->getPhpName() . " ENUM value * * @param string \$e...
php
protected function addEnumMethods(&$script) { foreach ($this->getTable()->getColumns() as $col) { /* @var $col Column */ if ($col->isEnumType()) { $script .= " /** * Gets the SQL value for " . $col->getPhpName() . " ENUM value * * @param string \$e...
[ "protected", "function", "addEnumMethods", "(", "&", "$", "script", ")", "{", "foreach", "(", "$", "this", "->", "getTable", "(", ")", "->", "getColumns", "(", ")", "as", "$", "col", ")", "{", "/* @var $col Column */", "if", "(", "$", "col", "->", "isE...
Adds methods for ENUM columns. @param string &$script The script will be modified in this method.
[ "Adds", "methods", "for", "ENUM", "columns", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L563-L582
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addBuildTableMap
protected function addBuildTableMap(&$script) { $this->declareClassFromBuilder($this->getTableMapBuilder()); $script .= " /** * Add a TableMap instance to the database for this peer class. */ public static function buildTableMap() { \$dbMap = Propel::getDatabaseMap(" . $t...
php
protected function addBuildTableMap(&$script) { $this->declareClassFromBuilder($this->getTableMapBuilder()); $script .= " /** * Add a TableMap instance to the database for this peer class. */ public static function buildTableMap() { \$dbMap = Propel::getDatabaseMap(" . $t...
[ "protected", "function", "addBuildTableMap", "(", "&", "$", "script", ")", "{", "$", "this", "->", "declareClassFromBuilder", "(", "$", "this", "->", "getTableMapBuilder", "(", ")", ")", ";", "$", "script", ".=", "\"\n /**\n * Add a TableMap instance to the d...
Adds the buildTableMap() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "buildTableMap", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L589-L604
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addInheritanceColumnConstants
public function addInheritanceColumnConstants(&$script) { if ($this->getTable()->getChildrenColumn()) { $col = $this->getTable()->getChildrenColumn(); $cfc = $col->getPhpName(); if ($col->isEnumeratedClasses()) { if ($col->isPhpPrimitiveNumericType()) {...
php
public function addInheritanceColumnConstants(&$script) { if ($this->getTable()->getChildrenColumn()) { $col = $this->getTable()->getChildrenColumn(); $cfc = $col->getPhpName(); if ($col->isEnumeratedClasses()) { if ($col->isPhpPrimitiveNumericType()) {...
[ "public", "function", "addInheritanceColumnConstants", "(", "&", "$", "script", ")", "{", "if", "(", "$", "this", "->", "getTable", "(", ")", "->", "getChildrenColumn", "(", ")", ")", "{", "$", "col", "=", "$", "this", "->", "getTable", "(", ")", "->",...
Adds the CLASSKEY_* and CLASSNAME_* constants used for inheritance. @param string &$script The script will be modified in this method.
[ "Adds", "the", "CLASSKEY_", "*", "and", "CLASSNAME_", "*", "constants", "used", "for", "inheritance", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L611-L650
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addAddSelectColumns
protected function addAddSelectColumns(&$script) { $script .= " /** * Add all the columns needed to create a new object. * * Note: any columns that were marked with lazyLoad=\"true\" in the * XML schema will not be added to the select list and only loaded * on demand. * ...
php
protected function addAddSelectColumns(&$script) { $script .= " /** * Add all the columns needed to create a new object. * * Note: any columns that were marked with lazyLoad=\"true\" in the * XML schema will not be added to the select list and only loaded * on demand. * ...
[ "protected", "function", "addAddSelectColumns", "(", "&", "$", "script", ")", "{", "$", "script", ".=", "\"\n /**\n * Add all the columns needed to create a new object.\n *\n * Note: any columns that were marked with lazyLoad=\\\"true\\\" in the\n * XML schema will not be ...
Adds the addSelectColumns() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "addSelectColumns", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L684-L721
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoCount
protected function addDoCount(&$script) { $script .= " /** * Returns the number of rows matching criteria. * * @param Criteria \$criteria * @param boolean \$distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. * @param ...
php
protected function addDoCount(&$script) { $script .= " /** * Returns the number of rows matching criteria. * * @param Criteria \$criteria * @param boolean \$distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. * @param ...
[ "protected", "function", "addDoCount", "(", "&", "$", "script", ")", "{", "$", "script", ".=", "\"\n /**\n * Returns the number of rows matching criteria.\n *\n * @param Criteria \\$criteria\n * @param boolean \\$distinct Whether to select only distinct columns; ...
Adds the doCount() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doCount", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L728-L780
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoSelectStmt
protected function addDoSelectStmt(&$script) { $script .= " /** * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. * * Use this method directly if you want to work with an executed statement directly (for example * to perform your own obj...
php
protected function addDoSelectStmt(&$script) { $script .= " /** * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. * * Use this method directly if you want to work with an executed statement directly (for example * to perform your own obj...
[ "protected", "function", "addDoSelectStmt", "(", "&", "$", "script", ")", "{", "$", "script", ".=", "\"\n /**\n * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.\n *\n * Use this method directly if you want to work with an executed...
Adds the doSelectStmt() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doSelectStmt", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L840-L879
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.getInstancePoolKeySnippet
public function getInstancePoolKeySnippet($pkphp) { $pkphp = (array) $pkphp; // make it an array if it is not. $script = ""; if (count($pkphp) > 1) { $script .= "serialize(array("; $i = 0; foreach ($pkphp as $pkvar) { $script .= ($i++ ? ', ...
php
public function getInstancePoolKeySnippet($pkphp) { $pkphp = (array) $pkphp; // make it an array if it is not. $script = ""; if (count($pkphp) > 1) { $script .= "serialize(array("; $i = 0; foreach ($pkphp as $pkvar) { $script .= ($i++ ? ', ...
[ "public", "function", "getInstancePoolKeySnippet", "(", "$", "pkphp", ")", "{", "$", "pkphp", "=", "(", "array", ")", "$", "pkphp", ";", "// make it an array if it is not.", "$", "script", "=", "\"\"", ";", "if", "(", "count", "(", "$", "pkphp", ")", ">", ...
Adds the PHP code to return a instance pool key for the passed-in primary key variable names. @param array $pkphp An array of PHP var names / method calls representing complete pk. @return string
[ "Adds", "the", "PHP", "code", "to", "return", "a", "instance", "pool", "key", "for", "the", "passed", "-", "in", "primary", "key", "variable", "names", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L888-L904
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addAddInstanceToPool
protected function addAddInstanceToPool(&$script) { $table = $this->getTable(); $script .= " /** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when...
php
protected function addAddInstanceToPool(&$script) { $table = $this->getTable(); $script .= " /** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when...
[ "protected", "function", "addAddInstanceToPool", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Adds an object to the instance pool.\n *\n * Propel keeps cached copies o...
Creates a convenience method to add objects to an instance pool. @param string &$script The script will be modified in this method.
[ "Creates", "a", "convenience", "method", "to", "add", "objects", "to", "an", "instance", "pool", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L911-L950
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addRemoveInstanceFromPool
protected function addRemoveInstanceFromPool(&$script) { $table = $this->getTable(); $script .= " /** * Removes an object from the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- espec...
php
protected function addRemoveInstanceFromPool(&$script) { $table = $this->getTable(); $script .= " /** * Removes an object from the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- espec...
[ "protected", "function", "addRemoveInstanceFromPool", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Removes an object from the instance pool.\n *\n * Propel keeps cache...
Creates a convenience method to remove objects form an instance pool. @param string &$script The script will be modified in this method.
[ "Creates", "a", "convenience", "method", "to", "remove", "objects", "form", "an", "instance", "pool", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L957-L1014
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addClearRelatedInstancePool
protected function addClearRelatedInstancePool(&$script) { $table = $this->getTable(); $script .= " /** * Method to invalidate the instance pool of all tables related to " . $table->getName() . " * by a foreign key with ON DELETE CASCADE */ public static function clearRelatedI...
php
protected function addClearRelatedInstancePool(&$script) { $table = $this->getTable(); $script .= " /** * Method to invalidate the instance pool of all tables related to " . $table->getName() . " * by a foreign key with ON DELETE CASCADE */ public static function clearRelatedI...
[ "protected", "function", "addClearRelatedInstancePool", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Method to invalidate the instance pool of all tables related to \"", "."...
Adds method to clear the instance pool of related tables. @param string &$script The script will be modified in this method.
[ "Adds", "method", "to", "clear", "the", "instance", "pool", "of", "related", "tables", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1046-L1083
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addGetPrimaryKeyFromRow
protected function addGetPrimaryKeyFromRow(&$script) { $script .= " /** * Retrieves the primary key from the DB resultset row * For tables with a single-column primary key, that simple pkey value will be returned. For tables with * a multi-column primary key, an array of the primary key ...
php
protected function addGetPrimaryKeyFromRow(&$script) { $script .= " /** * Retrieves the primary key from the DB resultset row * For tables with a single-column primary key, that simple pkey value will be returned. For tables with * a multi-column primary key, an array of the primary key ...
[ "protected", "function", "addGetPrimaryKeyFromRow", "(", "&", "$", "script", ")", "{", "$", "script", ".=", "\"\n /**\n * Retrieves the primary key from the DB resultset row\n * For tables with a single-column primary key, that simple pkey value will be returned. For tables with\...
Adds method to get the primary key from a row @param string &$script The script will be modified in this method.
[ "Adds", "method", "to", "get", "the", "primary", "key", "from", "a", "row" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1169-L1212
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addPopulateObjects
protected function addPopulateObjects(&$script) { $table = $this->getTable(); $script .= " /** * The returned array will contain objects of the default type or * objects that inherit from the default. * * @throws PropelException Any exceptions caught during processing will be...
php
protected function addPopulateObjects(&$script) { $table = $this->getTable(); $script .= " /** * The returned array will contain objects of the default type or * objects that inherit from the default. * * @throws PropelException Any exceptions caught during processing will be...
[ "protected", "function", "addPopulateObjects", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * The returned array will contain objects of the default type or\n * objects that...
Adds the populateObjects() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "populateObjects", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1219-L1273
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addPopulateObject
protected function addPopulateObject(&$script) { $table = $this->getTable(); $script .= " /** * Populates an object of the default type or an object that inherit from the default. * * @param array \$row PropelPDO resultset row. * @param int \$startcol The 0-based of...
php
protected function addPopulateObject(&$script) { $table = $this->getTable(); $script .= " /** * Populates an object of the default type or an object that inherit from the default. * * @param array \$row PropelPDO resultset row. * @param int \$startcol The 0-based of...
[ "protected", "function", "addPopulateObject", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Populates an object of the default type or an object that inherit from the default.\...
Adds the populateObject() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "populateObject", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1280-L1327
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addGetOMClass_Inheritance
protected function addGetOMClass_Inheritance(&$script) { $col = $this->getTable()->getChildrenColumn(); $script .= " /** * The returned Class will contain objects of the default type or * objects that inherit from the default. * * @param array \$row PropelPDO result row....
php
protected function addGetOMClass_Inheritance(&$script) { $col = $this->getTable()->getChildrenColumn(); $script .= " /** * The returned Class will contain objects of the default type or * objects that inherit from the default. * * @param array \$row PropelPDO result row....
[ "protected", "function", "addGetOMClass_Inheritance", "(", "&", "$", "script", ")", "{", "$", "col", "=", "$", "this", "->", "getTable", "(", ")", "->", "getChildrenColumn", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * The returned Class will contain o...
Adds a getOMClass() for non-abstract tables that have inheritance. @param string &$script The script will be modified in this method.
[ "Adds", "a", "getOMClass", "()", "for", "non", "-", "abstract", "tables", "that", "have", "inheritance", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1334-L1386
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoInsert
protected function addDoInsert(&$script) { $table = $this->getTable(); $script .= " /** * Performs an INSERT on the database, given a " . $this->getObjectClassname() . " or Criteria object. * * @param mixed \$values Criteria or " . $this->getObjectClassname() . " object conta...
php
protected function addDoInsert(&$script) { $table = $this->getTable(); $script .= " /** * Performs an INSERT on the database, given a " . $this->getObjectClassname() . " or Criteria object. * * @param mixed \$values Criteria or " . $this->getObjectClassname() . " object conta...
[ "protected", "function", "addDoInsert", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Performs an INSERT on the database, given a \"", ".", "$", "this", "->", "getObj...
Adds the doInsert() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doInsert", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1443-L1511
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoUpdate
protected function addDoUpdate(&$script) { $table = $this->getTable(); $script .= " /** * Performs an UPDATE on the database, given a " . $this->getObjectClassname() . " or Criteria object. * * @param mixed \$values Criteria or " . $this->getObjectClassname() . " object conta...
php
protected function addDoUpdate(&$script) { $table = $this->getTable(); $script .= " /** * Performs an UPDATE on the database, given a " . $this->getObjectClassname() . " or Criteria object. * * @param mixed \$values Criteria or " . $this->getObjectClassname() . " object conta...
[ "protected", "function", "addDoUpdate", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Performs an UPDATE on the database, given a \"", ".", "$", "this", "->", "getObj...
Adds the doUpdate() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doUpdate", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1518-L1568
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoDeleteAll
protected function addDoDeleteAll(&$script) { $table = $this->getTable(); $script .= " /** * Deletes all rows from the " . $table->getName() . " table. * * @param PropelPDO \$con the connection to use * @return int The number of affected rows (if supported by...
php
protected function addDoDeleteAll(&$script) { $table = $this->getTable(); $script .= " /** * Deletes all rows from the " . $table->getName() . " table. * * @param PropelPDO \$con the connection to use * @return int The number of affected rows (if supported by...
[ "protected", "function", "addDoDeleteAll", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Deletes all rows from the \"", ".", "$", "table", "->", "getName", "(", "...
Adds the doDeleteAll() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doDeleteAll", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1575-L1620
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoDelete
protected function addDoDelete(&$script) { $table = $this->getTable(); $emulateCascade = $this->isDeleteCascadeEmulationNeeded() || $this->isDeleteSetNullEmulationNeeded(); $script .= " /** * Performs a DELETE on the database, given a " . $this->getObjectClassname() . " or Criteria ...
php
protected function addDoDelete(&$script) { $table = $this->getTable(); $emulateCascade = $this->isDeleteCascadeEmulationNeeded() || $this->isDeleteSetNullEmulationNeeded(); $script .= " /** * Performs a DELETE on the database, given a " . $this->getObjectClassname() . " or Criteria ...
[ "protected", "function", "addDoDelete", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "emulateCascade", "=", "$", "this", "->", "isDeleteCascadeEmulationNeeded", "(", ")", "||", "$", "this", "->"...
Adds the doDelete() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doDelete", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1627-L1782
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoOnDeleteCascade
protected function addDoOnDeleteCascade(&$script) { $table = $this->getTable(); $script .= " /** * This is a method for emulating ON DELETE CASCADE for DBs that don't support this * feature (like MySQL or SQLite). * * This method is not very speedy because it must perform a q...
php
protected function addDoOnDeleteCascade(&$script) { $table = $this->getTable(); $script .= " /** * This is a method for emulating ON DELETE CASCADE for DBs that don't support this * feature (like MySQL or SQLite). * * This method is not very speedy because it must perform a q...
[ "protected", "function", "addDoOnDeleteCascade", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * This is a method for emulating ON DELETE CASCADE for DBs that don't support this\...
Adds the doOnDeleteCascade() method, which provides ON DELETE CASCADE emulation. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doOnDeleteCascade", "()", "method", "which", "provides", "ON", "DELETE", "CASCADE", "emulation", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1789-L1862
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoOnDeleteSetNull
protected function addDoOnDeleteSetNull(&$script) { $table = $this->getTable(); $script .= " /** * This is a method for emulating ON DELETE SET NULL DBs that don't support this * feature (like MySQL or SQLite). * * This method is not very speedy because it must perform a quer...
php
protected function addDoOnDeleteSetNull(&$script) { $table = $this->getTable(); $script .= " /** * This is a method for emulating ON DELETE SET NULL DBs that don't support this * feature (like MySQL or SQLite). * * This method is not very speedy because it must perform a quer...
[ "protected", "function", "addDoOnDeleteSetNull", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * This is a method for emulating ON DELETE SET NULL DBs that don't support this\n ...
Adds the doOnDeleteSetNull() method, which provides ON DELETE SET NULL emulation. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doOnDeleteSetNull", "()", "method", "which", "provides", "ON", "DELETE", "SET", "NULL", "emulation", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1869-L1941
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoValidate
protected function addDoValidate(&$script) { $table = $this->getTable(); $script .= " /** * Validates all modified columns of given " . $this->getObjectClassname() . " object. * If parameter \$columns is either a single column name or an array of column names * than only those col...
php
protected function addDoValidate(&$script) { $table = $this->getTable(); $script .= " /** * Validates all modified columns of given " . $this->getObjectClassname() . " object. * If parameter \$columns is either a single column name or an array of column names * than only those col...
[ "protected", "function", "addDoValidate", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Validates all modified columns of given \"", ".", "$", "this", "->", "getObjec...
Adds the doValidate() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doValidate", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L1948-L2000
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addRetrieveByPK_SinglePK
protected function addRetrieveByPK_SinglePK(&$script) { $table = $this->getTable(); $pks = $table->getPrimaryKey(); $col = $pks[0]; $script .= " /** * Retrieve a single object by pkey. * * @param " . $col->getPhpType() . " \$pk the primary key. * @param ...
php
protected function addRetrieveByPK_SinglePK(&$script) { $table = $this->getTable(); $pks = $table->getPrimaryKey(); $col = $pks[0]; $script .= " /** * Retrieve a single object by pkey. * * @param " . $col->getPhpType() . " \$pk the primary key. * @param ...
[ "protected", "function", "addRetrieveByPK_SinglePK", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "pks", "=", "$", "table", "->", "getPrimaryKey", "(", ")", ";", "$", "col", "=", "$", "pks",...
Adds the retrieveByPK method for tables with single-column primary key. @param string &$script The script will be modified in this method.
[ "Adds", "the", "retrieveByPK", "method", "for", "tables", "with", "single", "-", "column", "primary", "key", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2007-L2040
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addRetrieveByPKs_SinglePK
protected function addRetrieveByPKs_SinglePK(&$script) { $table = $this->getTable(); $script .= " /** * Retrieve multiple objects by pkey. * * @param array \$pks List of primary keys * @param PropelPDO \$con the connection to use * @return " . $th...
php
protected function addRetrieveByPKs_SinglePK(&$script) { $table = $this->getTable(); $script .= " /** * Retrieve multiple objects by pkey. * * @param array \$pks List of primary keys * @param PropelPDO \$con the connection to use * @return " . $th...
[ "protected", "function", "addRetrieveByPKs_SinglePK", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Retrieve multiple objects by pkey.\n *\n * @param array \\$pks ...
Adds the retrieveByPKs method for tables with single-column primary key. @param string &$script The script will be modified in this method.
[ "Adds", "the", "retrieveByPKs", "method", "for", "tables", "with", "single", "-", "column", "primary", "key", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2047-L2081
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addRetrieveByPK_MultiPK
protected function addRetrieveByPK_MultiPK(&$script) { $table = $this->getTable(); $script .= " /** * Retrieve object using using composite pkey values."; foreach ($table->getPrimaryKey() as $col) { $clo = strtolower($col->getName()); $cptype = $col->getPhpTy...
php
protected function addRetrieveByPK_MultiPK(&$script) { $table = $this->getTable(); $script .= " /** * Retrieve object using using composite pkey values."; foreach ($table->getPrimaryKey() as $col) { $clo = strtolower($col->getName()); $cptype = $col->getPhpTy...
[ "protected", "function", "addRetrieveByPK_MultiPK", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "script", ".=", "\"\n /**\n * Retrieve object using using composite pkey values.\"", ";", "foreach", "...
Adds the retrieveByPK method for tables with multi-column primary key. @param string &$script The script will be modified in this method.
[ "Adds", "the", "retrieveByPK", "method", "for", "tables", "with", "multi", "-", "column", "primary", "key", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2088-L2135
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addSelectMethods
protected function addSelectMethods(&$script) { $table = $this->getTable(); parent::addSelectMethods($script); $this->addEnumMethods($script); $this->addDoCountJoin($script); $this->addDoSelectJoin($script); $countFK = count($table->getForeignKeys()); $inc...
php
protected function addSelectMethods(&$script) { $table = $this->getTable(); parent::addSelectMethods($script); $this->addEnumMethods($script); $this->addDoCountJoin($script); $this->addDoSelectJoin($script); $countFK = count($table->getForeignKeys()); $inc...
[ "protected", "function", "addSelectMethods", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "parent", "::", "addSelectMethods", "(", "$", "script", ")", ";", "$", "this", "->", "addEnumMethods", "(", ...
Adds the complex OM methods to the base addSelectMethods() function. @param string &$script The script will be modified in this method. @see PeerBuilder::addSelectMethods()
[ "Adds", "the", "complex", "OM", "methods", "to", "the", "base", "addSelectMethods", "()", "function", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2166-L2198
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.getPrimaryKeyColOffsets
protected function getPrimaryKeyColOffsets(Table $tbl) { $offsets = array(); $idx = 0; foreach ($tbl->getColumns() as $col) { if ($col->isPrimaryKey()) { $offsets[] = $idx; } $idx++; } return $offsets; }
php
protected function getPrimaryKeyColOffsets(Table $tbl) { $offsets = array(); $idx = 0; foreach ($tbl->getColumns() as $col) { if ($col->isPrimaryKey()) { $offsets[] = $idx; } $idx++; } return $offsets; }
[ "protected", "function", "getPrimaryKeyColOffsets", "(", "Table", "$", "tbl", ")", "{", "$", "offsets", "=", "array", "(", ")", ";", "$", "idx", "=", "0", ";", "foreach", "(", "$", "tbl", "->", "getColumns", "(", ")", "as", "$", "col", ")", "{", "i...
Get the column offsets of the primary key(s) for specified table. @param Table $tbl @return array int[] The column offsets of the primary key(s).
[ "Get", "the", "column", "offsets", "of", "the", "primary", "key", "(", "s", ")", "for", "specified", "table", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2207-L2219
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoSelectJoin
protected function addDoSelectJoin(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $countFK = count($table->getForeignKeys()); $join_behavior = $this->getJoinBehavior(); if ($countFK >= 1) { foreach ($table->getForeignKeys() as ...
php
protected function addDoSelectJoin(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $countFK = count($table->getForeignKeys()); $join_behavior = $this->getJoinBehavior(); if ($countFK >= 1) { foreach ($table->getForeignKeys() as ...
[ "protected", "function", "addDoSelectJoin", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "className", "=", "$", "this", "->", "getObjectClassname", "(", ")", ";", "$", "countFK", "=", "count",...
Adds the doSelectJoin*() methods. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doSelectJoin", "*", "()", "methods", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2253-L2383
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoCountJoin
protected function addDoCountJoin(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $countFK = count($table->getForeignKeys()); $join_behavior = $this->getJoinBehavior(); if ($countFK >= 1) { foreach ($table->getForeignKeys() as $...
php
protected function addDoCountJoin(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $countFK = count($table->getForeignKeys()); $join_behavior = $this->getJoinBehavior(); if ($countFK >= 1) { foreach ($table->getForeignKeys() as $...
[ "protected", "function", "addDoCountJoin", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "className", "=", "$", "this", "->", "getObjectClassname", "(", ")", ";", "$", "countFK", "=", "count", ...
Adds the doCountJoin*() methods. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doCountJoin", "*", "()", "methods", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2390-L2474
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoSelectJoinAll
protected function addDoSelectJoinAll(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $join_behavior = $this->getJoinBehavior(); $script .= " /** * Selects a collection of $className objects pre-filled with all related objects. * ...
php
protected function addDoSelectJoinAll(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $join_behavior = $this->getJoinBehavior(); $script .= " /** * Selects a collection of $className objects pre-filled with all related objects. * ...
[ "protected", "function", "addDoSelectJoinAll", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "className", "=", "$", "this", "->", "getObjectClassname", "(", ")", ";", "$", "join_behavior", "=", ...
Adds the doSelectJoinAll() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doSelectJoinAll", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2481-L2641
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoCountJoinAll
protected function addDoCountJoinAll(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $join_behavior = $this->getJoinBehavior(); $script .= " /** * Returns the number of rows matching criteria, joining all related tables * * @para...
php
protected function addDoCountJoinAll(&$script) { $table = $this->getTable(); $className = $this->getObjectClassname(); $join_behavior = $this->getJoinBehavior(); $script .= " /** * Returns the number of rows matching criteria, joining all related tables * * @para...
[ "protected", "function", "addDoCountJoinAll", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "className", "=", "$", "this", "->", "getObjectClassname", "(", ")", ";", "$", "join_behavior", "=", ...
Adds the doCountJoinAll() method. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doCountJoinAll", "()", "method", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2649-L2718
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoSelectJoinAllExcept
protected function addDoSelectJoinAllExcept(&$script) { $table = $this->getTable(); $join_behavior = $this->getJoinBehavior(); // ------------------------------------------------------------------------ // doSelectJoinAllExcept*() // -----------------------------------------...
php
protected function addDoSelectJoinAllExcept(&$script) { $table = $this->getTable(); $join_behavior = $this->getJoinBehavior(); // ------------------------------------------------------------------------ // doSelectJoinAllExcept*() // -----------------------------------------...
[ "protected", "function", "addDoSelectJoinAllExcept", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "join_behavior", "=", "$", "this", "->", "getJoinBehavior", "(", ")", ";", "// ---------------------...
Adds the doSelectJoinAllExcept*() methods. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doSelectJoinAllExcept", "*", "()", "methods", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2725-L2915
propelorm/Propel
generator/lib/builder/om/PHP5PeerBuilder.php
PHP5PeerBuilder.addDoCountJoinAllExcept
protected function addDoCountJoinAllExcept(&$script) { $table = $this->getTable(); $join_behavior = $this->getJoinBehavior(); $fkeys = $table->getForeignKeys(); // this sep assignment is necessary otherwise sub-loops over // getForeignKeys() will cause this to only execute one time....
php
protected function addDoCountJoinAllExcept(&$script) { $table = $this->getTable(); $join_behavior = $this->getJoinBehavior(); $fkeys = $table->getForeignKeys(); // this sep assignment is necessary otherwise sub-loops over // getForeignKeys() will cause this to only execute one time....
[ "protected", "function", "addDoCountJoinAllExcept", "(", "&", "$", "script", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "join_behavior", "=", "$", "this", "->", "getJoinBehavior", "(", ")", ";", "$", "fkeys", "=", "...
Adds the doCountJoinAllExcept*() methods. @param string &$script The script will be modified in this method.
[ "Adds", "the", "doCountJoinAllExcept", "*", "()", "methods", "." ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/builder/om/PHP5PeerBuilder.php#L2922-L3011
propelorm/Propel
generator/lib/behavior/i18n/I18nBehaviorObjectBuilderModifier.php
I18nBehaviorObjectBuilderModifier.addTranslatedColumnSetter
protected function addTranslatedColumnSetter(Column $column) { $i18nTablePhpName = $this->builder->getNewStubObjectBuilder($this->behavior->getI18nTable())->getClassname(); $tablePhpName = $this->builder->getStubObjectBuilder()->getClassname(); $objectBuilder = $this->builder->getNewObjectBu...
php
protected function addTranslatedColumnSetter(Column $column) { $i18nTablePhpName = $this->builder->getNewStubObjectBuilder($this->behavior->getI18nTable())->getClassname(); $tablePhpName = $this->builder->getStubObjectBuilder()->getClassname(); $objectBuilder = $this->builder->getNewObjectBu...
[ "protected", "function", "addTranslatedColumnSetter", "(", "Column", "$", "column", ")", "{", "$", "i18nTablePhpName", "=", "$", "this", "->", "builder", "->", "getNewStubObjectBuilder", "(", "$", "this", "->", "behavior", "->", "getI18nTable", "(", ")", ")", ...
cannot be specified by the user
[ "cannot", "be", "specified", "by", "the", "user" ]
train
https://github.com/propelorm/Propel/blob/3f7a284906ce3e402bcb101938270842fdad71fa/generator/lib/behavior/i18n/I18nBehaviorObjectBuilderModifier.php#L171-L196