repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
propelorm/Propel2
src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php
StandardServiceContainer.getConnectionManager
public function getConnectionManager($name) { if (!isset($this->connectionManagers[$name])) { throw new RuntimeException(sprintf('No connection defined for database "%s". Did you forget to define a connection or is it wrong written?', $name)); } return $this->connectionManagers[...
php
public function getConnectionManager($name) { if (!isset($this->connectionManagers[$name])) { throw new RuntimeException(sprintf('No connection defined for database "%s". Did you forget to define a connection or is it wrong written?', $name)); } return $this->connectionManagers[...
[ "public", "function", "getConnectionManager", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "connectionManagers", "[", "$", "name", "]", ")", ")", "{", "throw", "new", "RuntimeException", "(", "sprintf", "(", "'No connection ...
@param string $name The datasource name @return \Propel\Runtime\Connection\ConnectionManagerInterface @throws \Propel\Runtime\Exception\RuntimeException - if the datasource doesn't exist
[ "@param", "string", "$name", "The", "datasource", "name" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php#L276-L283
propelorm/Propel2
src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php
StandardServiceContainer.getConnection
public function getConnection($name = null, $mode = ServiceContainerInterface::CONNECTION_WRITE) { if (null === $name) { $name = $this->getDefaultDatasource(); } if (ServiceContainerInterface::CONNECTION_READ === $mode) { return $this->getReadConnection($name); ...
php
public function getConnection($name = null, $mode = ServiceContainerInterface::CONNECTION_WRITE) { if (null === $name) { $name = $this->getDefaultDatasource(); } if (ServiceContainerInterface::CONNECTION_READ === $mode) { return $this->getReadConnection($name); ...
[ "public", "function", "getConnection", "(", "$", "name", "=", "null", ",", "$", "mode", "=", "ServiceContainerInterface", "::", "CONNECTION_WRITE", ")", "{", "if", "(", "null", "===", "$", "name", ")", "{", "$", "name", "=", "$", "this", "->", "getDefaul...
Get a connection for a given datasource. If the connection has not been opened, open it using the related connectionSettings. If the connection has already been opened, return it. @param string $name The datasource name @param string $mode The connection mode (this applies to replication systems). @return \Propel\Ru...
[ "Get", "a", "connection", "for", "a", "given", "datasource", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php#L327-L338
propelorm/Propel2
src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php
StandardServiceContainer.setConnection
public function setConnection($name, ConnectionInterface $connection) { $manager = new ConnectionManagerSingle(); $manager->setConnection($connection); $this->setConnectionManager($name, $manager); }
php
public function setConnection($name, ConnectionInterface $connection) { $manager = new ConnectionManagerSingle(); $manager->setConnection($connection); $this->setConnectionManager($name, $manager); }
[ "public", "function", "setConnection", "(", "$", "name", ",", "ConnectionInterface", "$", "connection", ")", "{", "$", "manager", "=", "new", "ConnectionManagerSingle", "(", ")", ";", "$", "manager", "->", "setConnection", "(", "$", "connection", ")", ";", "...
Shortcut to define a single connection for a datasource. @param string $name The datasource name @param \Propel\Runtime\Connection\ConnectionInterface A database connection
[ "Shortcut", "to", "define", "a", "single", "connection", "for", "a", "datasource", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php#L381-L386
propelorm/Propel2
src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php
StandardServiceContainer.getProfiler
public function getProfiler() { if (null === $this->profiler) { $class = $this->profilerClass; $profiler = new $class(); if (!empty($this->profilerConfiguration)) { $profiler->setConfiguration($this->profilerConfiguration); } $this-...
php
public function getProfiler() { if (null === $this->profiler) { $class = $this->profilerClass; $profiler = new $class(); if (!empty($this->profilerConfiguration)) { $profiler->setConfiguration($this->profilerConfiguration); } $this-...
[ "public", "function", "getProfiler", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "profiler", ")", "{", "$", "class", "=", "$", "this", "->", "profilerClass", ";", "$", "profiler", "=", "new", "$", "class", "(", ")", ";", "if", "(", ...
Get a profiler instance. If no profiler is set, create one using profilerClass and profilerConfiguration. @return \Propel\Runtime\Util\Profiler
[ "Get", "a", "profiler", "instance", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php#L431-L443
propelorm/Propel2
src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php
StandardServiceContainer.getLogger
public function getLogger($name = 'defaultLogger') { if (!isset($this->loggers[$name])) { $this->loggers[$name] = $this->buildLogger($name); } return $this->loggers[$name]; }
php
public function getLogger($name = 'defaultLogger') { if (!isset($this->loggers[$name])) { $this->loggers[$name] = $this->buildLogger($name); } return $this->loggers[$name]; }
[ "public", "function", "getLogger", "(", "$", "name", "=", "'defaultLogger'", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "loggers", "[", "$", "name", "]", ")", ")", "{", "$", "this", "->", "loggers", "[", "$", "name", "]", "=", "$"...
Get a logger instance @return LoggerInterface
[ "Get", "a", "logger", "instance" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php#L450-L457
propelorm/Propel2
src/Propel/Generator/Model/Index.php
Index.getName
public function getName() { $this->doNaming(); if ($this->table && $database = $this->table->getDatabase()) { return substr($this->name, 0, $database->getMaxColumnNameLength()); } return $this->name; }
php
public function getName() { $this->doNaming(); if ($this->table && $database = $this->table->getDatabase()) { return substr($this->name, 0, $database->getMaxColumnNameLength()); } return $this->name; }
[ "public", "function", "getName", "(", ")", "{", "$", "this", "->", "doNaming", "(", ")", ";", "if", "(", "$", "this", "->", "table", "&&", "$", "database", "=", "$", "this", "->", "table", "->", "getDatabase", "(", ")", ")", "{", "return", "substr"...
Returns the index name. @return string
[ "Returns", "the", "index", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Index.php#L97-L106
propelorm/Propel2
src/Propel/Generator/Model/Index.php
Index.addColumn
public function addColumn($data) { if ($data instanceof Column) { $column = $data; $this->columns[] = $column->getName(); if ($column->getSize()) { $this->columnsSize[$column->getName()] = $column->getSize(); } $this->columnObjects[...
php
public function addColumn($data) { if ($data instanceof Column) { $column = $data; $this->columns[] = $column->getName(); if ($column->getSize()) { $this->columnsSize[$column->getName()] = $column->getSize(); } $this->columnObjects[...
[ "public", "function", "addColumn", "(", "$", "data", ")", "{", "if", "(", "$", "data", "instanceof", "Column", ")", "{", "$", "column", "=", "$", "data", ";", "$", "this", "->", "columns", "[", "]", "=", "$", "column", "->", "getName", "(", ")", ...
Adds a new column to the index. @param Column|array $data Column or attributes from XML.
[ "Adds", "a", "new", "column", "to", "the", "index", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Index.php#L181-L199
propelorm/Propel2
src/Propel/Generator/Model/Index.php
Index.getColumnSize
public function getColumnSize($name, $caseInsensitive = false) { if ($caseInsensitive) { foreach ($this->columnsSize as $forName => $size) { if (0 === strcasecmp($forName, $name)) { return $size; } } return null; ...
php
public function getColumnSize($name, $caseInsensitive = false) { if ($caseInsensitive) { foreach ($this->columnsSize as $forName => $size) { if (0 === strcasecmp($forName, $name)) { return $size; } } return null; ...
[ "public", "function", "getColumnSize", "(", "$", "name", ",", "$", "caseInsensitive", "=", "false", ")", "{", "if", "(", "$", "caseInsensitive", ")", "{", "foreach", "(", "$", "this", "->", "columnsSize", "as", "$", "forName", "=>", "$", "size", ")", "...
Returns the size for the specified column. @param string $name @param boolean $caseInsensitive @return integer
[ "Returns", "the", "size", "for", "the", "specified", "column", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Index.php#L242-L253
propelorm/Propel2
src/Propel/Generator/Model/Index.php
Index.hasColumnAtPosition
public function hasColumnAtPosition($pos, $name, $size = null, $caseInsensitive = false) { if (!isset($this->columns[$pos])) { return false; } if ($caseInsensitive) { $test = 0 === strcasecmp($this->columns[$pos], $name); } else { $test = $this->c...
php
public function hasColumnAtPosition($pos, $name, $size = null, $caseInsensitive = false) { if (!isset($this->columns[$pos])) { return false; } if ($caseInsensitive) { $test = 0 === strcasecmp($this->columns[$pos], $name); } else { $test = $this->c...
[ "public", "function", "hasColumnAtPosition", "(", "$", "pos", ",", "$", "name", ",", "$", "size", "=", "null", ",", "$", "caseInsensitive", "=", "false", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "columns", "[", "$", "pos", "]", ")...
Returns whether or not this index has a given column at a given position. @param integer $pos Position in the column list @param string $name Column name @param integer $size Optional size check @param boolean $caseInsensitive Whether or not the comparison is case insensitive (fa...
[ "Returns", "whether", "or", "not", "this", "index", "has", "a", "given", "column", "at", "a", "given", "position", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Index.php#L274-L295
propelorm/Propel2
src/Propel/Runtime/Formatter/ArrayFormatter.php
ArrayFormatter.&
public function &getStructuredArrayFromRow($row) { $col = 0; // hydrate main object or take it from registry $mainObjectIsNew = false; $tableMap = $this->tableMap; $mainKey = $tableMap::getPrimaryKeyHashFromRow($row, 0, $this->getDataFetcher()->getIndexType()); // we...
php
public function &getStructuredArrayFromRow($row) { $col = 0; // hydrate main object or take it from registry $mainObjectIsNew = false; $tableMap = $this->tableMap; $mainKey = $tableMap::getPrimaryKeyHashFromRow($row, 0, $this->getDataFetcher()->getIndexType()); // we...
[ "public", "function", "&", "getStructuredArrayFromRow", "(", "$", "row", ")", "{", "$", "col", "=", "0", ";", "// hydrate main object or take it from registry", "$", "mainObjectIsNew", "=", "false", ";", "$", "tableMap", "=", "$", "this", "->", "tableMap", ";", ...
Hydrates a series of objects from a result row The first object to hydrate is the model of the Criteria The following objects (the ones added by way of ModelCriteria::with()) are linked to the first one @param array $row associative array indexed by column number, as returned by DataFetcher::fetch() @return Array
[ "Hydrates", "a", "series", "of", "objects", "from", "a", "result", "row", "The", "first", "object", "to", "hydrate", "is", "the", "model", "of", "the", "Criteria", "The", "following", "objects", "(", "the", "ones", "added", "by", "way", "of", "ModelCriteri...
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Formatter/ArrayFormatter.php#L124-L211
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.getMethodVisibility
private function getMethodVisibility($attribute, $parentAttribute) { $database = $this->getDatabase(); $visibility = $this->getAttribute( $attribute, $this->parentTable->getAttribute( $parentAttribute, $database->getAttribute( ...
php
private function getMethodVisibility($attribute, $parentAttribute) { $database = $this->getDatabase(); $visibility = $this->getAttribute( $attribute, $this->parentTable->getAttribute( $parentAttribute, $database->getAttribute( ...
[ "private", "function", "getMethodVisibility", "(", "$", "attribute", ",", "$", "parentAttribute", ")", "{", "$", "database", "=", "$", "this", "->", "getDatabase", "(", ")", ";", "$", "visibility", "=", "$", "this", "->", "getAttribute", "(", "$", "attribu...
Returns the generated methods visibility by looking for the attribute value in the column, parent table or parent database. Finally, it defaults to the default visibility (public). @param string $attribute Local column attribute @param string $parentAttribute Parent (table or database) attribute @return string
[ "Returns", "the", "generated", "methods", "visibility", "by", "looking", "for", "the", "attribute", "value", "in", "the", "column", "parent", "table", "or", "parent", "database", ".", "Finally", "it", "defaults", "to", "the", "default", "visibility", "(", "pub...
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L279-L295
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.setPhpName
public function setPhpName($phpName = null) { if (null === $phpName) { $this->phpName = self::generatePhpName($this->name, $this->phpNamingMethod, $this->namePrefix); } else { $this->phpName = $phpName; } }
php
public function setPhpName($phpName = null) { if (null === $phpName) { $this->phpName = self::generatePhpName($this->name, $this->phpNamingMethod, $this->namePrefix); } else { $this->phpName = $phpName; } }
[ "public", "function", "setPhpName", "(", "$", "phpName", "=", "null", ")", "{", "if", "(", "null", "===", "$", "phpName", ")", "{", "$", "this", "->", "phpName", "=", "self", "::", "generatePhpName", "(", "$", "this", "->", "name", ",", "$", "this", ...
Sets the name to use in PHP sources. It will generate a phpName from its name if no $phpName is passed. @param string $phpName
[ "Sets", "the", "name", "to", "use", "in", "PHP", "sources", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L460-L467
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.setPhpSingularName
public function setPhpSingularName($phpSingularName = null) { if (null === $phpSingularName) { $this->phpSingularName = self::generatePhpSingularName($this->getPhpName()); } else { $this->phpSingularName = $phpSingularName; } }
php
public function setPhpSingularName($phpSingularName = null) { if (null === $phpSingularName) { $this->phpSingularName = self::generatePhpSingularName($this->getPhpName()); } else { $this->phpSingularName = $phpSingularName; } }
[ "public", "function", "setPhpSingularName", "(", "$", "phpSingularName", "=", "null", ")", "{", "if", "(", "null", "===", "$", "phpSingularName", ")", "{", "$", "this", "->", "phpSingularName", "=", "self", "::", "generatePhpSingularName", "(", "$", "this", ...
Sets the singular forn of the name to use in PHP sources. It will generate a phpName from its name if no $phpSingularName is passed. @param string $phpSingularName
[ "Sets", "the", "singular", "forn", "of", "the", "name", "to", "use", "in", "PHP", "sources", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L478-L485
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.setAccessorVisibility
public function setAccessorVisibility($visibility) { $visibility = strtolower($visibility); if (!in_array($visibility, self::$validVisibilities)) { $visibility = self::DEFAULT_VISIBILITY; } $this->accessorVisibility = $visibility; }
php
public function setAccessorVisibility($visibility) { $visibility = strtolower($visibility); if (!in_array($visibility, self::$validVisibilities)) { $visibility = self::DEFAULT_VISIBILITY; } $this->accessorVisibility = $visibility; }
[ "public", "function", "setAccessorVisibility", "(", "$", "visibility", ")", "{", "$", "visibility", "=", "strtolower", "(", "$", "visibility", ")", ";", "if", "(", "!", "in_array", "(", "$", "visibility", ",", "self", "::", "$", "validVisibilities", ")", "...
Sets the accessor methods visibility for this column / attribute. @param string $visibility
[ "Sets", "the", "accessor", "methods", "visibility", "for", "this", "column", "/", "attribute", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L518-L526
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.setMutatorVisibility
public function setMutatorVisibility($visibility) { $visibility = strtolower($visibility); if (!in_array($visibility, self::$validVisibilities)) { $visibility = self::DEFAULT_VISIBILITY; } $this->mutatorVisibility = $visibility; }
php
public function setMutatorVisibility($visibility) { $visibility = strtolower($visibility); if (!in_array($visibility, self::$validVisibilities)) { $visibility = self::DEFAULT_VISIBILITY; } $this->mutatorVisibility = $visibility; }
[ "public", "function", "setMutatorVisibility", "(", "$", "visibility", ")", "{", "$", "visibility", "=", "strtolower", "(", "$", "visibility", ")", ";", "if", "(", "!", "in_array", "(", "$", "visibility", ",", "self", "::", "$", "validVisibilities", ")", ")...
Sets the mutator methods visibility for this column / attribute. @param string $visibility
[ "Sets", "the", "mutator", "methods", "visibility", "for", "this", "column", "/", "attribute", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L547-L555
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.getConstantName
public function getConstantName() { // was it overridden in schema.xml ? if ($this->getTableMapName()) { return self::CONSTANT_PREFIX.strtoupper($this->getTableMapName()); } return self::CONSTANT_PREFIX.strtoupper($this->getName()); }
php
public function getConstantName() { // was it overridden in schema.xml ? if ($this->getTableMapName()) { return self::CONSTANT_PREFIX.strtoupper($this->getTableMapName()); } return self::CONSTANT_PREFIX.strtoupper($this->getName()); }
[ "public", "function", "getConstantName", "(", ")", "{", "// was it overridden in schema.xml ?", "if", "(", "$", "this", "->", "getTableMapName", "(", ")", ")", "{", "return", "self", "::", "CONSTANT_PREFIX", ".", "strtoupper", "(", "$", "this", "->", "getTableMa...
Returns the column constant name. @return string
[ "Returns", "the", "column", "constant", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L575-L583
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.addInheritance
public function addInheritance($inheritance) { if ($inheritance instanceof Inheritance) { $inheritance->setColumn($this); if (null === $this->inheritanceList) { $this->inheritanceList = []; $this->isEnumeratedClasses = true; } $...
php
public function addInheritance($inheritance) { if ($inheritance instanceof Inheritance) { $inheritance->setColumn($this); if (null === $this->inheritanceList) { $this->inheritanceList = []; $this->isEnumeratedClasses = true; } $...
[ "public", "function", "addInheritance", "(", "$", "inheritance", ")", "{", "if", "(", "$", "inheritance", "instanceof", "Inheritance", ")", "{", "$", "inheritance", "->", "setColumn", "(", "$", "this", ")", ";", "if", "(", "null", "===", "$", "this", "->...
Adds a new inheritance definition to the inheritance list and sets the parent column of the inheritance to the current column. @param Inheritance|array $inheritance @return Inheritance
[ "Adds", "a", "new", "inheritance", "definition", "to", "the", "inheritance", "list", "and", "sets", "the", "parent", "column", "of", "the", "inheritance", "to", "the", "current", "column", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L674-L691
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.hasReferrer
public function hasReferrer(ForeignKey $fk) { return $this->hasReferrers() && in_array($fk, $this->referrers, true); }
php
public function hasReferrer(ForeignKey $fk) { return $this->hasReferrers() && in_array($fk, $this->referrers, true); }
[ "public", "function", "hasReferrer", "(", "ForeignKey", "$", "fk", ")", "{", "return", "$", "this", "->", "hasReferrers", "(", ")", "&&", "in_array", "(", "$", "fk", ",", "$", "this", "->", "referrers", ",", "true", ")", ";", "}" ]
Returns whether or not this column has a specific referrer for a specific foreign key object. @param ForeignKey $fk @return boolean
[ "Returns", "whether", "or", "not", "this", "column", "has", "a", "specific", "referrer", "for", "a", "specific", "foreign", "key", "object", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L1016-L1019
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.setType
public function setType($mappingType) { $this->getDomain()->setType($mappingType); if (in_array($mappingType, [ PropelTypes::VARBINARY, PropelTypes::LONGVARBINARY, PropelTypes::BLOB ])) { $this->needsTransactionInPostgres = true; } }
php
public function setType($mappingType) { $this->getDomain()->setType($mappingType); if (in_array($mappingType, [ PropelTypes::VARBINARY, PropelTypes::LONGVARBINARY, PropelTypes::BLOB ])) { $this->needsTransactionInPostgres = true; } }
[ "public", "function", "setType", "(", "$", "mappingType", ")", "{", "$", "this", "->", "getDomain", "(", ")", "->", "setType", "(", "$", "mappingType", ")", ";", "if", "(", "in_array", "(", "$", "mappingType", ",", "[", "PropelTypes", "::", "VARBINARY", ...
Sets the mapping column type. @param string $mappingType @see Domain::setType()
[ "Sets", "the", "mapping", "column", "type", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L1058-L1065
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.setValueSet
public function setValueSet($valueSet) { if (is_string($valueSet)) { $valueSet = explode(',', $valueSet); $valueSet = array_map('trim', $valueSet); } $this->valueSet = $valueSet; }
php
public function setValueSet($valueSet) { if (is_string($valueSet)) { $valueSet = explode(',', $valueSet); $valueSet = array_map('trim', $valueSet); } $this->valueSet = $valueSet; }
[ "public", "function", "setValueSet", "(", "$", "valueSet", ")", "{", "if", "(", "is_string", "(", "$", "valueSet", ")", ")", "{", "$", "valueSet", "=", "explode", "(", "','", ",", "$", "valueSet", ")", ";", "$", "valueSet", "=", "array_map", "(", "'t...
Sets the list of possible values for an ENUM or SET column. @param array|string
[ "Sets", "the", "list", "of", "possible", "values", "for", "an", "ENUM", "or", "SET", "column", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L1196-L1204
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.getDefaultValueString
public function getDefaultValueString() { $defaultValue = $this->getDefaultValue(); if (null === $defaultValue) { return 'null'; } if ($this->isNumericType()) { return (float) $defaultValue->getValue(); } if ($this->isTextType() || $this->ge...
php
public function getDefaultValueString() { $defaultValue = $this->getDefaultValue(); if (null === $defaultValue) { return 'null'; } if ($this->isNumericType()) { return (float) $defaultValue->getValue(); } if ($this->isTextType() || $this->ge...
[ "public", "function", "getDefaultValueString", "(", ")", "{", "$", "defaultValue", "=", "$", "this", "->", "getDefaultValue", "(", ")", ";", "if", "(", "null", "===", "$", "defaultValue", ")", "{", "return", "'null'", ";", "}", "if", "(", "$", "this", ...
Returns a string that will give this column a default value in PHP. @return string
[ "Returns", "a", "string", "that", "will", "give", "this", "column", "a", "default", "value", "in", "PHP", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L1283-L1304
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.setDefaultValue
public function setDefaultValue($defaultValue) { if (!$defaultValue instanceof ColumnDefaultValue) { $defaultValue = new ColumnDefaultValue($defaultValue, ColumnDefaultValue::TYPE_VALUE); } $this->domain->setDefaultValue($defaultValue); }
php
public function setDefaultValue($defaultValue) { if (!$defaultValue instanceof ColumnDefaultValue) { $defaultValue = new ColumnDefaultValue($defaultValue, ColumnDefaultValue::TYPE_VALUE); } $this->domain->setDefaultValue($defaultValue); }
[ "public", "function", "setDefaultValue", "(", "$", "defaultValue", ")", "{", "if", "(", "!", "$", "defaultValue", "instanceof", "ColumnDefaultValue", ")", "{", "$", "defaultValue", "=", "new", "ColumnDefaultValue", "(", "$", "defaultValue", ",", "ColumnDefaultValu...
Sets a string that will give this column a default value. @param ColumnDefaultValue|mixed $defaultValue The column's default value @return Column
[ "Sets", "a", "string", "that", "will", "give", "this", "column", "a", "default", "value", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L1312-L1319
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.getAutoIncrementString
public function getAutoIncrementString() { if ($this->isAutoIncrement() && IdMethod::NATIVE === $this->parentTable->getIdMethod()) { return $this->getPlatform()->getAutoIncrement(); } if ($this->isAutoIncrement()) { throw new EngineException(sprintf( ...
php
public function getAutoIncrementString() { if ($this->isAutoIncrement() && IdMethod::NATIVE === $this->parentTable->getIdMethod()) { return $this->getPlatform()->getAutoIncrement(); } if ($this->isAutoIncrement()) { throw new EngineException(sprintf( ...
[ "public", "function", "getAutoIncrementString", "(", ")", "{", "if", "(", "$", "this", "->", "isAutoIncrement", "(", ")", "&&", "IdMethod", "::", "NATIVE", "===", "$", "this", "->", "parentTable", "->", "getIdMethod", "(", ")", ")", "{", "return", "$", "...
Returns the auto-increment string. @return string
[ "Returns", "the", "auto", "-", "increment", "string", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L1373-L1388
propelorm/Propel2
src/Propel/Generator/Model/Column.php
Column.hasPlatform
public function hasPlatform() { if (null === $this->parentTable) { return false; } return $this->parentTable->getPlatform() ? true : false; }
php
public function hasPlatform() { if (null === $this->parentTable) { return false; } return $this->parentTable->getPlatform() ? true : false; }
[ "public", "function", "hasPlatform", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "parentTable", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "parentTable", "->", "getPlatform", "(", ")", "?", "true", ":", "false",...
Returns whether or not this column has a platform adapter. @return boolean
[ "Returns", "whether", "or", "not", "this", "column", "has", "a", "platform", "adapter", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Column.php#L1464-L1471
propelorm/Propel2
src/Propel/Runtime/Connection/ConnectionManagerSingle.php
ConnectionManagerSingle.getWriteConnection
public function getWriteConnection(AdapterInterface $adapter = null) { if (null === $this->connection) { $this->connection = ConnectionFactory::create($this->configuration, $adapter); $this->connection->setName($this->getName()); } return $this->connection; }
php
public function getWriteConnection(AdapterInterface $adapter = null) { if (null === $this->connection) { $this->connection = ConnectionFactory::create($this->configuration, $adapter); $this->connection->setName($this->getName()); } return $this->connection; }
[ "public", "function", "getWriteConnection", "(", "AdapterInterface", "$", "adapter", "=", "null", ")", "{", "if", "(", "null", "===", "$", "this", "->", "connection", ")", "{", "$", "this", "->", "connection", "=", "ConnectionFactory", "::", "create", "(", ...
@param \Propel\Runtime\Adapter\AdapterInterface $adapter @return \Propel\Runtime\Connection\ConnectionInterface
[ "@param", "\\", "Propel", "\\", "Runtime", "\\", "Adapter", "\\", "AdapterInterface", "$adapter" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Connection/ConnectionManagerSingle.php#L73-L81
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criterion/LikeModelCriterion.php
LikeModelCriterion.appendPsForUniqueClauseTo
protected function appendPsForUniqueClauseTo(&$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) { if ($this->getAdapter() ...
php
protected function appendPsForUniqueClauseTo(&$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) { if ($this->getAdapter() ...
[ "protected", "function", "appendPsForUniqueClauseTo", "(", "&", "$", "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 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 will be appended
[ "Appends", "a", "Prepared", "Statement", "representation", "of", "the", "ModelCriterion", "onto", "the", "buffer", "Handles", "case", "insensitivity", "for", "VARCHAR", "columns" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criterion/LikeModelCriterion.php#L55-L67
propelorm/Propel2
src/Propel/Runtime/DataFetcher/ArrayDataFetcher.php
ArrayDataFetcher.fetch
public function fetch() { $row = $this->valid() ? $this->current() : null; $this->next(); return $row; }
php
public function fetch() { $row = $this->valid() ? $this->current() : null; $this->next(); return $row; }
[ "public", "function", "fetch", "(", ")", "{", "$", "row", "=", "$", "this", "->", "valid", "(", ")", "?", "$", "this", "->", "current", "(", ")", ":", "null", ";", "$", "this", "->", "next", "(", ")", ";", "return", "$", "row", ";", "}" ]
{@inheritDoc}
[ "{" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/DataFetcher/ArrayDataFetcher.php#L40-L46
propelorm/Propel2
src/Propel/Runtime/Connection/PdoConnection.php
PdoConnection.setAttribute
public function setAttribute($attribute, $value) { if (is_string($attribute) && false === strpos($attribute, '::')) { $attribute = '\PDO::' . $attribute; if (!defined($attribute)) { throw new InvalidArgumentException(sprintf('Invalid PDO option/attribute name specifie...
php
public function setAttribute($attribute, $value) { if (is_string($attribute) && false === strpos($attribute, '::')) { $attribute = '\PDO::' . $attribute; if (!defined($attribute)) { throw new InvalidArgumentException(sprintf('Invalid PDO option/attribute name specifie...
[ "public", "function", "setAttribute", "(", "$", "attribute", ",", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "attribute", ")", "&&", "false", "===", "strpos", "(", "$", "attribute", ",", "'::'", ")", ")", "{", "$", "attribute", "=", "'...
Sets a connection attribute. This is overridden here to allow names corresponding to PDO constant names. @param integer $attribute The attribute to set (e.g. 'PDO::ATTR_CASE', or more simply 'ATTR_CASE'). @param mixed $value The attribute value. @return bool @throws InvalidArgumentException
[ "Sets", "a", "connection", "attribute", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Connection/PdoConnection.php#L75-L86
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criterion/BasicModelCriterion.php
BasicModelCriterion.appendPsForUniqueClauseTo
protected function appendPsForUniqueClauseTo(&$sb, array &$params) { if (null !== $this->value) { if (false === strpos($this->clause, '?')) { throw new InvalidClauseException('A clause must contain a question mark in order to be bound to a value'); } $para...
php
protected function appendPsForUniqueClauseTo(&$sb, array &$params) { if (null !== $this->value) { if (false === strpos($this->clause, '?')) { throw new InvalidClauseException('A clause must contain a question mark in order to be bound to a value'); } $para...
[ "protected", "function", "appendPsForUniqueClauseTo", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "value", ")", "{", "if", "(", "false", "===", "strpos", "(", "$", "this", "->", "claus...
Appends a Prepared Statement representation of the ModelCriterion onto the buffer @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" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criterion/BasicModelCriterion.php#L27-L42
propelorm/Propel2
src/Propel/Runtime/Map/DatabaseMap.php
DatabaseMap.addTable
public function addTable($tableName) { $this->tables[$tableName] = new TableMap($tableName, $this); return $this->tables[$tableName]; }
php
public function addTable($tableName) { $this->tables[$tableName] = new TableMap($tableName, $this); return $this->tables[$tableName]; }
[ "public", "function", "addTable", "(", "$", "tableName", ")", "{", "$", "this", "->", "tables", "[", "$", "tableName", "]", "=", "new", "TableMap", "(", "$", "tableName", ",", "$", "this", ")", ";", "return", "$", "this", "->", "tables", "[", "$", ...
Add a new table to the database by name. @param string $tableName The name of the table. @return \Propel\Runtime\Map\TableMap The newly created TableMap.
[ "Add", "a", "new", "table", "to", "the", "database", "by", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Map/DatabaseMap.php#L79-L84
propelorm/Propel2
src/Propel/Runtime/Map/DatabaseMap.php
DatabaseMap.addTableObject
public function addTableObject(TableMap $table) { $table->setDatabaseMap($this); $this->tables[$table->getName()] = $table; $phpName = $table->getClassName(); if ('\\' !== $phpName[0]) { $phpName = '\\' . $phpName; } $this->tablesByPhpName[$phpName] = $tab...
php
public function addTableObject(TableMap $table) { $table->setDatabaseMap($this); $this->tables[$table->getName()] = $table; $phpName = $table->getClassName(); if ('\\' !== $phpName[0]) { $phpName = '\\' . $phpName; } $this->tablesByPhpName[$phpName] = $tab...
[ "public", "function", "addTableObject", "(", "TableMap", "$", "table", ")", "{", "$", "table", "->", "setDatabaseMap", "(", "$", "this", ")", ";", "$", "this", "->", "tables", "[", "$", "table", "->", "getName", "(", ")", "]", "=", "$", "table", ";",...
Add a new table object to the database. @param \Propel\Runtime\Map\TableMap $table The table to add
[ "Add", "a", "new", "table", "object", "to", "the", "database", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Map/DatabaseMap.php#L91-L100
propelorm/Propel2
src/Propel/Runtime/Map/DatabaseMap.php
DatabaseMap.hasTable
public function hasTable($name) { if (strpos($name, '.') > 0) { $name = substr($name, 0, strpos($name, '.')); } return isset($this->tables[$name]); }
php
public function hasTable($name) { if (strpos($name, '.') > 0) { $name = substr($name, 0, strpos($name, '.')); } return isset($this->tables[$name]); }
[ "public", "function", "hasTable", "(", "$", "name", ")", "{", "if", "(", "strpos", "(", "$", "name", ",", "'.'", ")", ">", "0", ")", "{", "$", "name", "=", "substr", "(", "$", "name", ",", "0", ",", "strpos", "(", "$", "name", ",", "'.'", ")"...
Does this database contain this specific table? @param string $name The String representation of the table. @return boolean True if the database contains the table.
[ "Does", "this", "database", "contain", "this", "specific", "table?" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Map/DatabaseMap.php#L126-L133
propelorm/Propel2
src/Propel/Runtime/Map/DatabaseMap.php
DatabaseMap.getTable
public function getTable($name) { if (!isset($this->tables[$name])) { throw new TableNotFoundException(sprintf('Cannot fetch TableMap for undefined table: %s.', $name)); } return $this->tables[$name]; }
php
public function getTable($name) { if (!isset($this->tables[$name])) { throw new TableNotFoundException(sprintf('Cannot fetch TableMap for undefined table: %s.', $name)); } return $this->tables[$name]; }
[ "public", "function", "getTable", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "tables", "[", "$", "name", "]", ")", ")", "{", "throw", "new", "TableNotFoundException", "(", "sprintf", "(", "'Cannot fetch TableMap for undefi...
Get a TableMap for the table by name. @param string $name Name of the table. @return \Propel\Runtime\Map\TableMap A TableMap @throws \Propel\Runtime\Map\Exception\TableNotFoundException If the table is undefined
[ "Get", "a", "TableMap", "for", "the", "table", "by", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Map/DatabaseMap.php#L142-L149
propelorm/Propel2
src/Propel/Runtime/Map/DatabaseMap.php
DatabaseMap.getColumn
public function getColumn($qualifiedColumnName) { list($tableName, $columnName) = explode('.', $qualifiedColumnName); return $this->getTable($tableName)->getColumn($columnName, false); }
php
public function getColumn($qualifiedColumnName) { list($tableName, $columnName) = explode('.', $qualifiedColumnName); return $this->getTable($tableName)->getColumn($columnName, false); }
[ "public", "function", "getColumn", "(", "$", "qualifiedColumnName", ")", "{", "list", "(", "$", "tableName", ",", "$", "columnName", ")", "=", "explode", "(", "'.'", ",", "$", "qualifiedColumnName", ")", ";", "return", "$", "this", "->", "getTable", "(", ...
Get a ColumnMap for the column by name. Name must be fully qualified, e.g. book.AUTHOR_ID @param string $qualifiedColumnName Name of the column. @return \Propel\Runtime\Map\ColumnMap A TableMap @throws TableNotFoundException If the table is undefined, or if the table is undefined
[ "Get", "a", "ColumnMap", "for", "the", "column", "by", "name", ".", "Name", "must", "be", "fully", "qualified", "e", ".", "g", ".", "book", ".", "AUTHOR_ID" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Map/DatabaseMap.php#L169-L174
propelorm/Propel2
src/Propel/Runtime/Map/DatabaseMap.php
DatabaseMap.getTableByPhpName
public function getTableByPhpName($phpName) { if ('\\' !== $phpName[0]) { $phpName = '\\' . $phpName; } if (isset($this->tablesByPhpName[$phpName])) { return $this->tablesByPhpName[$phpName]; } if (class_exists($tmClass = $phpName . 'TableMap')) { ...
php
public function getTableByPhpName($phpName) { if ('\\' !== $phpName[0]) { $phpName = '\\' . $phpName; } if (isset($this->tablesByPhpName[$phpName])) { return $this->tablesByPhpName[$phpName]; } if (class_exists($tmClass = $phpName . 'TableMap')) { ...
[ "public", "function", "getTableByPhpName", "(", "$", "phpName", ")", "{", "if", "(", "'\\\\'", "!==", "$", "phpName", "[", "0", "]", ")", "{", "$", "phpName", "=", "'\\\\'", ".", "$", "phpName", ";", "}", "if", "(", "isset", "(", "$", "this", "->",...
@param string $phpName @return TableMap
[ "@param", "string", "$phpName" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Map/DatabaseMap.php#L181-L210
propelorm/Propel2
src/Propel/Runtime/Adapter/MSSQL/MssqlPropelPDO.php
MssqlPropelPDO.beginTransaction
public function beginTransaction() { $return = true; $opcount = $this->getNestedTransactionCount(); if ($opcount === 0) { $return = self::exec('BEGIN TRANSACTION'); if ($this->useDebug) { $this->log('Begin transaction', null, __METHOD__); }...
php
public function beginTransaction() { $return = true; $opcount = $this->getNestedTransactionCount(); if ($opcount === 0) { $return = self::exec('BEGIN TRANSACTION'); if ($this->useDebug) { $this->log('Begin transaction', null, __METHOD__); }...
[ "public", "function", "beginTransaction", "(", ")", "{", "$", "return", "=", "true", ";", "$", "opcount", "=", "$", "this", "->", "getNestedTransactionCount", "(", ")", ";", "if", "(", "$", "opcount", "===", "0", ")", "{", "$", "return", "=", "self", ...
Begin a transaction. It is necessary to override the abstract PDO transaction functions here, as the PDO driver for MSSQL does not support transactions. @return integer
[ "Begin", "a", "transaction", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Adapter/MSSQL/MssqlPropelPDO.php#L31-L45
propelorm/Propel2
src/Propel/Runtime/Adapter/MSSQL/MssqlPropelPDO.php
MssqlPropelPDO.forceRollBack
public function forceRollBack() { $return = true; $opcount = $this->getNestedTransactionCount(); if ($opcount > 0) { // If we're in a transaction, always roll it back // regardless of nesting level. $return = self::exec('ROLLBACK TRANSACTION'); ...
php
public function forceRollBack() { $return = true; $opcount = $this->getNestedTransactionCount(); if ($opcount > 0) { // If we're in a transaction, always roll it back // regardless of nesting level. $return = self::exec('ROLLBACK TRANSACTION'); ...
[ "public", "function", "forceRollBack", "(", ")", "{", "$", "return", "=", "true", ";", "$", "opcount", "=", "$", "this", "->", "getNestedTransactionCount", "(", ")", ";", "if", "(", "$", "opcount", ">", "0", ")", "{", "// If we're in a transaction, always ro...
Rollback the whole transaction, even if this is a nested rollback and reset the nested transaction count to 0. It is necessary to override the abstract PDO transaction functions here, as the PDO driver for MSSQL does not support transactions. @return integer
[ "Rollback", "the", "whole", "transaction", "even", "if", "this", "is", "a", "nested", "rollback", "and", "reset", "the", "nested", "transaction", "count", "to", "0", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Adapter/MSSQL/MssqlPropelPDO.php#L113-L132
propelorm/Propel2
src/Propel/Generator/Platform/OraclePlatform.php
OraclePlatform.getAddIndexDDL
public function getAddIndexDDL(Index $index) { // don't create index form primary key if ($this->getPrimaryKeyName($index->getTable()) == $this->quoteIdentifier($index->getName())) { return ''; } $pattern = " CREATE %sINDEX %s ON %s (%s)%s; "; return sprintf($pa...
php
public function getAddIndexDDL(Index $index) { // don't create index form primary key if ($this->getPrimaryKeyName($index->getTable()) == $this->quoteIdentifier($index->getName())) { return ''; } $pattern = " CREATE %sINDEX %s ON %s (%s)%s; "; return sprintf($pa...
[ "public", "function", "getAddIndexDDL", "(", "Index", "$", "index", ")", "{", "// don't create index form primary key", "if", "(", "$", "this", "->", "getPrimaryKeyName", "(", "$", "index", "->", "getTable", "(", ")", ")", "==", "$", "this", "->", "quoteIdenti...
Builds the DDL SQL to add an Index. @param Index $index @return string
[ "Builds", "the", "DDL", "SQL", "to", "add", "an", "Index", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/OraclePlatform.php#L335-L353
propelorm/Propel2
src/Propel/Common/Config/Loader/IniFileLoader.php
IniFileLoader.load
public function load($file, $type = null) { $ini = parse_ini_file($this->getPath($file), true, INI_SCANNER_RAW); if (false === $ini) { throw new InvalidArgumentException("The configuration file '$file' has invalid content."); } $ini = $this->parse($ini); //Parse for nes...
php
public function load($file, $type = null) { $ini = parse_ini_file($this->getPath($file), true, INI_SCANNER_RAW); if (false === $ini) { throw new InvalidArgumentException("The configuration file '$file' has invalid content."); } $ini = $this->parse($ini); //Parse for nes...
[ "public", "function", "load", "(", "$", "file", ",", "$", "type", "=", "null", ")", "{", "$", "ini", "=", "parse_ini_file", "(", "$", "this", "->", "getPath", "(", "$", "file", ")", ",", "true", ",", "INI_SCANNER_RAW", ")", ";", "if", "(", "false",...
Loads a resource, merge it with the default configuration array and resolve its parameters. @param mixed $file The resource @param string $type The resource type @return array The configuration array @return array @throws \InvalidArgumentException if configuration file not found @t...
[ "Loads", "a", "resource", "merge", "it", "with", "the", "default", "configuration", "array", "and", "resolve", "its", "parameters", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Common/Config/Loader/IniFileLoader.php#L60-L72
propelorm/Propel2
src/Propel/Common/Config/Loader/IniFileLoader.php
IniFileLoader.parse
private function parse(array $data) { $config = []; foreach ($data as $section => $value) { if (is_array($value)) { if (strpos($section, $this->nestSeparator) !== false) { $sections = explode($this->nestSeparator, $section); $confi...
php
private function parse(array $data) { $config = []; foreach ($data as $section => $value) { if (is_array($value)) { if (strpos($section, $this->nestSeparator) !== false) { $sections = explode($this->nestSeparator, $section); $confi...
[ "private", "function", "parse", "(", "array", "$", "data", ")", "{", "$", "config", "=", "[", "]", ";", "foreach", "(", "$", "data", "as", "$", "section", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "i...
Parse data from the configuration array, to transform nested sections into associative arrays and to fix int/float/bool typing @param array $data @return array
[ "Parse", "data", "from", "the", "configuration", "array", "to", "transform", "nested", "sections", "into", "associative", "arrays", "and", "to", "fix", "int", "/", "float", "/", "bool", "typing" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Common/Config/Loader/IniFileLoader.php#L80-L98
propelorm/Propel2
src/Propel/Common/Config/Loader/IniFileLoader.php
IniFileLoader.parseSection
private function parseSection(array $section) { $config = []; foreach ($section as $key => $value) { $this->parseKey($key, $value, $config); } return $config; }
php
private function parseSection(array $section) { $config = []; foreach ($section as $key => $value) { $this->parseKey($key, $value, $config); } return $config; }
[ "private", "function", "parseSection", "(", "array", "$", "section", ")", "{", "$", "config", "=", "[", "]", ";", "foreach", "(", "$", "section", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "this", "->", "parseKey", "(", "$", "key", ",", ...
Parse a section. @param array $section @return array
[ "Parse", "a", "section", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Common/Config/Loader/IniFileLoader.php#L127-L136
propelorm/Propel2
src/Propel/Common/Config/Loader/IniFileLoader.php
IniFileLoader.parseKey
private function parseKey($key, $value, array &$config) { if (strpos($key, $this->nestSeparator) !== false) { $pieces = explode($this->nestSeparator, $key, 2); if (!strlen($pieces[0]) || !strlen($pieces[1])) { throw new IniParseException(sprintf('Invalid key "%s"', $...
php
private function parseKey($key, $value, array &$config) { if (strpos($key, $this->nestSeparator) !== false) { $pieces = explode($this->nestSeparator, $key, 2); if (!strlen($pieces[0]) || !strlen($pieces[1])) { throw new IniParseException(sprintf('Invalid key "%s"', $...
[ "private", "function", "parseKey", "(", "$", "key", ",", "$", "value", ",", "array", "&", "$", "config", ")", "{", "if", "(", "strpos", "(", "$", "key", ",", "$", "this", "->", "nestSeparator", ")", "!==", "false", ")", "{", "$", "pieces", "=", "...
Process a key. @param string $key @param string $value @param array $config @throws \Propel\Common\Config\Exception\IniParseException
[ "Process", "a", "key", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Common/Config/Loader/IniFileLoader.php#L147-L176
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.dump
public function dump(Database $database) { $this->appendDatabaseNode($database, $this->document); return trim($this->document->saveXML()); }
php
public function dump(Database $database) { $this->appendDatabaseNode($database, $this->document); return trim($this->document->saveXML()); }
[ "public", "function", "dump", "(", "Database", "$", "database", ")", "{", "$", "this", "->", "appendDatabaseNode", "(", "$", "database", ",", "$", "this", "->", "document", ")", ";", "return", "trim", "(", "$", "this", "->", "document", "->", "saveXML", ...
Dumps a single Database model into an XML formatted version. @param Database $database The database model @return string The dumped XML formatted output
[ "Dumps", "a", "single", "Database", "model", "into", "an", "XML", "formatted", "version", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L62-L67
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.dumpSchema
public function dumpSchema(Schema $schema, $doFinalInitialization = true) { $rootNode = $this->document->createElement('app-data'); $this->document->appendChild($rootNode); foreach ($schema->getDatabases($doFinalInitialization) as $database) { $this->appendDatabaseNode($database,...
php
public function dumpSchema(Schema $schema, $doFinalInitialization = true) { $rootNode = $this->document->createElement('app-data'); $this->document->appendChild($rootNode); foreach ($schema->getDatabases($doFinalInitialization) as $database) { $this->appendDatabaseNode($database,...
[ "public", "function", "dumpSchema", "(", "Schema", "$", "schema", ",", "$", "doFinalInitialization", "=", "true", ")", "{", "$", "rootNode", "=", "$", "this", "->", "document", "->", "createElement", "(", "'app-data'", ")", ";", "$", "this", "->", "documen...
Dumps a single Schema model into an XML formatted version. @param Schema $schema The schema object @param boolean $doFinalInitialization Whether or not to validate the schema @return string
[ "Dumps", "a", "single", "Schema", "model", "into", "an", "XML", "formatted", "version", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L76-L85
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendDatabaseNode
private function appendDatabaseNode(Database $database, \DOMNode $parentNode) { $databaseNode = $parentNode->appendChild($this->document->createElement('database')); $databaseNode->setAttribute('name', $database->getName()); $databaseNode->setAttribute('defaultIdMethod', $database->getDefaul...
php
private function appendDatabaseNode(Database $database, \DOMNode $parentNode) { $databaseNode = $parentNode->appendChild($this->document->createElement('database')); $databaseNode->setAttribute('name', $database->getName()); $databaseNode->setAttribute('defaultIdMethod', $database->getDefaul...
[ "private", "function", "appendDatabaseNode", "(", "Database", "$", "database", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "databaseNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "createElement", "(", ...
Appends the generated <database> XML node to its parent node. @param Database $database The Database model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<database", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L93-L166
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendVendorInformationNode
private function appendVendorInformationNode(VendorInfo $vendorInfo, \DOMNode $parentNode) { $vendorNode = $parentNode->appendChild($this->document->createElement('vendor')); $vendorNode->setAttribute('type', $vendorInfo->getType()); foreach ($vendorInfo->getParameters() as $key => $value) ...
php
private function appendVendorInformationNode(VendorInfo $vendorInfo, \DOMNode $parentNode) { $vendorNode = $parentNode->appendChild($this->document->createElement('vendor')); $vendorNode->setAttribute('type', $vendorInfo->getType()); foreach ($vendorInfo->getParameters() as $key => $value) ...
[ "private", "function", "appendVendorInformationNode", "(", "VendorInfo", "$", "vendorInfo", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "vendorNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "createElemen...
Appends the generated <vendor> XML node to its parent node. @param VendorInfo $vendorInfo The VendorInfo model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<vendor", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L174-L185
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendTableNode
private function appendTableNode(Table $table, \DOMNode $parentNode) { $tableNode = $parentNode->appendChild($this->document->createElement('table')); $tableNode->setAttribute('name', $table->getCommonName()); $database = $table->getDatabase(); $schema = $table->getSchema(); ...
php
private function appendTableNode(Table $table, \DOMNode $parentNode) { $tableNode = $parentNode->appendChild($this->document->createElement('table')); $tableNode->setAttribute('name', $table->getCommonName()); $database = $table->getDatabase(); $schema = $table->getSchema(); ...
[ "private", "function", "appendTableNode", "(", "Table", "$", "table", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "tableNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "createElement", "(", "'table'",...
Appends the generated <table> XML node to its parent node. @param Table $table The Table model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<table", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L193-L316
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendBehaviorNode
private function appendBehaviorNode(Behavior $behavior, \DOMNode $parentNode) { $behaviorNode = $parentNode->appendChild($this->document->createElement('behavior')); $behaviorNode->setAttribute('name', $behavior->getName()); if ($behavior->allowMultiple()) { $behaviorNode->setAt...
php
private function appendBehaviorNode(Behavior $behavior, \DOMNode $parentNode) { $behaviorNode = $parentNode->appendChild($this->document->createElement('behavior')); $behaviorNode->setAttribute('name', $behavior->getName()); if ($behavior->allowMultiple()) { $behaviorNode->setAt...
[ "private", "function", "appendBehaviorNode", "(", "Behavior", "$", "behavior", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "behaviorNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "createElement", "(", ...
Appends the generated <behavior> XML node to its parent node. @param Behavior $behavior The Behavior model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<behavior", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L324-L338
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendColumnNode
private function appendColumnNode(Column $column, \DOMNode $parentNode) { $columnNode = $parentNode->appendChild($this->document->createElement('column')); $columnNode->setAttribute('name', $column->getName()); if ($phpName = $column->getPhpName()) { $columnNode->setAttribute('p...
php
private function appendColumnNode(Column $column, \DOMNode $parentNode) { $columnNode = $parentNode->appendChild($this->document->createElement('column')); $columnNode->setAttribute('name', $column->getName()); if ($phpName = $column->getPhpName()) { $columnNode->setAttribute('p...
[ "private", "function", "appendColumnNode", "(", "Column", "$", "column", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "columnNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "createElement", "(", "'colu...
Appends the generated <column> XML node to its parent node. @param Column $column The Column model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<column", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L346-L410
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendInheritanceNode
private function appendInheritanceNode(Inheritance $inheritance, \DOMNode $parentNode) { $inheritanceNode = $parentNode->appendChild($this->document->createElement('inheritance')); $inheritanceNode->setAttribute('key', $inheritance->getKey()); $inheritanceNode->setAttribute('class', $inherit...
php
private function appendInheritanceNode(Inheritance $inheritance, \DOMNode $parentNode) { $inheritanceNode = $parentNode->appendChild($this->document->createElement('inheritance')); $inheritanceNode->setAttribute('key', $inheritance->getKey()); $inheritanceNode->setAttribute('class', $inherit...
[ "private", "function", "appendInheritanceNode", "(", "Inheritance", "$", "inheritance", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "inheritanceNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "createEleme...
Appends the generated <inheritance> XML node to its parent node. @param Inheritance $inheritance The Inheritance model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<inheritance", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L418-L427
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendForeignKeyNode
private function appendForeignKeyNode(ForeignKey $foreignKey, \DOMNode $parentNode) { $foreignKeyNode = $parentNode->appendChild($this->document->createElement('foreign-key')); $foreignKeyNode->setAttribute('foreignTable', $foreignKey->getForeignTableCommonName()); if ($schema = $foreignKey...
php
private function appendForeignKeyNode(ForeignKey $foreignKey, \DOMNode $parentNode) { $foreignKeyNode = $parentNode->appendChild($this->document->createElement('foreign-key')); $foreignKeyNode->setAttribute('foreignTable', $foreignKey->getForeignTableCommonName()); if ($schema = $foreignKey...
[ "private", "function", "appendForeignKeyNode", "(", "ForeignKey", "$", "foreignKey", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "foreignKeyNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "createElement",...
Appends the generated <foreign-key> XML node to its parent node. @param ForeignKey $foreignKey The ForeignKey model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<foreign", "-", "key", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L435-L475
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendIdMethodParameterNode
private function appendIdMethodParameterNode(IdMethodParameter $parameter, \DOMNode $parentNode) { $idMethodParameterNode = $parentNode->appendChild($this->document->createElement('id-method-parameter')); if ($name = $parameter->getName()) { $idMethodParameterNode->setAttribute('name', $...
php
private function appendIdMethodParameterNode(IdMethodParameter $parameter, \DOMNode $parentNode) { $idMethodParameterNode = $parentNode->appendChild($this->document->createElement('id-method-parameter')); if ($name = $parameter->getName()) { $idMethodParameterNode->setAttribute('name', $...
[ "private", "function", "appendIdMethodParameterNode", "(", "IdMethodParameter", "$", "parameter", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "idMethodParameterNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->"...
Appends the generated <id-method-parameter> XML node to its parent node. @param IdMethodParameter $parameter The IdMethodParameter model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "the", "generated", "<id", "-", "method", "-", "parameter", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L483-L490
propelorm/Propel2
src/Propel/Generator/Schema/Dumper/XmlDumper.php
XmlDumper.appendGenericIndexNode
private function appendGenericIndexNode($nodeType, Index $index, \DOMNode $parentNode) { $indexNode = $parentNode->appendChild($this->document->createElement($nodeType)); $indexNode->setAttribute('name', $index->getName()); foreach ($index->getColumns() as $columnName) { $indexC...
php
private function appendGenericIndexNode($nodeType, Index $index, \DOMNode $parentNode) { $indexNode = $parentNode->appendChild($this->document->createElement($nodeType)); $indexNode->setAttribute('name', $index->getName()); foreach ($index->getColumns() as $columnName) { $indexC...
[ "private", "function", "appendGenericIndexNode", "(", "$", "nodeType", ",", "Index", "$", "index", ",", "\\", "DOMNode", "$", "parentNode", ")", "{", "$", "indexNode", "=", "$", "parentNode", "->", "appendChild", "(", "$", "this", "->", "document", "->", "...
Appends a generice <index> or <unique> XML node to its parent node. @param string $nodeType The node type (index or unique) @param Index $index The Index model instance @param \DOMNode $parentNode The parent DOMNode object
[ "Appends", "a", "generice", "<index", ">", "or", "<unique", ">", "XML", "node", "to", "its", "parent", "node", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Schema/Dumper/XmlDumper.php#L521-L538
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criterion/InModelCriterion.php
InModelCriterion.appendPsForUniqueClauseTo
protected function appendPsForUniqueClauseTo(&$sb, array &$params) { $bindParams = []; // the param names used in query building $index = count($params); $values = ($this->value instanceof \Traversable) ? iterator_to_array($this->value) : (array) $this->value; foreach ($values as $va...
php
protected function appendPsForUniqueClauseTo(&$sb, array &$params) { $bindParams = []; // the param names used in query building $index = count($params); $values = ($this->value instanceof \Traversable) ? iterator_to_array($this->value) : (array) $this->value; foreach ($values as $va...
[ "protected", "function", "appendPsForUniqueClauseTo", "(", "&", "$", "sb", ",", "array", "&", "$", "params", ")", "{", "$", "bindParams", "=", "[", "]", ";", "// the param names used in query building", "$", "index", "=", "count", "(", "$", "params", ")", ";...
Appends a Prepared Statement representation of the ModelCriterion onto the buffer @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" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criterion/InModelCriterion.php#L25-L45
propelorm/Propel2
src/Propel/Runtime/Adapter/AdapterFactory.php
AdapterFactory.create
public static function create($driver) { if (!$driver) { $adapterClass = '\Propel\Runtime\Adapter\NoneAdapter'; } elseif (false === strpos($driver, '\\')) { if (!class_exists($adapterClass = '\Propel\Runtime\Adapter\Pdo\\' . ucfirst($driver) . 'Adapter')) { $a...
php
public static function create($driver) { if (!$driver) { $adapterClass = '\Propel\Runtime\Adapter\NoneAdapter'; } elseif (false === strpos($driver, '\\')) { if (!class_exists($adapterClass = '\Propel\Runtime\Adapter\Pdo\\' . ucfirst($driver) . 'Adapter')) { $a...
[ "public", "static", "function", "create", "(", "$", "driver", ")", "{", "if", "(", "!", "$", "driver", ")", "{", "$", "adapterClass", "=", "'\\Propel\\Runtime\\Adapter\\NoneAdapter'", ";", "}", "elseif", "(", "false", "===", "strpos", "(", "$", "driver", "...
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 \Propel\Runtime\Exception\InvalidArgumentException If the adapter could not be instantiated. @retu...
[ "Creates", "a", "new", "instance", "of", "the", "database", "adapter", "associated", "with", "the", "specified", "Propel", "driver", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Adapter/AdapterFactory.php#L30-L45
propelorm/Propel2
src/Propel/Common/Util/SetColumnConverter.php
SetColumnConverter.convertToInt
public static function convertToInt($val, array $valueSet) { if ($val === null) { return 0; } if (!is_array($val)) { $val = [$val]; } $bitValueArr = array_pad([], count($valueSet), '0'); foreach ($val as $value) { if (!in_array($va...
php
public static function convertToInt($val, array $valueSet) { if ($val === null) { return 0; } if (!is_array($val)) { $val = [$val]; } $bitValueArr = array_pad([], count($valueSet), '0'); foreach ($val as $value) { if (!in_array($va...
[ "public", "static", "function", "convertToInt", "(", "$", "val", ",", "array", "$", "valueSet", ")", "{", "if", "(", "$", "val", "===", "null", ")", "{", "return", "0", ";", "}", "if", "(", "!", "is_array", "(", "$", "val", ")", ")", "{", "$", ...
Converts set column values to the corresponding integer. @param mixed $val @param array $valueSet @return int|null @throws SetColumnConverterException
[ "Converts", "set", "column", "values", "to", "the", "corresponding", "integer", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Common/Util/SetColumnConverter.php#L31-L49
propelorm/Propel2
src/Propel/Common/Util/SetColumnConverter.php
SetColumnConverter.convertIntToArray
public static function convertIntToArray($val, array $valueSet) { if ($val === null) { return []; } $bitValueArr = array_reverse(str_split(base_convert($val, 10, 2))); $valueArr = []; foreach ($bitValueArr as $bit => $bitValue) { if (!isse...
php
public static function convertIntToArray($val, array $valueSet) { if ($val === null) { return []; } $bitValueArr = array_reverse(str_split(base_convert($val, 10, 2))); $valueArr = []; foreach ($bitValueArr as $bit => $bitValue) { if (!isse...
[ "public", "static", "function", "convertIntToArray", "(", "$", "val", ",", "array", "$", "valueSet", ")", "{", "if", "(", "$", "val", "===", "null", ")", "{", "return", "[", "]", ";", "}", "$", "bitValueArr", "=", "array_reverse", "(", "str_split", "("...
Converts set column integer value to corresponding array. @param mixed $val @param array $valueSet @return array @throws SetColumnConverterException
[ "Converts", "set", "column", "integer", "value", "to", "corresponding", "array", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Common/Util/SetColumnConverter.php#L61-L78
propelorm/Propel2
src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php
PgsqlAdapter.getId
public function getId(ConnectionInterface $con, $name = null) { if (null === $name) { throw new InvalidArgumentException("Unable to fetch next sequence ID without sequence name."); } $dataFetcher = $con->query(sprintf('SELECT nextval(%s)', $con->quote($name))); return $d...
php
public function getId(ConnectionInterface $con, $name = null) { if (null === $name) { throw new InvalidArgumentException("Unable to fetch next sequence ID without sequence name."); } $dataFetcher = $con->query(sprintf('SELECT nextval(%s)', $con->quote($name))); return $d...
[ "public", "function", "getId", "(", "ConnectionInterface", "$", "con", ",", "$", "name", "=", "null", ")", "{", "if", "(", "null", "===", "$", "name", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Unable to fetch next sequence ID without sequence n...
Gets ID for specified sequence name. @param ConnectionInterface $con @param string $name @return integer
[ "Gets", "ID", "for", "specified", "sequence", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php#L94-L102
propelorm/Propel2
src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php
PgsqlAdapter.getGroupBy
public function getGroupBy(Criteria $criteria) { $groupBy = $criteria->getGroupByColumns(); if ($groupBy) { // check if all selected columns are groupBy'ed. $selected = $this->getPlainSelectedColumns($criteria); $asSelects = $criteria->getAsColumns(); ...
php
public function getGroupBy(Criteria $criteria) { $groupBy = $criteria->getGroupByColumns(); if ($groupBy) { // check if all selected columns are groupBy'ed. $selected = $this->getPlainSelectedColumns($criteria); $asSelects = $criteria->getAsColumns(); ...
[ "public", "function", "getGroupBy", "(", "Criteria", "$", "criteria", ")", "{", "$", "groupBy", "=", "$", "criteria", "->", "getGroupByColumns", "(", ")", ";", "if", "(", "$", "groupBy", ")", "{", "// check if all selected columns are groupBy'ed.", "$", "selecte...
@param Criteria $criteria @return string
[ "@param", "Criteria", "$criteria" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php#L145-L173
propelorm/Propel2
src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php
PgsqlAdapter.doExplainPlan
public function doExplainPlan(ConnectionInterface $con, $query) { if ($query instanceof Criteria) { $params = []; $dbMap = Propel::getServiceContainer()->getDatabaseMap($query->getDbName()); $sql = $query->createSelectSql($params); } else { $sql = $que...
php
public function doExplainPlan(ConnectionInterface $con, $query) { if ($query instanceof Criteria) { $params = []; $dbMap = Propel::getServiceContainer()->getDatabaseMap($query->getDbName()); $sql = $query->createSelectSql($params); } else { $sql = $que...
[ "public", "function", "doExplainPlan", "(", "ConnectionInterface", "$", "con", ",", "$", "query", ")", "{", "if", "(", "$", "query", "instanceof", "Criteria", ")", "{", "$", "params", "=", "[", "]", ";", "$", "dbMap", "=", "Propel", "::", "getServiceCont...
Do Explain Plan for query object or query string @param ConnectionInterface $con propel connection @param Criteria|string $query query the criteria or the query string @throws PropelException @return PDOStatement A PDO statement executed using the connection, ready to be fetched
[ "Do", "Explain", "Plan", "for", "query", "object", "or", "query", "string" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php#L232-L251
propelorm/Propel2
src/Propel/Common/Config/Loader/YamlFileLoader.php
YamlFileLoader.load
public function load($file, $type = null) { $path = $this->locator->locate($file); if (!is_readable($path)) { throw new InputOutputException("You don't have permissions to access configuration file $file."); } $content = Yaml::parse(file_get_contents($path)); /...
php
public function load($file, $type = null) { $path = $this->locator->locate($file); if (!is_readable($path)) { throw new InputOutputException("You don't have permissions to access configuration file $file."); } $content = Yaml::parse(file_get_contents($path)); /...
[ "public", "function", "load", "(", "$", "file", ",", "$", "type", "=", "null", ")", "{", "$", "path", "=", "$", "this", "->", "locator", "->", "locate", "(", "$", "file", ")", ";", "if", "(", "!", "is_readable", "(", "$", "path", ")", ")", "{",...
Loads a Yaml file. @param mixed $file The resource @param string $type The resource type @return array @throws \InvalidArgumentException if configuration file not found @throws \Symfony\Component\Yaml\Exception\ParseException if something goes wrong in parsing file @throws \Propel\Com...
[ "Loads", "a", "Yaml", "file", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Common/Config/Loader/YamlFileLoader.php#L36-L58
propelorm/Propel2
src/Propel/Generator/Builder/Om/ExtensionObjectBuilder.php
ExtensionObjectBuilder.addClassOpen
protected function addClassOpen(&$script) { $table = $this->getTable(); $tableName = $table->getName(); $tableDesc = $table->getDescription(); $baseClassName = $this->getClassNameFromBuilder($this->getObjectBuilder()); if ($this->getBuildProperty('generator.objectModel.addCl...
php
protected function addClassOpen(&$script) { $table = $this->getTable(); $tableName = $table->getName(); $tableDesc = $table->getDescription(); $baseClassName = $this->getClassNameFromBuilder($this->getObjectBuilder()); if ($this->getBuildProperty('generator.objectModel.addCl...
[ "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/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Om/ExtensionObjectBuilder.php#L37-L69
propelorm/Propel2
src/Propel/Generator/Model/Schema.php
Schema.getDatabase
public function getDatabase($name = null, $doFinalInitialization = true) { // this is temporary until we'll have a clean solution // for packaging datamodels/requiring schemas if ($doFinalInitialization) { $this->doFinalInitialization(); } if (null === $name) { ...
php
public function getDatabase($name = null, $doFinalInitialization = true) { // this is temporary until we'll have a clean solution // for packaging datamodels/requiring schemas if ($doFinalInitialization) { $this->doFinalInitialization(); } if (null === $name) { ...
[ "public", "function", "getDatabase", "(", "$", "name", "=", "null", ",", "$", "doFinalInitialization", "=", "true", ")", "{", "// this is temporary until we'll have a clean solution", "// for packaging datamodels/requiring schemas", "if", "(", "$", "doFinalInitialization", ...
Returns the database according to the specified name. @param string $name @param boolean $doFinalInitialization @return Database
[ "Returns", "the", "database", "according", "to", "the", "specified", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Schema.php#L165-L186
propelorm/Propel2
src/Propel/Generator/Model/Schema.php
Schema.hasDatabase
public function hasDatabase($name) { foreach ($this->databases as $database) { if ($database->getName() === $name) { return true; } } return false; }
php
public function hasDatabase($name) { foreach ($this->databases as $database) { if ($database->getName() === $name) { return true; } } return false; }
[ "public", "function", "hasDatabase", "(", "$", "name", ")", "{", "foreach", "(", "$", "this", "->", "databases", "as", "$", "database", ")", "{", "if", "(", "$", "database", "->", "getName", "(", ")", "===", "$", "name", ")", "{", "return", "true", ...
Returns whether or not a database with the specified name exists in this schema. @param string $name @return boolean
[ "Returns", "whether", "or", "not", "a", "database", "with", "the", "specified", "name", "exists", "in", "this", "schema", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Schema.php#L195-L204
propelorm/Propel2
src/Propel/Generator/Model/Schema.php
Schema.addDatabase
public function addDatabase($database) { if ($database instanceof Database) { $platform = null; $database->setParentSchema($this); if (null === $database->getPlatform()) { if ($config = $this->getGeneratorConfig()) { $platform = $config...
php
public function addDatabase($database) { if ($database instanceof Database) { $platform = null; $database->setParentSchema($this); if (null === $database->getPlatform()) { if ($config = $this->getGeneratorConfig()) { $platform = $config...
[ "public", "function", "addDatabase", "(", "$", "database", ")", "{", "if", "(", "$", "database", "instanceof", "Database", ")", "{", "$", "platform", "=", "null", ";", "$", "database", "->", "setParentSchema", "(", "$", "this", ")", ";", "if", "(", "nu...
Adds a database to the list and sets the Schema property to this Schema. The database can be specified as a Database object or a DOMNode object. @param Database|array $database @return Database
[ "Adds", "a", "database", "to", "the", "list", "and", "sets", "the", "Schema", "property", "to", "this", "Schema", ".", "The", "database", "can", "be", "specified", "as", "a", "Database", "object", "or", "a", "DOMNode", "object", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Schema.php#L214-L237
propelorm/Propel2
src/Propel/Generator/Model/Schema.php
Schema.doFinalInitialization
public function doFinalInitialization() { if (!$this->isInitialized) { foreach ($this->databases as $database) { $database->doFinalInitialization(); } $this->isInitialized = true; } }
php
public function doFinalInitialization() { if (!$this->isInitialized) { foreach ($this->databases as $database) { $database->doFinalInitialization(); } $this->isInitialized = true; } }
[ "public", "function", "doFinalInitialization", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isInitialized", ")", "{", "foreach", "(", "$", "this", "->", "databases", "as", "$", "database", ")", "{", "$", "database", "->", "doFinalInitialization", "("...
Finalizes the databases initialization.
[ "Finalizes", "the", "databases", "initialization", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Schema.php#L243-L251
propelorm/Propel2
src/Propel/Generator/Model/Schema.php
Schema.joinSchemas
public function joinSchemas(array $schemas) { foreach ($schemas as $schema) { foreach ($schema->getDatabases(false) as $addDb) { $addDbName = $addDb->getName(); if ($this->hasDatabase($addDbName)) { $db = $this->getDatabase($addDbName, false); ...
php
public function joinSchemas(array $schemas) { foreach ($schemas as $schema) { foreach ($schema->getDatabases(false) as $addDb) { $addDbName = $addDb->getName(); if ($this->hasDatabase($addDbName)) { $db = $this->getDatabase($addDbName, false); ...
[ "public", "function", "joinSchemas", "(", "array", "$", "schemas", ")", "{", "foreach", "(", "$", "schemas", "as", "$", "schema", ")", "{", "foreach", "(", "$", "schema", "->", "getDatabases", "(", "false", ")", "as", "$", "addDb", ")", "{", "$", "ad...
Merge other Schema objects together into this Schema object. @param Schema[] $schemas
[ "Merge", "other", "Schema", "objects", "together", "into", "this", "Schema", "object", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Schema.php#L258-L288
propelorm/Propel2
src/Propel/Generator/Model/Schema.php
Schema.countTables
public function countTables() { $nb = 0; foreach ($this->getDatabases() as $database) { $nb += $database->countTables(); } return $nb; }
php
public function countTables() { $nb = 0; foreach ($this->getDatabases() as $database) { $nb += $database->countTables(); } return $nb; }
[ "public", "function", "countTables", "(", ")", "{", "$", "nb", "=", "0", ";", "foreach", "(", "$", "this", "->", "getDatabases", "(", ")", "as", "$", "database", ")", "{", "$", "nb", "+=", "$", "database", "->", "countTables", "(", ")", ";", "}", ...
Returns the number of tables in all the databases of this Schema object. @return integer
[ "Returns", "the", "number", "of", "tables", "in", "all", "the", "databases", "of", "this", "Schema", "object", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Model/Schema.php#L295-L303
propelorm/Propel2
src/Propel/Generator/Platform/MysqlPlatform.php
MysqlPlatform.getPrimaryKeyDDL
public function getPrimaryKeyDDL(Table $table) { if ($table->hasPrimaryKey()) { $keys = $table->getPrimaryKey(); //MySQL throws an 'Incorrect table definition; there can be only one auto column and it must be defined as a key' //if the primary key consists of multiple c...
php
public function getPrimaryKeyDDL(Table $table) { if ($table->hasPrimaryKey()) { $keys = $table->getPrimaryKey(); //MySQL throws an 'Incorrect table definition; there can be only one auto column and it must be defined as a key' //if the primary key consists of multiple c...
[ "public", "function", "getPrimaryKeyDDL", "(", "Table", "$", "table", ")", "{", "if", "(", "$", "table", "->", "hasPrimaryKey", "(", ")", ")", "{", "$", "keys", "=", "$", "table", "->", "getPrimaryKey", "(", ")", ";", "//MySQL throws an 'Incorrect table defi...
Returns the SQL for the primary key of a Table object @param Table $table @return string
[ "Returns", "the", "SQL", "for", "the", "primary", "key", "of", "a", "Table", "object" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/MysqlPlatform.php#L182-L202
propelorm/Propel2
src/Propel/Generator/Platform/MysqlPlatform.php
MysqlPlatform.getAddIndexDDL
public function getAddIndexDDL(Index $index) { $pattern = " CREATE %sINDEX %s ON %s (%s); "; return sprintf($pattern, $this->getIndexType($index), $this->quoteIdentifier($index->getName()), $this->quoteIdentifier($index->getTable()->getName()), $this-...
php
public function getAddIndexDDL(Index $index) { $pattern = " CREATE %sINDEX %s ON %s (%s); "; return sprintf($pattern, $this->getIndexType($index), $this->quoteIdentifier($index->getName()), $this->quoteIdentifier($index->getTable()->getName()), $this-...
[ "public", "function", "getAddIndexDDL", "(", "Index", "$", "index", ")", "{", "$", "pattern", "=", "\"\nCREATE %sINDEX %s ON %s (%s);\n\"", ";", "return", "sprintf", "(", "$", "pattern", ",", "$", "this", "->", "getIndexType", "(", "$", "index", ")", ",", "$...
Builds the DDL SQL to add an Index. @param Index $index @return string
[ "Builds", "the", "DDL", "SQL", "to", "add", "an", "Index", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/MysqlPlatform.php#L463-L475
propelorm/Propel2
src/Propel/Generator/Platform/MysqlPlatform.php
MysqlPlatform.getIndexDDL
public function getIndexDDL(Index $index) { return sprintf('%sINDEX %s (%s)', $this->getIndexType($index), $this->quoteIdentifier($index->getName()), $this->getIndexColumnListDDL($index) ); }
php
public function getIndexDDL(Index $index) { return sprintf('%sINDEX %s (%s)', $this->getIndexType($index), $this->quoteIdentifier($index->getName()), $this->getIndexColumnListDDL($index) ); }
[ "public", "function", "getIndexDDL", "(", "Index", "$", "index", ")", "{", "return", "sprintf", "(", "'%sINDEX %s (%s)'", ",", "$", "this", "->", "getIndexType", "(", "$", "index", ")", ",", "$", "this", "->", "quoteIdentifier", "(", "$", "index", "->", ...
Builds the DDL SQL for an Index object. @return string
[ "Builds", "the", "DDL", "SQL", "for", "an", "Index", "object", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/MysqlPlatform.php#L499-L506
propelorm/Propel2
src/Propel/Generator/Platform/MysqlPlatform.php
MysqlPlatform.getForeignKeyDDL
public function getForeignKeyDDL(ForeignKey $fk) { if ($this->supportsForeignKeys($fk->getTable())) { return parent::getForeignKeyDDL($fk); } return ''; }
php
public function getForeignKeyDDL(ForeignKey $fk) { if ($this->supportsForeignKeys($fk->getTable())) { return parent::getForeignKeyDDL($fk); } return ''; }
[ "public", "function", "getForeignKeyDDL", "(", "ForeignKey", "$", "fk", ")", "{", "if", "(", "$", "this", "->", "supportsForeignKeys", "(", "$", "fk", "->", "getTable", "(", ")", ")", ")", "{", "return", "parent", "::", "getForeignKeyDDL", "(", "$", "fk"...
Builds the DDL SQL for a ForeignKey object. @param ForeignKey $fk @return string
[ "Builds", "the", "DDL", "SQL", "for", "a", "ForeignKey", "object", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/MysqlPlatform.php#L545-L552
propelorm/Propel2
src/Propel/Generator/Platform/MysqlPlatform.php
MysqlPlatform.getRenameTableDDL
public function getRenameTableDDL($fromTableName, $toTableName) { $pattern = " RENAME TABLE %s TO %s; "; return sprintf($pattern, $this->quoteIdentifier($fromTableName), $this->quoteIdentifier($toTableName) ); }
php
public function getRenameTableDDL($fromTableName, $toTableName) { $pattern = " RENAME TABLE %s TO %s; "; return sprintf($pattern, $this->quoteIdentifier($fromTableName), $this->quoteIdentifier($toTableName) ); }
[ "public", "function", "getRenameTableDDL", "(", "$", "fromTableName", ",", "$", "toTableName", ")", "{", "$", "pattern", "=", "\"\nRENAME TABLE %s TO %s;\n\"", ";", "return", "sprintf", "(", "$", "pattern", ",", "$", "this", "->", "quoteIdentifier", "(", "$", ...
Builds the DDL SQL to rename a table @return string
[ "Builds", "the", "DDL", "SQL", "to", "rename", "a", "table" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/MysqlPlatform.php#L619-L629
propelorm/Propel2
src/Propel/Generator/Platform/MysqlPlatform.php
MysqlPlatform.getRemoveColumnDDL
public function getRemoveColumnDDL(Column $column) { $pattern = " ALTER TABLE %s DROP %s; "; return sprintf($pattern, $this->quoteIdentifier($column->getTable()->getName()), $this->quoteIdentifier($column->getName()) ); }
php
public function getRemoveColumnDDL(Column $column) { $pattern = " ALTER TABLE %s DROP %s; "; return sprintf($pattern, $this->quoteIdentifier($column->getTable()->getName()), $this->quoteIdentifier($column->getName()) ); }
[ "public", "function", "getRemoveColumnDDL", "(", "Column", "$", "column", ")", "{", "$", "pattern", "=", "\"\nALTER TABLE %s DROP %s;\n\"", ";", "return", "sprintf", "(", "$", "pattern", ",", "$", "this", "->", "quoteIdentifier", "(", "$", "column", "->", "get...
Builds the DDL SQL to remove a column @return string
[ "Builds", "the", "DDL", "SQL", "to", "remove", "a", "column" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/MysqlPlatform.php#L636-L646
propelorm/Propel2
src/Propel/Generator/Platform/MysqlPlatform.php
MysqlPlatform.getAddColumnsDDL
public function getAddColumnsDDL($columns) { $lines = ''; foreach ($columns as $column) { $lines .= $this->getAddColumnDDL($column); } return $lines; }
php
public function getAddColumnsDDL($columns) { $lines = ''; foreach ($columns as $column) { $lines .= $this->getAddColumnDDL($column); } return $lines; }
[ "public", "function", "getAddColumnsDDL", "(", "$", "columns", ")", "{", "$", "lines", "=", "''", ";", "foreach", "(", "$", "columns", "as", "$", "column", ")", "{", "$", "lines", ".=", "$", "this", "->", "getAddColumnDDL", "(", "$", "column", ")", "...
Builds the DDL SQL to add a list of columns @param Column[] $columns @return string
[ "Builds", "the", "DDL", "SQL", "to", "add", "a", "list", "of", "columns" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Platform/MysqlPlatform.php#L739-L747
propelorm/Propel2
src/Propel/Generator/Command/ModelBuildCommand.php
ModelBuildCommand.configure
protected function configure() { parent::configure(); $this ->addOption('mysql-engine', null, InputOption::VALUE_REQUIRED, 'MySQL engine (MyISAM, InnoDB, ...)') ->addOption('schema-dir', null, InputOption::VALUE_REQUIRED, 'The directory where the schema files are placed') ...
php
protected function configure() { parent::configure(); $this ->addOption('mysql-engine', null, InputOption::VALUE_REQUIRED, 'MySQL engine (MyISAM, InnoDB, ...)') ->addOption('schema-dir', null, InputOption::VALUE_REQUIRED, 'The directory where the schema files are placed') ...
[ "protected", "function", "configure", "(", ")", "{", "parent", "::", "configure", "(", ")", ";", "$", "this", "->", "addOption", "(", "'mysql-engine'", ",", "null", ",", "InputOption", "::", "VALUE_REQUIRED", ",", "'MySQL engine (MyISAM, InnoDB, ...)'", ")", "->...
{@inheritdoc}
[ "{" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Command/ModelBuildCommand.php#L27-L53
propelorm/Propel2
src/Propel/Generator/Command/ModelBuildCommand.php
ModelBuildCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $configOptions = []; $inputOptions = $input->getOptions(); foreach ($inputOptions as $key => $option) { if (null !== $option) { switch ($key) { case 'schema-dir': ...
php
protected function execute(InputInterface $input, OutputInterface $output) { $configOptions = []; $inputOptions = $input->getOptions(); foreach ($inputOptions as $key => $option) { if (null !== $option) { switch ($key) { case 'schema-dir': ...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "configOptions", "=", "[", "]", ";", "$", "inputOptions", "=", "$", "input", "->", "getOptions", "(", ")", ";", "foreach", "(", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Command/ModelBuildCommand.php#L58-L134
propelorm/Propel2
src/Propel/Runtime/Connection/ProfilerStatementWrapper.php
ProfilerStatementWrapper.bindParam
public function bindParam($pos, &$value, $type = \PDO::PARAM_STR, $length = 0, $driver_options = null) { $this->connection->getProfiler()->start(); return parent::bindParam($pos, $value, $type, $length, $driver_options); }
php
public function bindParam($pos, &$value, $type = \PDO::PARAM_STR, $length = 0, $driver_options = null) { $this->connection->getProfiler()->start(); return parent::bindParam($pos, $value, $type, $length, $driver_options); }
[ "public", "function", "bindParam", "(", "$", "pos", ",", "&", "$", "value", ",", "$", "type", "=", "\\", "PDO", "::", "PARAM_STR", ",", "$", "length", "=", "0", ",", "$", "driver_options", "=", "null", ")", "{", "$", "this", "->", "connection", "->...
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/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Connection/ProfilerStatementWrapper.php#L32-L37
propelorm/Propel2
src/Propel/Runtime/Connection/ProfilerStatementWrapper.php
ProfilerStatementWrapper.bindValue
public function bindValue($pos, $value, $type = \PDO::PARAM_STR) { $this->connection->getProfiler()->start(); return parent::bindValue($pos, $value, $type); }
php
public function bindValue($pos, $value, $type = \PDO::PARAM_STR) { $this->connection->getProfiler()->start(); return parent::bindValue($pos, $value, $type); }
[ "public", "function", "bindValue", "(", "$", "pos", ",", "$", "value", ",", "$", "type", "=", "\\", "PDO", "::", "PARAM_STR", ")", "{", "$", "this", "->", "connection", "->", "getProfiler", "(", ")", "->", "start", "(", ")", ";", "return", "parent", ...
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/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Connection/ProfilerStatementWrapper.php#L49-L54
propelorm/Propel2
src/Propel/Runtime/Connection/ProfilerStatementWrapper.php
ProfilerStatementWrapper.execute
public function execute($parameters = null) { $this->connection->getProfiler()->start(); return parent::execute($parameters); }
php
public function execute($parameters = null) { $this->connection->getProfiler()->start(); return parent::execute($parameters); }
[ "public", "function", "execute", "(", "$", "parameters", "=", "null", ")", "{", "$", "this", "->", "connection", "->", "getProfiler", "(", ")", "->", "start", "(", ")", ";", "return", "parent", "::", "execute", "(", "$", "parameters", ")", ";", "}" ]
Executes a prepared statement. Returns a boolean value indicating success. Overridden for query counting and logging. @param string $parameters @return boolean
[ "Executes", "a", "prepared", "statement", ".", "Returns", "a", "boolean", "value", "indicating", "success", ".", "Overridden", "for", "query", "counting", "and", "logging", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Connection/ProfilerStatementWrapper.php#L63-L68
propelorm/Propel2
src/Propel/Generator/Behavior/Sluggable/SluggableBehavior.php
SluggableBehavior.modifyTable
public function modifyTable() { $table = $this->getTable(); if (!$table->hasColumn($this->getParameter('slug_column'))) { $table->addColumn([ 'name' => $this->getParameter('slug_column'), 'type' => 'VARCHAR', 'size' => 255, ...
php
public function modifyTable() { $table = $this->getTable(); if (!$table->hasColumn($this->getParameter('slug_column'))) { $table->addColumn([ 'name' => $this->getParameter('slug_column'), 'type' => 'VARCHAR', 'size' => 255, ...
[ "public", "function", "modifyTable", "(", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "if", "(", "!", "$", "table", "->", "hasColumn", "(", "$", "this", "->", "getParameter", "(", "'slug_column'", ")", ")", ")", "{", ...
Adds the slug_column to the current table.
[ "Adds", "the", "slug_column", "to", "the", "current", "table", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Behavior/Sluggable/SluggableBehavior.php#L49-L65
propelorm/Propel2
src/Propel/Generator/Behavior/Sluggable/SluggableBehavior.php
SluggableBehavior.addUniqueConstraint
protected function addUniqueConstraint(Table $table) { $unique = new Unique($this->getColumnForParameter('slug_column')); $unique->setName($table->getCommonName() . '_slug'); $unique->addColumn($table->getColumn($this->getParameter('slug_column'))); if ($this->getParameter('scope_col...
php
protected function addUniqueConstraint(Table $table) { $unique = new Unique($this->getColumnForParameter('slug_column')); $unique->setName($table->getCommonName() . '_slug'); $unique->addColumn($table->getColumn($this->getParameter('slug_column'))); if ($this->getParameter('scope_col...
[ "protected", "function", "addUniqueConstraint", "(", "Table", "$", "table", ")", "{", "$", "unique", "=", "new", "Unique", "(", "$", "this", "->", "getColumnForParameter", "(", "'slug_column'", ")", ")", ";", "$", "unique", "->", "setName", "(", "$", "tabl...
Adds a unique constraint to the table to enforce uniqueness of the slug_column @param Table $table
[ "Adds", "a", "unique", "constraint", "to", "the", "table", "to", "enforce", "uniqueness", "of", "the", "slug_column" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Behavior/Sluggable/SluggableBehavior.php#L72-L81
propelorm/Propel2
src/Propel/Generator/Behavior/Sluggable/SluggableBehavior.php
SluggableBehavior.preSave
public function preSave($builder) { $const = $builder->getColumnConstant($this->getColumnForParameter('slug_column')); $script = " if (\$this->isColumnModified($const) && \$this->{$this->getColumnGetter()}()) { \$this->{$this->getColumnSetter()}(\$this->makeSlugUnique(\$this->{$this->getColumnGe...
php
public function preSave($builder) { $const = $builder->getColumnConstant($this->getColumnForParameter('slug_column')); $script = " if (\$this->isColumnModified($const) && \$this->{$this->getColumnGetter()}()) { \$this->{$this->getColumnSetter()}(\$this->makeSlugUnique(\$this->{$this->getColumnGe...
[ "public", "function", "preSave", "(", "$", "builder", ")", "{", "$", "const", "=", "$", "builder", "->", "getColumnConstant", "(", "$", "this", "->", "getColumnForParameter", "(", "'slug_column'", ")", ")", ";", "$", "script", "=", "\"\nif (\\$this->isColumnMo...
Add code in ObjectBuilder::preSave @return string The code to put at the hook
[ "Add", "code", "in", "ObjectBuilder", "::", "preSave" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Behavior/Sluggable/SluggableBehavior.php#L108-L127
propelorm/Propel2
src/Propel/Runtime/Util/PropelDateTime.php
PropelDateTime.createHighPrecision
public static function createHighPrecision($time = null) { $dateTime = \DateTime::createFromFormat('U.u', $time ?: self::getMicrotime()); $dateTime->setTimeZone(new \DateTimeZone(date_default_timezone_get())); return $dateTime; }
php
public static function createHighPrecision($time = null) { $dateTime = \DateTime::createFromFormat('U.u', $time ?: self::getMicrotime()); $dateTime->setTimeZone(new \DateTimeZone(date_default_timezone_get())); return $dateTime; }
[ "public", "static", "function", "createHighPrecision", "(", "$", "time", "=", "null", ")", "{", "$", "dateTime", "=", "\\", "DateTime", "::", "createFromFormat", "(", "'U.u'", ",", "$", "time", "?", ":", "self", "::", "getMicrotime", "(", ")", ")", ";", ...
Creates a new DateTime object with milliseconds resolution. Usually `new \Datetime()` does not contain milliseconds so you need a method like this. @param bool $time optional in seconds. floating point allowed. @return \DateTime
[ "Creates", "a", "new", "DateTime", "object", "with", "milliseconds", "resolution", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Util/PropelDateTime.php#L69-L76
propelorm/Propel2
src/Propel/Runtime/Util/PropelDateTime.php
PropelDateTime.newInstance
public static function newInstance($value, DateTimeZone $timeZone = null, $dateTimeClass = 'DateTime') { if ($value instanceof \DateTimeInterface) { return $value; } if (empty($value)) { // '' is seen as NULL for temporal objects // because DateTime('') ==...
php
public static function newInstance($value, DateTimeZone $timeZone = null, $dateTimeClass = 'DateTime') { if ($value instanceof \DateTimeInterface) { return $value; } if (empty($value)) { // '' is seen as NULL for temporal objects // because DateTime('') ==...
[ "public", "static", "function", "newInstance", "(", "$", "value", ",", "DateTimeZone", "$", "timeZone", "=", "null", ",", "$", "dateTimeClass", "=", "'DateTime'", ")", "{", "if", "(", "$", "value", "instanceof", "\\", "DateTimeInterface", ")", "{", "return",...
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/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Util/PropelDateTime.php#L102-L138
propelorm/Propel2
src/Propel/Runtime/Collection/CollectionIterator.php
CollectionIterator.getPrevious
public function getPrevious() { if ($this->isFirst()) { return null; } $this->seek($this->getPosition() - 1); return $this->current(); }
php
public function getPrevious() { if ($this->isFirst()) { return null; } $this->seek($this->getPosition() - 1); return $this->current(); }
[ "public", "function", "getPrevious", "(", ")", "{", "if", "(", "$", "this", "->", "isFirst", "(", ")", ")", "{", "return", "null", ";", "}", "$", "this", "->", "seek", "(", "$", "this", "->", "getPosition", "(", ")", "-", "1", ")", ";", "return",...
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/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Collection/CollectionIterator.php#L104-L113
propelorm/Propel2
src/Propel/Runtime/Collection/CollectionIterator.php
CollectionIterator.getLast
public function getLast() { if ($this->isEmpty()) { return null; } $this->seek(count($this->positions) - 1); return $this->current(); }
php
public function getLast() { if ($this->isEmpty()) { return null; } $this->seek(count($this->positions) - 1); return $this->current(); }
[ "public", "function", "getLast", "(", ")", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "$", "this", "->", "seek", "(", "count", "(", "$", "this", "->", "positions", ")", "-", "1", ")", ";", "ret...
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/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/Collection/CollectionIterator.php#L144-L153
propelorm/Propel2
src/Propel/Generator/Builder/Util/SchemaReader.php
SchemaReader.parseFile
public function parseFile($xmlFile) { // we don't want infinite recursion if ($this->isAlreadyParsed($xmlFile)) { return; } return $this->parseString(file_get_contents($xmlFile), $xmlFile); }
php
public function parseFile($xmlFile) { // we don't want infinite recursion if ($this->isAlreadyParsed($xmlFile)) { return; } return $this->parseString(file_get_contents($xmlFile), $xmlFile); }
[ "public", "function", "parseFile", "(", "$", "xmlFile", ")", "{", "// we don't want infinite recursion", "if", "(", "$", "this", "->", "isAlreadyParsed", "(", "$", "xmlFile", ")", ")", "{", "return", ";", "}", "return", "$", "this", "->", "parseString", "(",...
Parses a XML input file and returns a newly created and populated Schema structure. @param string $xmlFile The input file to parse. @return Schema populated by <code>xmlFile</code>.
[ "Parses", "a", "XML", "input", "file", "and", "returns", "a", "newly", "created", "and", "populated", "Schema", "structure", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Util/SchemaReader.php#L114-L122
propelorm/Propel2
src/Propel/Generator/Builder/Util/SchemaReader.php
SchemaReader.parseString
public function parseString($xmlString, $xmlFile = null) { // we don't want infinite recursion if ($this->isAlreadyParsed($xmlFile)) { return; } // store current schema file path $this->schemasTagsStack[$xmlFile] = []; $this->currentXmlFile = $xmlFile; ...
php
public function parseString($xmlString, $xmlFile = null) { // we don't want infinite recursion if ($this->isAlreadyParsed($xmlFile)) { return; } // store current schema file path $this->schemasTagsStack[$xmlFile] = []; $this->currentXmlFile = $xmlFile; ...
[ "public", "function", "parseString", "(", "$", "xmlString", ",", "$", "xmlFile", "=", "null", ")", "{", "// we don't want infinite recursion", "if", "(", "$", "this", "->", "isAlreadyParsed", "(", "$", "xmlFile", ")", ")", "{", "return", ";", "}", "// store ...
Parses a XML input string and returns a newly created and populated Schema structure. @param string $xmlString The input string to parse. @param string $xmlFile The input file name. @return Schema
[ "Parses", "a", "XML", "input", "string", "and", "returns", "a", "newly", "created", "and", "populated", "Schema", "structure", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Generator/Builder/Util/SchemaReader.php#L132-L157
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.clear
public function clear() { $this->map = []; $this->namedCriterions = []; $this->ignoreCase = false; $this->singleRecord = false; $this->selectModifiers = []; $this->selectColumns = []; $this->orderByColumns = []; $this->groupByColumns = []; $thi...
php
public function clear() { $this->map = []; $this->namedCriterions = []; $this->ignoreCase = false; $this->singleRecord = false; $this->selectModifiers = []; $this->selectColumns = []; $this->orderByColumns = []; $this->groupByColumns = []; $thi...
[ "public", "function", "clear", "(", ")", "{", "$", "this", "->", "map", "=", "[", "]", ";", "$", "this", "->", "namedCriterions", "=", "[", "]", ";", "$", "this", "->", "ignoreCase", "=", "false", ";", "$", "this", "->", "singleRecord", "=", "false...
Brings this criteria back to its initial state, so that it can be reused as if it was new. Except if the criteria has grown in capacity, it is left at the current capacity. @return void
[ "Brings", "this", "criteria", "back", "to", "its", "initial", "state", "so", "that", "it", "can", "be", "reused", "as", "if", "it", "was", "new", ".", "Except", "if", "the", "criteria", "has", "grown", "in", "capacity", "it", "is", "left", "at", "the",...
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L304-L325
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.getTableNameAndAlias
public function getTableNameAndAlias($tableAliasOrName) { if (isset($this->aliases[$tableAliasOrName])) { return [$this->aliases[$tableAliasOrName], $tableAliasOrName]; } return [$tableAliasOrName, null]; }
php
public function getTableNameAndAlias($tableAliasOrName) { if (isset($this->aliases[$tableAliasOrName])) { return [$this->aliases[$tableAliasOrName], $tableAliasOrName]; } return [$tableAliasOrName, null]; }
[ "public", "function", "getTableNameAndAlias", "(", "$", "tableAliasOrName", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "aliases", "[", "$", "tableAliasOrName", "]", ")", ")", "{", "return", "[", "$", "this", "->", "aliases", "[", "$", "tableAl...
Returns the table name and alias based on a table alias or name. Use this method to get the details of a table name that comes in a clause, which can be either a table name or an alias name. @param string $tableAliasOrName @return array($tableName, $tableAlias)
[ "Returns", "the", "table", "name", "and", "alias", "based", "on", "a", "table", "alias", "or", "name", ".", "Use", "this", "method", "to", "get", "the", "details", "of", "a", "table", "name", "that", "comes", "in", "a", "clause", "which", "can", "be", ...
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L434-L441
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.keyContainsValue
public function keyContainsValue($column) { // must use array_key_exists() because the key could // exist but have a NULL value (that'd be valid). return isset($this->map[$column]) && null !== $this->map[$column]->getValue(); }
php
public function keyContainsValue($column) { // must use array_key_exists() because the key could // exist but have a NULL value (that'd be valid). return isset($this->map[$column]) && null !== $this->map[$column]->getValue(); }
[ "public", "function", "keyContainsValue", "(", "$", "column", ")", "{", "// must use array_key_exists() because the key could", "// exist but have a NULL value (that'd be valid).", "return", "isset", "(", "$", "this", "->", "map", "[", "$", "column", "]", ")", "&&", "nu...
Does this Criteria object contain the specified key and does it have a value set for the key @param string $column [table.]column @return boolean True if this Criteria object contain the specified key and a value for that key
[ "Does", "this", "Criteria", "object", "contain", "the", "specified", "key", "and", "does", "it", "have", "a", "value", "set", "for", "the", "key" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L476-L481
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.getLastCriterion
public function getLastCriterion() { $count = count($this->map); if ($count) { $map = array_values($this->map); return $map[$count - 1]; } return null; }
php
public function getLastCriterion() { $count = count($this->map); if ($count) { $map = array_values($this->map); return $map[$count - 1]; } return null; }
[ "public", "function", "getLastCriterion", "(", ")", "{", "$", "count", "=", "count", "(", "$", "this", "->", "map", ")", ";", "if", "(", "$", "count", ")", "{", "$", "map", "=", "array_values", "(", "$", "this", "->", "map", ")", ";", "return", "...
Method to return the latest Criterion in a table. @return AbstractCriterion A Criterion or null no Criterion is added.
[ "Method", "to", "return", "the", "latest", "Criterion", "in", "a", "table", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L538-L548
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.getNewCriterion
public function getNewCriterion($column, $value = null, $comparison = self::EQUAL) { if (is_int($comparison)) { // $comparison is a PDO::PARAM_* constant value // something like $c->add('foo like ?', '%bar%', PDO::PARAM_STR); return new RawCriterion($this, $column, $value...
php
public function getNewCriterion($column, $value = null, $comparison = self::EQUAL) { if (is_int($comparison)) { // $comparison is a PDO::PARAM_* constant value // something like $c->add('foo like ?', '%bar%', PDO::PARAM_STR); return new RawCriterion($this, $column, $value...
[ "public", "function", "getNewCriterion", "(", "$", "column", ",", "$", "value", "=", "null", ",", "$", "comparison", "=", "self", "::", "EQUAL", ")", "{", "if", "(", "is_int", "(", "$", "comparison", ")", ")", "{", "// $comparison is a PDO::PARAM_* constant ...
Method to return a Criterion that is not added automatically to this Criteria. This can be used to chain the Criterions to form a more complex where clause. @param string $column Full name of column (for example TABLE.COLUMN). @param mixed $value @param string $comparison Crit...
[ "Method", "to", "return", "a", "Criterion", "that", "is", "not", "added", "automatically", "to", "this", "Criteria", ".", "This", "can", "be", "used", "to", "chain", "the", "Criterions", "to", "form", "a", "more", "complex", "where", "clause", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L560-L594
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.getColumnName
public function getColumnName($name) { if (isset($this->map[$name])) { return $this->map[$name]->getColumn(); } return null; }
php
public function getColumnName($name) { if (isset($this->map[$name])) { return $this->map[$name]->getColumn(); } return null; }
[ "public", "function", "getColumnName", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "map", "[", "$", "name", "]", ")", ")", "{", "return", "$", "this", "->", "map", "[", "$", "name", "]", "->", "getColumn", "(", ")", ...
Method to return a String table name. @param string $name Name of the key. @return string The value of the object at key.
[ "Method", "to", "return", "a", "String", "table", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L602-L609
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.getComparison
public function getComparison($key) { if (isset($this->map[$key])) { return $this->map[$key]->getComparison(); } return null; }
php
public function getComparison($key) { if (isset($this->map[$key])) { return $this->map[$key]->getComparison(); } return null; }
[ "public", "function", "getComparison", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "map", "[", "$", "key", "]", ")", ")", "{", "return", "$", "this", "->", "map", "[", "$", "key", "]", "->", "getComparison", "(", ")", ...
Method to return a comparison String. @param string $key String name of the key. @return string A String with the value of the object at key.
[ "Method", "to", "return", "a", "comparison", "String", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L640-L647
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.setDbName
public function setDbName($dbName = null) { $this->dbName = (null === $dbName ? Propel::getServiceContainer()->getDefaultDatasource() : $dbName); }
php
public function setDbName($dbName = null) { $this->dbName = (null === $dbName ? Propel::getServiceContainer()->getDefaultDatasource() : $dbName); }
[ "public", "function", "setDbName", "(", "$", "dbName", "=", "null", ")", "{", "$", "this", "->", "dbName", "=", "(", "null", "===", "$", "dbName", "?", "Propel", "::", "getServiceContainer", "(", ")", "->", "getDefaultDatasource", "(", ")", ":", "$", "...
Set the DatabaseMap name. If <code>null</code> is supplied, uses value provided by <code>Configuration::getDefaultDatasource()</code>. @param string $dbName The Database (Map) name. @return void
[ "Set", "the", "DatabaseMap", "name", ".", "If", "<code", ">", "null<", "/", "code", ">", "is", "supplied", "uses", "value", "provided", "by", "<code", ">", "Configuration", "::", "getDefaultDatasource", "()", "<", "/", "code", ">", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L666-L669
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.getTableName
public function getTableName($name) { if (isset($this->map[$name])) { return $this->map[$name]->getTable(); } return null; }
php
public function getTableName($name) { if (isset($this->map[$name])) { return $this->map[$name]->getTable(); } return null; }
[ "public", "function", "getTableName", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "map", "[", "$", "name", "]", ")", ")", "{", "return", "$", "this", "->", "map", "[", "$", "name", "]", "->", "getTable", "(", ")", ";...
Method to return a String table name. @param string $name The name of the key. @return string The value of table for criterion at key.
[ "Method", "to", "return", "a", "String", "table", "name", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L705-L712
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.getValue
public function getValue($name) { if (isset($this->map[$name])) { return $this->map[$name]->getValue(); } return null; }
php
public function getValue($name) { if (isset($this->map[$name])) { return $this->map[$name]->getValue(); } return null; }
[ "public", "function", "getValue", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "map", "[", "$", "name", "]", ")", ")", "{", "return", "$", "this", "->", "map", "[", "$", "name", "]", "->", "getValue", "(", ")", ";", ...
Method to return the value that was added to Criteria. @param string $name A String with the name of the key. @return mixed The value of object at key.
[ "Method", "to", "return", "the", "value", "that", "was", "added", "to", "Criteria", "." ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L720-L727
propelorm/Propel2
src/Propel/Runtime/ActiveQuery/Criteria.php
Criteria.add
public function add($p1, $value = null, $comparison = null) { if ($p1 instanceof AbstractCriterion) { $this->map[$p1->getTable() . '.' . $p1->getColumn()] = $p1; } else { $this->map[$p1] = $this->getCriterionForCondition($p1, $value, $comparison); } return $t...
php
public function add($p1, $value = null, $comparison = null) { if ($p1 instanceof AbstractCriterion) { $this->map[$p1->getTable() . '.' . $p1->getColumn()] = $p1; } else { $this->map[$p1] = $this->getCriterionForCondition($p1, $value, $comparison); } return $t...
[ "public", "function", "add", "(", "$", "p1", ",", "$", "value", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "$", "p1", "instanceof", "AbstractCriterion", ")", "{", "$", "this", "->", "map", "[", "$", "p1", "->", "getTable...
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is replaced. If is used as follow: <code> $crit = new Criteria(); $crit->add($column, $value, Criteria::GREATER_THAN); </code> Any comparison can be used. The name of the table must be used implicitl...
[ "This", "method", "adds", "a", "new", "criterion", "to", "the", "list", "of", "criterias", ".", "If", "a", "criterion", "for", "the", "requested", "column", "already", "exists", "it", "is", "replaced", ".", "If", "is", "used", "as", "follow", ":" ]
train
https://github.com/propelorm/Propel2/blob/6c4996fc130c7555d82d9dca04396c6f3eeef306/src/Propel/Runtime/ActiveQuery/Criteria.php#L805-L814