diff --git a/core/lib/Thelia/Core/Controller/ControllerResolver.php b/core/lib/Thelia/Core/Controller/ControllerResolver.php index 530e6865b..c58961ebe 100644 --- a/core/lib/Thelia/Core/Controller/ControllerResolver.php +++ b/core/lib/Thelia/Core/Controller/ControllerResolver.php @@ -27,7 +27,6 @@ use Symfony\Component\HttpKernel\Controller\ControllerResolver as BaseController use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Psr\Log\LoggerInterface; -use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Thelia\Controller\Admin\BaseAdminController; use Thelia\Exception\AdminAccessDenied; @@ -97,7 +96,7 @@ class ControllerResolver extends BaseControllerResolver if ($controller instanceof BaseAdminController) { $securityContext = $this->container->get('thelia.securityContext'); $request = $this->container->get('request'); - if(false === $securityContext->hasAdminUser() && $request->attributes->get('not-logged') != 1) { + if (false === $securityContext->hasAdminUser() && $request->attributes->get('not-logged') != 1) { throw new AdminAccessDenied(); } } diff --git a/core/lib/Thelia/Exception/AdminAccessDenied.php b/core/lib/Thelia/Exception/AdminAccessDenied.php index 4fe79a428..a0f9fc14a 100644 --- a/core/lib/Thelia/Exception/AdminAccessDenied.php +++ b/core/lib/Thelia/Exception/AdminAccessDenied.php @@ -23,7 +23,6 @@ namespace Thelia\Exception; - /** * Class AdminAccessDenied * @package Thelia\Exception @@ -32,4 +31,4 @@ namespace Thelia\Exception; class AdminAccessDenied extends \RuntimeException { -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Model/Base/Accessory.php b/core/lib/Thelia/Model/Base/Accessory.php index 045aa32f6..ae63078cd 100644 --- a/core/lib/Thelia/Model/Base/Accessory.php +++ b/core/lib/Thelia/Model/Base/Accessory.php @@ -29,6 +29,7 @@ abstract class Accessory implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AccessoryTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -318,9 +319,9 @@ abstract class Accessory implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Accessory The current object, for fluid interface */ @@ -370,40 +371,44 @@ abstract class Accessory implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [accessory] column value. * - * @return int + * @return int */ public function getAccessory() { + return $this->accessory; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -411,8 +416,8 @@ abstract class Accessory implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -431,8 +436,8 @@ abstract class Accessory implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -450,8 +455,8 @@ abstract class Accessory implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Accessory The current object (for fluent API support) */ public function setId($v) { @@ -464,14 +469,15 @@ abstract class Accessory implements ActiveRecordInterface $this->modifiedColumns[AccessoryTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Accessory The current object (for fluent API support) */ public function setProductId($v) { @@ -488,14 +494,15 @@ abstract class Accessory implements ActiveRecordInterface $this->aProductRelatedByProductId = null; } + return $this; } // setProductId() /** * Set the value of [accessory] column. * - * @param int $v new value - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Accessory The current object (for fluent API support) */ public function setAccessory($v) { @@ -512,14 +519,15 @@ abstract class Accessory implements ActiveRecordInterface $this->aProductRelatedByAccessory = null; } + return $this; } // setAccessory() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Accessory The current object (for fluent API support) */ public function setPosition($v) { @@ -532,15 +540,16 @@ abstract class Accessory implements ActiveRecordInterface $this->modifiedColumns[AccessoryTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Accessory The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -552,15 +561,16 @@ abstract class Accessory implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Accessory The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -572,6 +582,7 @@ abstract class Accessory implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -678,10 +689,10 @@ abstract class Accessory implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -718,7 +729,7 @@ abstract class Accessory implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Accessory::setDeleted() @@ -761,8 +772,8 @@ abstract class Accessory implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -823,8 +834,8 @@ abstract class Accessory implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -874,7 +885,7 @@ abstract class Accessory implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -958,7 +969,7 @@ abstract class Accessory implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -974,12 +985,12 @@ abstract class Accessory implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -993,7 +1004,7 @@ abstract class Accessory implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1029,12 +1040,12 @@ abstract class Accessory implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1073,12 +1084,12 @@ abstract class Accessory implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1092,8 +1103,8 @@ abstract class Accessory implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1133,8 +1144,8 @@ abstract class Accessory implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1164,6 +1175,7 @@ abstract class Accessory implements ActiveRecordInterface if ($this->isColumnModified(AccessoryTableMap::POSITION)) $criteria->add(AccessoryTableMap::POSITION, $this->position); if ($this->isColumnModified(AccessoryTableMap::CREATED_AT)) $criteria->add(AccessoryTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AccessoryTableMap::UPDATED_AT)) $criteria->add(AccessoryTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1185,7 +1197,7 @@ abstract class Accessory implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1195,7 +1207,7 @@ abstract class Accessory implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1209,6 +1221,7 @@ abstract class Accessory implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1218,9 +1231,9 @@ abstract class Accessory implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Accessory (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Accessory (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1244,8 +1257,8 @@ abstract class Accessory implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Accessory Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Accessory Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1261,8 +1274,8 @@ abstract class Accessory implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\Accessory The current object (for fluent API support) * @throws PropelException */ public function setProductRelatedByProductId(ChildProduct $v = null) @@ -1281,6 +1294,7 @@ abstract class Accessory implements ActiveRecordInterface $v->addAccessoryRelatedByProductId($this); } + return $this; } @@ -1288,8 +1302,8 @@ abstract class Accessory implements ActiveRecordInterface /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProductRelatedByProductId(ConnectionInterface $con = null) @@ -1311,8 +1325,8 @@ abstract class Accessory implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\Accessory The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\Accessory The current object (for fluent API support) * @throws PropelException */ public function setProductRelatedByAccessory(ChildProduct $v = null) @@ -1331,6 +1345,7 @@ abstract class Accessory implements ActiveRecordInterface $v->addAccessoryRelatedByAccessory($this); } + return $this; } @@ -1338,8 +1353,8 @@ abstract class Accessory implements ActiveRecordInterface /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProductRelatedByAccessory(ConnectionInterface $con = null) @@ -1383,7 +1398,7 @@ abstract class Accessory implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1409,7 +1424,7 @@ abstract class Accessory implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAccessory The current object (for fluent API support) + * @return ChildAccessory The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/AccessoryQuery.php b/core/lib/Thelia/Model/Base/AccessoryQuery.php index f9fca8e05..a79b73fbd 100644 --- a/core/lib/Thelia/Model/Base/AccessoryQuery.php +++ b/core/lib/Thelia/Model/Base/AccessoryQuery.php @@ -71,9 +71,9 @@ abstract class AccessoryQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AccessoryQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Accessory', $modelAlias = null) { @@ -83,8 +83,8 @@ abstract class AccessoryQuery extends ModelCriteria /** * Returns a new ChildAccessoryQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAccessoryQuery */ @@ -113,7 +113,7 @@ abstract class AccessoryQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAccessory|array|mixed the result, formatted by the current formatter @@ -144,10 +144,10 @@ abstract class AccessoryQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAccessory A model object, or null if the key is not found + * @return ChildAccessory A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -174,8 +174,8 @@ abstract class AccessoryQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAccessory|array|mixed the result, formatted by the current formatter */ @@ -195,8 +195,8 @@ abstract class AccessoryQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -217,24 +217,26 @@ abstract class AccessoryQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAccessoryQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AccessoryTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAccessoryQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AccessoryTableMap::ID, $keys, Criteria::IN); } @@ -248,11 +250,11 @@ abstract class AccessoryQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -291,11 +293,11 @@ abstract class AccessoryQuery extends ModelCriteria * * @see filterByProductRelatedByProductId() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -334,11 +336,11 @@ abstract class AccessoryQuery extends ModelCriteria * * @see filterByProductRelatedByAccessory() * - * @param mixed $accessory The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $accessory The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -375,11 +377,11 @@ abstract class AccessoryQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -416,13 +418,13 @@ abstract class AccessoryQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -459,13 +461,13 @@ abstract class AccessoryQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -495,8 +497,8 @@ abstract class AccessoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -520,8 +522,8 @@ abstract class AccessoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductRelatedByProductId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -554,11 +556,11 @@ abstract class AccessoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductRelatedByProductIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -570,8 +572,8 @@ abstract class AccessoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -595,8 +597,8 @@ abstract class AccessoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductRelatedByAccessory relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -629,11 +631,11 @@ abstract class AccessoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductRelatedByAccessoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -645,7 +647,7 @@ abstract class AccessoryQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAccessory $accessory Object to remove from the list of results + * @param ChildAccessory $accessory Object to remove from the list of results * * @return ChildAccessoryQuery The current query, for fluid interface */ @@ -661,8 +663,8 @@ abstract class AccessoryQuery extends ModelCriteria /** * Deletes all rows from the accessory table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -693,13 +695,13 @@ abstract class AccessoryQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAccessory or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAccessory object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAccessory object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -719,6 +721,7 @@ abstract class AccessoryQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AccessoryTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -737,9 +740,9 @@ abstract class AccessoryQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAccessoryQuery The current query, for fluid interface + * @return ChildAccessoryQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -749,9 +752,9 @@ abstract class AccessoryQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAccessoryQuery The current query, for fluid interface + * @return ChildAccessoryQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -761,7 +764,7 @@ abstract class AccessoryQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAccessoryQuery The current query, for fluid interface + * @return ChildAccessoryQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -771,7 +774,7 @@ abstract class AccessoryQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAccessoryQuery The current query, for fluid interface + * @return ChildAccessoryQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -781,7 +784,7 @@ abstract class AccessoryQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAccessoryQuery The current query, for fluid interface + * @return ChildAccessoryQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -791,7 +794,7 @@ abstract class AccessoryQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAccessoryQuery The current query, for fluid interface + * @return ChildAccessoryQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Address.php b/core/lib/Thelia/Model/Base/Address.php index c1d95f0be..ed28b066a 100644 --- a/core/lib/Thelia/Model/Base/Address.php +++ b/core/lib/Thelia/Model/Base/Address.php @@ -36,6 +36,7 @@ abstract class Address implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AddressTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -440,9 +441,9 @@ abstract class Address implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Address The current object, for fluid interface */ @@ -492,160 +493,176 @@ abstract class Address implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [label] column value. * - * @return string + * @return string */ public function getLabel() { + return $this->label; } /** * Get the [customer_id] column value. * - * @return int + * @return int */ public function getCustomerId() { + return $this->customer_id; } /** * Get the [title_id] column value. * - * @return int + * @return int */ public function getTitleId() { + return $this->title_id; } /** * Get the [company] column value. * - * @return string + * @return string */ public function getCompany() { + return $this->company; } /** * Get the [firstname] column value. * - * @return string + * @return string */ public function getFirstname() { + return $this->firstname; } /** * Get the [lastname] column value. * - * @return string + * @return string */ public function getLastname() { + return $this->lastname; } /** * Get the [address1] column value. * - * @return string + * @return string */ public function getAddress1() { + return $this->address1; } /** * Get the [address2] column value. * - * @return string + * @return string */ public function getAddress2() { + return $this->address2; } /** * Get the [address3] column value. * - * @return string + * @return string */ public function getAddress3() { + return $this->address3; } /** * Get the [zipcode] column value. * - * @return string + * @return string */ public function getZipcode() { + return $this->zipcode; } /** * Get the [city] column value. * - * @return string + * @return string */ public function getCity() { + return $this->city; } /** * Get the [country_id] column value. * - * @return int + * @return int */ public function getCountryId() { + return $this->country_id; } /** * Get the [phone] column value. * - * @return string + * @return string */ public function getPhone() { + return $this->phone; } /** * Get the [cellphone] column value. * - * @return string + * @return string */ public function getCellphone() { + return $this->cellphone; } /** * Get the [is_default] column value. * - * @return int + * @return int */ public function getIsDefault() { + return $this->is_default; } @@ -653,8 +670,8 @@ abstract class Address implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -673,8 +690,8 @@ abstract class Address implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -692,8 +709,8 @@ abstract class Address implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setId($v) { @@ -706,14 +723,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [label] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setLabel($v) { @@ -726,14 +744,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::LABEL] = true; } + return $this; } // setLabel() /** * Set the value of [customer_id] column. * - * @param int $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setCustomerId($v) { @@ -750,14 +769,15 @@ abstract class Address implements ActiveRecordInterface $this->aCustomer = null; } + return $this; } // setCustomerId() /** * Set the value of [title_id] column. * - * @param int $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setTitleId($v) { @@ -774,14 +794,15 @@ abstract class Address implements ActiveRecordInterface $this->aCustomerTitle = null; } + return $this; } // setTitleId() /** * Set the value of [company] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setCompany($v) { @@ -794,14 +815,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::COMPANY] = true; } + return $this; } // setCompany() /** * Set the value of [firstname] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setFirstname($v) { @@ -814,14 +836,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::FIRSTNAME] = true; } + return $this; } // setFirstname() /** * Set the value of [lastname] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setLastname($v) { @@ -834,14 +857,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::LASTNAME] = true; } + return $this; } // setLastname() /** * Set the value of [address1] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setAddress1($v) { @@ -854,14 +878,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::ADDRESS1] = true; } + return $this; } // setAddress1() /** * Set the value of [address2] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setAddress2($v) { @@ -874,14 +899,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::ADDRESS2] = true; } + return $this; } // setAddress2() /** * Set the value of [address3] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setAddress3($v) { @@ -894,14 +920,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::ADDRESS3] = true; } + return $this; } // setAddress3() /** * Set the value of [zipcode] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setZipcode($v) { @@ -914,14 +941,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::ZIPCODE] = true; } + return $this; } // setZipcode() /** * Set the value of [city] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setCity($v) { @@ -934,14 +962,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::CITY] = true; } + return $this; } // setCity() /** * Set the value of [country_id] column. * - * @param int $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setCountryId($v) { @@ -958,14 +987,15 @@ abstract class Address implements ActiveRecordInterface $this->aCountry = null; } + return $this; } // setCountryId() /** * Set the value of [phone] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setPhone($v) { @@ -978,14 +1008,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::PHONE] = true; } + return $this; } // setPhone() /** * Set the value of [cellphone] column. * - * @param string $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setCellphone($v) { @@ -998,14 +1029,15 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::CELLPHONE] = true; } + return $this; } // setCellphone() /** * Set the value of [is_default] column. * - * @param int $v new value - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setIsDefault($v) { @@ -1018,15 +1050,16 @@ abstract class Address implements ActiveRecordInterface $this->modifiedColumns[AddressTableMap::IS_DEFAULT] = true; } + return $this; } // setIsDefault() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -1038,15 +1071,16 @@ abstract class Address implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -1058,6 +1092,7 @@ abstract class Address implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -1101,6 +1136,7 @@ abstract class Address implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AddressTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -1206,10 +1242,10 @@ abstract class Address implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1251,7 +1287,7 @@ abstract class Address implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Address::setDeleted() @@ -1294,8 +1330,8 @@ abstract class Address implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1356,8 +1392,8 @@ abstract class Address implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1450,7 +1486,7 @@ abstract class Address implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1606,7 +1642,7 @@ abstract class Address implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1622,12 +1658,12 @@ abstract class Address implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1641,7 +1677,7 @@ abstract class Address implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1713,12 +1749,12 @@ abstract class Address implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1778,12 +1814,12 @@ abstract class Address implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1797,8 +1833,8 @@ abstract class Address implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1874,8 +1910,8 @@ abstract class Address implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1929,6 +1965,7 @@ abstract class Address implements ActiveRecordInterface if ($this->isColumnModified(AddressTableMap::IS_DEFAULT)) $criteria->add(AddressTableMap::IS_DEFAULT, $this->is_default); if ($this->isColumnModified(AddressTableMap::CREATED_AT)) $criteria->add(AddressTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AddressTableMap::UPDATED_AT)) $criteria->add(AddressTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1950,7 +1987,7 @@ abstract class Address implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1960,7 +1997,7 @@ abstract class Address implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1974,6 +2011,7 @@ abstract class Address implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1983,9 +2021,9 @@ abstract class Address implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Address (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Address (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -2041,8 +2079,8 @@ abstract class Address implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Address Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Address Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -2058,8 +2096,8 @@ abstract class Address implements ActiveRecordInterface /** * Declares an association between this object and a ChildCustomer object. * - * @param ChildCustomer $v - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param ChildCustomer $v + * @return \Thelia\Model\Address The current object (for fluent API support) * @throws PropelException */ public function setCustomer(ChildCustomer $v = null) @@ -2078,14 +2116,16 @@ abstract class Address implements ActiveRecordInterface $v->addAddress($this); } + return $this; } + /** * Get the associated ChildCustomer object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCustomer The associated ChildCustomer object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomer The associated ChildCustomer object. * @throws PropelException */ public function getCustomer(ConnectionInterface $con = null) @@ -2107,8 +2147,8 @@ abstract class Address implements ActiveRecordInterface /** * Declares an association between this object and a ChildCustomerTitle object. * - * @param ChildCustomerTitle $v - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param ChildCustomerTitle $v + * @return \Thelia\Model\Address The current object (for fluent API support) * @throws PropelException */ public function setCustomerTitle(ChildCustomerTitle $v = null) @@ -2127,14 +2167,16 @@ abstract class Address implements ActiveRecordInterface $v->addAddress($this); } + return $this; } + /** * Get the associated ChildCustomerTitle object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCustomerTitle The associated ChildCustomerTitle object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomerTitle The associated ChildCustomerTitle object. * @throws PropelException */ public function getCustomerTitle(ConnectionInterface $con = null) @@ -2156,8 +2198,8 @@ abstract class Address implements ActiveRecordInterface /** * Declares an association between this object and a ChildCountry object. * - * @param ChildCountry $v - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param ChildCountry $v + * @return \Thelia\Model\Address The current object (for fluent API support) * @throws PropelException */ public function setCountry(ChildCountry $v = null) @@ -2176,14 +2218,16 @@ abstract class Address implements ActiveRecordInterface $v->addAddress($this); } + return $this; } + /** * Get the associated ChildCountry object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCountry The associated ChildCountry object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCountry The associated ChildCountry object. * @throws PropelException */ public function getCountry(ConnectionInterface $con = null) @@ -2202,12 +2246,13 @@ abstract class Address implements ActiveRecordInterface return $this->aCountry; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -2249,8 +2294,8 @@ abstract class Address implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2272,8 +2317,8 @@ abstract class Address implements ActiveRecordInterface * If this ChildAddress is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCart[] List of ChildCart objects * @throws PropelException */ @@ -2329,9 +2374,9 @@ abstract class Address implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $cartsRelatedByAddressDeliveryId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAddress The current object (for fluent API support) + * @param Collection $cartsRelatedByAddressDeliveryId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAddress The current object (for fluent API support) */ public function setCartsRelatedByAddressDeliveryId(Collection $cartsRelatedByAddressDeliveryId, ConnectionInterface $con = null) { @@ -2358,10 +2403,10 @@ abstract class Address implements ActiveRecordInterface /** * Returns the number of related Cart objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Cart objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Cart objects. * @throws PropelException */ public function countCartsRelatedByAddressDeliveryId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2393,8 +2438,8 @@ abstract class Address implements ActiveRecordInterface * Method called to associate a ChildCart object to this object * through the ChildCart foreign key attribute. * - * @param ChildCart $l ChildCart - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param ChildCart $l ChildCart + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function addCartRelatedByAddressDeliveryId(ChildCart $l) { @@ -2421,7 +2466,7 @@ abstract class Address implements ActiveRecordInterface /** * @param CartRelatedByAddressDeliveryId $cartRelatedByAddressDeliveryId The cartRelatedByAddressDeliveryId object to remove. - * @return ChildAddress The current object (for fluent API support) + * @return ChildAddress The current object (for fluent API support) */ public function removeCartRelatedByAddressDeliveryId($cartRelatedByAddressDeliveryId) { @@ -2450,9 +2495,9 @@ abstract class Address implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Address. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsRelatedByAddressDeliveryIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2475,9 +2520,9 @@ abstract class Address implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Address. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsRelatedByAddressDeliveryIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2517,8 +2562,8 @@ abstract class Address implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2540,8 +2585,8 @@ abstract class Address implements ActiveRecordInterface * If this ChildAddress is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCart[] List of ChildCart objects * @throws PropelException */ @@ -2597,9 +2642,9 @@ abstract class Address implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $cartsRelatedByAddressInvoiceId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAddress The current object (for fluent API support) + * @param Collection $cartsRelatedByAddressInvoiceId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAddress The current object (for fluent API support) */ public function setCartsRelatedByAddressInvoiceId(Collection $cartsRelatedByAddressInvoiceId, ConnectionInterface $con = null) { @@ -2626,10 +2671,10 @@ abstract class Address implements ActiveRecordInterface /** * Returns the number of related Cart objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Cart objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Cart objects. * @throws PropelException */ public function countCartsRelatedByAddressInvoiceId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2661,8 +2706,8 @@ abstract class Address implements ActiveRecordInterface * Method called to associate a ChildCart object to this object * through the ChildCart foreign key attribute. * - * @param ChildCart $l ChildCart - * @return \Thelia\Model\Address The current object (for fluent API support) + * @param ChildCart $l ChildCart + * @return \Thelia\Model\Address The current object (for fluent API support) */ public function addCartRelatedByAddressInvoiceId(ChildCart $l) { @@ -2689,7 +2734,7 @@ abstract class Address implements ActiveRecordInterface /** * @param CartRelatedByAddressInvoiceId $cartRelatedByAddressInvoiceId The cartRelatedByAddressInvoiceId object to remove. - * @return ChildAddress The current object (for fluent API support) + * @return ChildAddress The current object (for fluent API support) */ public function removeCartRelatedByAddressInvoiceId($cartRelatedByAddressInvoiceId) { @@ -2718,9 +2763,9 @@ abstract class Address implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Address. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsRelatedByAddressInvoiceIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2743,9 +2788,9 @@ abstract class Address implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Address. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsRelatedByAddressInvoiceIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2794,7 +2839,7 @@ abstract class Address implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2833,7 +2878,7 @@ abstract class Address implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAddress The current object (for fluent API support) + * @return ChildAddress The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/AddressQuery.php b/core/lib/Thelia/Model/Base/AddressQuery.php index 184c5bab8..40d15fd96 100644 --- a/core/lib/Thelia/Model/Base/AddressQuery.php +++ b/core/lib/Thelia/Model/Base/AddressQuery.php @@ -131,9 +131,9 @@ abstract class AddressQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AddressQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Address', $modelAlias = null) { @@ -143,8 +143,8 @@ abstract class AddressQuery extends ModelCriteria /** * Returns a new ChildAddressQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAddressQuery */ @@ -173,7 +173,7 @@ abstract class AddressQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAddress|array|mixed the result, formatted by the current formatter @@ -204,10 +204,10 @@ abstract class AddressQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAddress A model object, or null if the key is not found + * @return ChildAddress A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -234,8 +234,8 @@ abstract class AddressQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAddress|array|mixed the result, formatted by the current formatter */ @@ -255,8 +255,8 @@ abstract class AddressQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -277,24 +277,26 @@ abstract class AddressQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAddressQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AddressTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAddressQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AddressTableMap::ID, $keys, Criteria::IN); } @@ -308,11 +310,11 @@ abstract class AddressQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -348,9 +350,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByLabel('%fooValue%'); // WHERE label LIKE '%fooValue%' * * - * @param string $label The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $label The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -380,11 +382,11 @@ abstract class AddressQuery extends ModelCriteria * * @see filterByCustomer() * - * @param mixed $customerId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $customerId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -423,11 +425,11 @@ abstract class AddressQuery extends ModelCriteria * * @see filterByCustomerTitle() * - * @param mixed $titleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $titleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -463,9 +465,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByCompany('%fooValue%'); // WHERE company LIKE '%fooValue%' * * - * @param string $company The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $company The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -492,9 +494,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%' * * - * @param string $firstname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $firstname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -521,9 +523,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%' * * - * @param string $lastname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $lastname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -550,9 +552,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByAddress1('%fooValue%'); // WHERE address1 LIKE '%fooValue%' * * - * @param string $address1 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $address1 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -579,9 +581,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByAddress2('%fooValue%'); // WHERE address2 LIKE '%fooValue%' * * - * @param string $address2 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $address2 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -608,9 +610,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByAddress3('%fooValue%'); // WHERE address3 LIKE '%fooValue%' * * - * @param string $address3 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $address3 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -637,9 +639,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByZipcode('%fooValue%'); // WHERE zipcode LIKE '%fooValue%' * * - * @param string $zipcode The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $zipcode The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -666,9 +668,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByCity('%fooValue%'); // WHERE city LIKE '%fooValue%' * * - * @param string $city The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $city The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -698,11 +700,11 @@ abstract class AddressQuery extends ModelCriteria * * @see filterByCountry() * - * @param mixed $countryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $countryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -738,9 +740,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByPhone('%fooValue%'); // WHERE phone LIKE '%fooValue%' * * - * @param string $phone The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $phone The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -767,9 +769,9 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByCellphone('%fooValue%'); // WHERE cellphone LIKE '%fooValue%' * * - * @param string $cellphone The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $cellphone The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -797,11 +799,11 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByIsDefault(array('min' => 12)); // WHERE is_default > 12 * * - * @param mixed $isDefault The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $isDefault The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -838,13 +840,13 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -881,13 +883,13 @@ abstract class AddressQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -917,8 +919,8 @@ abstract class AddressQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Customer object * - * @param \Thelia\Model\Customer|ObjectCollection $customer The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Customer|ObjectCollection $customer The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -942,8 +944,8 @@ abstract class AddressQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Customer relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAddressQuery The current query, for fluid interface */ @@ -976,11 +978,11 @@ abstract class AddressQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query */ public function useCustomerQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -993,7 +995,7 @@ abstract class AddressQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\CustomerTitle object * * @param \Thelia\Model\CustomerTitle|ObjectCollection $customerTitle The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1017,8 +1019,8 @@ abstract class AddressQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CustomerTitle relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1051,11 +1053,11 @@ abstract class AddressQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query */ public function useCustomerTitleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1067,8 +1069,8 @@ abstract class AddressQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Country object * - * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1092,8 +1094,8 @@ abstract class AddressQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Country relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1126,11 +1128,11 @@ abstract class AddressQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query */ public function useCountryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1142,8 +1144,8 @@ abstract class AddressQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Cart object * - * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1165,8 +1167,8 @@ abstract class AddressQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CartRelatedByAddressDeliveryId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1199,11 +1201,11 @@ abstract class AddressQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query */ public function useCartRelatedByAddressDeliveryIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1215,8 +1217,8 @@ abstract class AddressQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Cart object * - * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1238,8 +1240,8 @@ abstract class AddressQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CartRelatedByAddressInvoiceId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1272,11 +1274,11 @@ abstract class AddressQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query */ public function useCartRelatedByAddressInvoiceIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1288,7 +1290,7 @@ abstract class AddressQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAddress $address Object to remove from the list of results + * @param ChildAddress $address Object to remove from the list of results * * @return ChildAddressQuery The current query, for fluid interface */ @@ -1304,8 +1306,8 @@ abstract class AddressQuery extends ModelCriteria /** * Deletes all rows from the address table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1336,13 +1338,13 @@ abstract class AddressQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAddress or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAddress object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAddress object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1362,6 +1364,7 @@ abstract class AddressQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AddressTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1380,9 +1383,9 @@ abstract class AddressQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAddressQuery The current query, for fluid interface + * @return ChildAddressQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1392,9 +1395,9 @@ abstract class AddressQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAddressQuery The current query, for fluid interface + * @return ChildAddressQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1404,7 +1407,7 @@ abstract class AddressQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAddressQuery The current query, for fluid interface + * @return ChildAddressQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1414,7 +1417,7 @@ abstract class AddressQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAddressQuery The current query, for fluid interface + * @return ChildAddressQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1424,7 +1427,7 @@ abstract class AddressQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAddressQuery The current query, for fluid interface + * @return ChildAddressQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1434,7 +1437,7 @@ abstract class AddressQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAddressQuery The current query, for fluid interface + * @return ChildAddressQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Admin.php b/core/lib/Thelia/Model/Base/Admin.php index cc645b526..433d47a54 100644 --- a/core/lib/Thelia/Model/Base/Admin.php +++ b/core/lib/Thelia/Model/Base/Admin.php @@ -29,6 +29,7 @@ abstract class Admin implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AdminTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -355,9 +356,9 @@ abstract class Admin implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Admin The current object, for fluid interface */ @@ -407,110 +408,121 @@ abstract class Admin implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [profile_id] column value. * - * @return int + * @return int */ public function getProfileId() { + return $this->profile_id; } /** * Get the [firstname] column value. * - * @return string + * @return string */ public function getFirstname() { + return $this->firstname; } /** * Get the [lastname] column value. * - * @return string + * @return string */ public function getLastname() { + return $this->lastname; } /** * Get the [login] column value. * - * @return string + * @return string */ public function getLogin() { + return $this->login; } /** * Get the [password] column value. * - * @return string + * @return string */ public function getPassword() { + return $this->password; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [algo] column value. * - * @return string + * @return string */ public function getAlgo() { + return $this->algo; } /** * Get the [salt] column value. * - * @return string + * @return string */ public function getSalt() { + return $this->salt; } /** * Get the [remember_me_token] column value. * - * @return string + * @return string */ public function getRememberMeToken() { + return $this->remember_me_token; } /** * Get the [remember_me_serial] column value. * - * @return string + * @return string */ public function getRememberMeSerial() { + return $this->remember_me_serial; } @@ -518,8 +530,8 @@ abstract class Admin implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -538,8 +550,8 @@ abstract class Admin implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -557,8 +569,8 @@ abstract class Admin implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setId($v) { @@ -571,14 +583,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [profile_id] column. * - * @param int $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setProfileId($v) { @@ -595,14 +608,15 @@ abstract class Admin implements ActiveRecordInterface $this->aProfile = null; } + return $this; } // setProfileId() /** * Set the value of [firstname] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setFirstname($v) { @@ -615,14 +629,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::FIRSTNAME] = true; } + return $this; } // setFirstname() /** * Set the value of [lastname] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setLastname($v) { @@ -635,14 +650,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::LASTNAME] = true; } + return $this; } // setLastname() /** * Set the value of [login] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setLogin($v) { @@ -655,14 +671,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::LOGIN] = true; } + return $this; } // setLogin() /** * Set the value of [password] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setPassword($v) { @@ -675,14 +692,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::PASSWORD] = true; } + return $this; } // setPassword() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setLocale($v) { @@ -695,14 +713,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [algo] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setAlgo($v) { @@ -715,14 +734,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::ALGO] = true; } + return $this; } // setAlgo() /** * Set the value of [salt] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setSalt($v) { @@ -735,14 +755,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::SALT] = true; } + return $this; } // setSalt() /** * Set the value of [remember_me_token] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setRememberMeToken($v) { @@ -755,14 +776,15 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::REMEMBER_ME_TOKEN] = true; } + return $this; } // setRememberMeToken() /** * Set the value of [remember_me_serial] column. * - * @param string $v new value - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setRememberMeSerial($v) { @@ -775,15 +797,16 @@ abstract class Admin implements ActiveRecordInterface $this->modifiedColumns[AdminTableMap::REMEMBER_ME_SERIAL] = true; } + return $this; } // setRememberMeSerial() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -795,15 +818,16 @@ abstract class Admin implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Admin The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -815,6 +839,7 @@ abstract class Admin implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -939,10 +964,10 @@ abstract class Admin implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -978,7 +1003,7 @@ abstract class Admin implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Admin::setDeleted() @@ -1021,8 +1046,8 @@ abstract class Admin implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1083,8 +1108,8 @@ abstract class Admin implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1127,7 +1152,7 @@ abstract class Admin implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1253,7 +1278,7 @@ abstract class Admin implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1269,12 +1294,12 @@ abstract class Admin implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1288,7 +1313,7 @@ abstract class Admin implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1345,12 +1370,12 @@ abstract class Admin implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1393,12 +1418,12 @@ abstract class Admin implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1412,8 +1437,8 @@ abstract class Admin implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1474,8 +1499,8 @@ abstract class Admin implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1519,6 +1544,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->isColumnModified(AdminTableMap::REMEMBER_ME_SERIAL)) $criteria->add(AdminTableMap::REMEMBER_ME_SERIAL, $this->remember_me_serial); if ($this->isColumnModified(AdminTableMap::CREATED_AT)) $criteria->add(AdminTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AdminTableMap::UPDATED_AT)) $criteria->add(AdminTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1540,7 +1566,7 @@ abstract class Admin implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1550,7 +1576,7 @@ abstract class Admin implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1564,6 +1590,7 @@ abstract class Admin implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1573,9 +1600,9 @@ abstract class Admin implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Admin (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Admin (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1606,8 +1633,8 @@ abstract class Admin implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Admin Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Admin Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1623,8 +1650,8 @@ abstract class Admin implements ActiveRecordInterface /** * Declares an association between this object and a ChildProfile object. * - * @param ChildProfile $v - * @return \Thelia\Model\Admin The current object (for fluent API support) + * @param ChildProfile $v + * @return \Thelia\Model\Admin The current object (for fluent API support) * @throws PropelException */ public function setProfile(ChildProfile $v = null) @@ -1643,6 +1670,7 @@ abstract class Admin implements ActiveRecordInterface $v->addAdmin($this); } + return $this; } @@ -1650,8 +1678,8 @@ abstract class Admin implements ActiveRecordInterface /** * Get the associated ChildProfile object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProfile The associated ChildProfile object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProfile The associated ChildProfile object. * @throws PropelException */ public function getProfile(ConnectionInterface $con = null) @@ -1702,7 +1730,7 @@ abstract class Admin implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1727,7 +1755,7 @@ abstract class Admin implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAdmin The current object (for fluent API support) + * @return ChildAdmin The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/AdminLog.php b/core/lib/Thelia/Model/Base/AdminLog.php index 4ec5808ed..e47126369 100644 --- a/core/lib/Thelia/Model/Base/AdminLog.php +++ b/core/lib/Thelia/Model/Base/AdminLog.php @@ -9,6 +9,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\ModelCriteria; use Propel\Runtime\ActiveRecord\ActiveRecordInterface; +use Propel\Runtime\Collection\Collection; use Propel\Runtime\Connection\ConnectionInterface; use Propel\Runtime\Exception\BadMethodCallException; use Propel\Runtime\Exception\PropelException; @@ -26,6 +27,7 @@ abstract class AdminLog implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AdminLogTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -329,9 +331,9 @@ abstract class AdminLog implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return AdminLog The current object, for fluid interface */ @@ -381,80 +383,88 @@ abstract class AdminLog implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [admin_login] column value. * - * @return string + * @return string */ public function getAdminLogin() { + return $this->admin_login; } /** * Get the [admin_firstname] column value. * - * @return string + * @return string */ public function getAdminFirstname() { + return $this->admin_firstname; } /** * Get the [admin_lastname] column value. * - * @return string + * @return string */ public function getAdminLastname() { + return $this->admin_lastname; } /** * Get the [resource] column value. * - * @return string + * @return string */ public function getResource() { + return $this->resource; } /** * Get the [action] column value. * - * @return string + * @return string */ public function getAction() { + return $this->action; } /** * Get the [message] column value. * - * @return string + * @return string */ public function getMessage() { + return $this->message; } /** * Get the [request] column value. * - * @return string + * @return string */ public function getRequest() { + return $this->request; } @@ -462,8 +472,8 @@ abstract class AdminLog implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -482,8 +492,8 @@ abstract class AdminLog implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -501,8 +511,8 @@ abstract class AdminLog implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setId($v) { @@ -515,14 +525,15 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [admin_login] column. * - * @param string $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setAdminLogin($v) { @@ -535,14 +546,15 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::ADMIN_LOGIN] = true; } + return $this; } // setAdminLogin() /** * Set the value of [admin_firstname] column. * - * @param string $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setAdminFirstname($v) { @@ -555,14 +567,15 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::ADMIN_FIRSTNAME] = true; } + return $this; } // setAdminFirstname() /** * Set the value of [admin_lastname] column. * - * @param string $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setAdminLastname($v) { @@ -575,14 +588,15 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::ADMIN_LASTNAME] = true; } + return $this; } // setAdminLastname() /** * Set the value of [resource] column. * - * @param string $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setResource($v) { @@ -595,14 +609,15 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::RESOURCE] = true; } + return $this; } // setResource() /** * Set the value of [action] column. * - * @param string $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setAction($v) { @@ -615,14 +630,15 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::ACTION] = true; } + return $this; } // setAction() /** * Set the value of [message] column. * - * @param string $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setMessage($v) { @@ -635,14 +651,15 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::MESSAGE] = true; } + return $this; } // setMessage() /** * Set the value of [request] column. * - * @param string $v new value - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setRequest($v) { @@ -655,15 +672,16 @@ abstract class AdminLog implements ActiveRecordInterface $this->modifiedColumns[AdminLogTableMap::REQUEST] = true; } + return $this; } // setRequest() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -675,15 +693,16 @@ abstract class AdminLog implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AdminLog The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AdminLog The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -695,6 +714,7 @@ abstract class AdminLog implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -807,10 +827,10 @@ abstract class AdminLog implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -845,7 +865,7 @@ abstract class AdminLog implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see AdminLog::setDeleted() @@ -888,8 +908,8 @@ abstract class AdminLog implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -950,8 +970,8 @@ abstract class AdminLog implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -982,7 +1002,7 @@ abstract class AdminLog implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1090,7 +1110,7 @@ abstract class AdminLog implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1106,12 +1126,12 @@ abstract class AdminLog implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1125,7 +1145,7 @@ abstract class AdminLog implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1173,11 +1193,11 @@ abstract class AdminLog implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion * * @return array an associative array containing the field names (as keys) and field values */ @@ -1205,18 +1225,19 @@ abstract class AdminLog implements ActiveRecordInterface $result[$key] = $virtualColumn; } + return $result; } /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1230,8 +1251,8 @@ abstract class AdminLog implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1283,8 +1304,8 @@ abstract class AdminLog implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1322,6 +1343,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->isColumnModified(AdminLogTableMap::REQUEST)) $criteria->add(AdminLogTableMap::REQUEST, $this->request); if ($this->isColumnModified(AdminLogTableMap::CREATED_AT)) $criteria->add(AdminLogTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AdminLogTableMap::UPDATED_AT)) $criteria->add(AdminLogTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1343,7 +1365,7 @@ abstract class AdminLog implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1353,7 +1375,7 @@ abstract class AdminLog implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1367,6 +1389,7 @@ abstract class AdminLog implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1376,9 +1399,9 @@ abstract class AdminLog implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\AdminLog (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\AdminLog (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1406,8 +1429,8 @@ abstract class AdminLog implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\AdminLog Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\AdminLog Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1449,7 +1472,7 @@ abstract class AdminLog implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1473,7 +1496,7 @@ abstract class AdminLog implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAdminLog The current object (for fluent API support) + * @return ChildAdminLog The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/AdminLogQuery.php b/core/lib/Thelia/Model/Base/AdminLogQuery.php index cdd5360e7..de0a8771f 100644 --- a/core/lib/Thelia/Model/Base/AdminLogQuery.php +++ b/core/lib/Thelia/Model/Base/AdminLogQuery.php @@ -76,9 +76,9 @@ abstract class AdminLogQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AdminLogQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AdminLog', $modelAlias = null) { @@ -88,8 +88,8 @@ abstract class AdminLogQuery extends ModelCriteria /** * Returns a new ChildAdminLogQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAdminLogQuery */ @@ -118,7 +118,7 @@ abstract class AdminLogQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAdminLog|array|mixed the result, formatted by the current formatter @@ -149,10 +149,10 @@ abstract class AdminLogQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAdminLog A model object, or null if the key is not found + * @return ChildAdminLog A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -179,8 +179,8 @@ abstract class AdminLogQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAdminLog|array|mixed the result, formatted by the current formatter */ @@ -200,8 +200,8 @@ abstract class AdminLogQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -222,24 +222,26 @@ abstract class AdminLogQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAdminLogQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AdminLogTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAdminLogQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AdminLogTableMap::ID, $keys, Criteria::IN); } @@ -253,11 +255,11 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -293,9 +295,9 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByAdminLogin('%fooValue%'); // WHERE admin_login LIKE '%fooValue%' * * - * @param string $adminLogin The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $adminLogin The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -322,9 +324,9 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByAdminFirstname('%fooValue%'); // WHERE admin_firstname LIKE '%fooValue%' * * - * @param string $adminFirstname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $adminFirstname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -351,9 +353,9 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByAdminLastname('%fooValue%'); // WHERE admin_lastname LIKE '%fooValue%' * * - * @param string $adminLastname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $adminLastname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -380,9 +382,9 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByResource('%fooValue%'); // WHERE resource LIKE '%fooValue%' * * - * @param string $resource The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $resource The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -409,9 +411,9 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByAction('%fooValue%'); // WHERE action LIKE '%fooValue%' * * - * @param string $action The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $action The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -438,9 +440,9 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByMessage('%fooValue%'); // WHERE message LIKE '%fooValue%' * * - * @param string $message The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $message The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -467,9 +469,9 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByRequest('%fooValue%'); // WHERE request LIKE '%fooValue%' * * - * @param string $request The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $request The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -497,13 +499,13 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -540,13 +542,13 @@ abstract class AdminLogQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -576,7 +578,7 @@ abstract class AdminLogQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAdminLog $adminLog Object to remove from the list of results + * @param ChildAdminLog $adminLog Object to remove from the list of results * * @return ChildAdminLogQuery The current query, for fluid interface */ @@ -592,8 +594,8 @@ abstract class AdminLogQuery extends ModelCriteria /** * Deletes all rows from the admin_log table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -624,13 +626,13 @@ abstract class AdminLogQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAdminLog or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAdminLog object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAdminLog object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -650,6 +652,7 @@ abstract class AdminLogQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AdminLogTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -668,9 +671,9 @@ abstract class AdminLogQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAdminLogQuery The current query, for fluid interface + * @return ChildAdminLogQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -680,9 +683,9 @@ abstract class AdminLogQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAdminLogQuery The current query, for fluid interface + * @return ChildAdminLogQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -692,7 +695,7 @@ abstract class AdminLogQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAdminLogQuery The current query, for fluid interface + * @return ChildAdminLogQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -702,7 +705,7 @@ abstract class AdminLogQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAdminLogQuery The current query, for fluid interface + * @return ChildAdminLogQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -712,7 +715,7 @@ abstract class AdminLogQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAdminLogQuery The current query, for fluid interface + * @return ChildAdminLogQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -722,7 +725,7 @@ abstract class AdminLogQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAdminLogQuery The current query, for fluid interface + * @return ChildAdminLogQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/AdminQuery.php b/core/lib/Thelia/Model/Base/AdminQuery.php index f9116dd4b..3b4bb9eb5 100644 --- a/core/lib/Thelia/Model/Base/AdminQuery.php +++ b/core/lib/Thelia/Model/Base/AdminQuery.php @@ -95,9 +95,9 @@ abstract class AdminQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AdminQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Admin', $modelAlias = null) { @@ -107,8 +107,8 @@ abstract class AdminQuery extends ModelCriteria /** * Returns a new ChildAdminQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAdminQuery */ @@ -137,7 +137,7 @@ abstract class AdminQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAdmin|array|mixed the result, formatted by the current formatter @@ -168,10 +168,10 @@ abstract class AdminQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAdmin A model object, or null if the key is not found + * @return ChildAdmin A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -198,8 +198,8 @@ abstract class AdminQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAdmin|array|mixed the result, formatted by the current formatter */ @@ -219,8 +219,8 @@ abstract class AdminQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -241,24 +241,26 @@ abstract class AdminQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAdminQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AdminTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAdminQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AdminTableMap::ID, $keys, Criteria::IN); } @@ -272,11 +274,11 @@ abstract class AdminQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -315,11 +317,11 @@ abstract class AdminQuery extends ModelCriteria * * @see filterByProfile() * - * @param mixed $profileId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $profileId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -355,9 +357,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%' * * - * @param string $firstname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $firstname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -384,9 +386,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%' * * - * @param string $lastname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $lastname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -413,9 +415,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByLogin('%fooValue%'); // WHERE login LIKE '%fooValue%' * * - * @param string $login The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $login The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -442,9 +444,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByPassword('%fooValue%'); // WHERE password LIKE '%fooValue%' * * - * @param string $password The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $password The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -471,9 +473,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -500,9 +502,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByAlgo('%fooValue%'); // WHERE algo LIKE '%fooValue%' * * - * @param string $algo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $algo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -529,9 +531,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterBySalt('%fooValue%'); // WHERE salt LIKE '%fooValue%' * * - * @param string $salt The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $salt The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -558,9 +560,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByRememberMeToken('%fooValue%'); // WHERE remember_me_token LIKE '%fooValue%' * * - * @param string $rememberMeToken The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $rememberMeToken The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -587,9 +589,9 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByRememberMeSerial('%fooValue%'); // WHERE remember_me_serial LIKE '%fooValue%' * * - * @param string $rememberMeSerial The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $rememberMeSerial The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -617,13 +619,13 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -660,13 +662,13 @@ abstract class AdminQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -696,8 +698,8 @@ abstract class AdminQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Profile object * - * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAdminQuery The current query, for fluid interface */ @@ -721,8 +723,8 @@ abstract class AdminQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Profile relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAdminQuery The current query, for fluid interface */ @@ -755,11 +757,11 @@ abstract class AdminQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query */ public function useProfileQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -771,7 +773,7 @@ abstract class AdminQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAdmin $admin Object to remove from the list of results + * @param ChildAdmin $admin Object to remove from the list of results * * @return ChildAdminQuery The current query, for fluid interface */ @@ -787,8 +789,8 @@ abstract class AdminQuery extends ModelCriteria /** * Deletes all rows from the admin table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -819,13 +821,13 @@ abstract class AdminQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAdmin or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAdmin object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAdmin object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -845,6 +847,7 @@ abstract class AdminQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AdminTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -863,9 +866,9 @@ abstract class AdminQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAdminQuery The current query, for fluid interface + * @return ChildAdminQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -875,9 +878,9 @@ abstract class AdminQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAdminQuery The current query, for fluid interface + * @return ChildAdminQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -887,7 +890,7 @@ abstract class AdminQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAdminQuery The current query, for fluid interface + * @return ChildAdminQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -897,7 +900,7 @@ abstract class AdminQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAdminQuery The current query, for fluid interface + * @return ChildAdminQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -907,7 +910,7 @@ abstract class AdminQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAdminQuery The current query, for fluid interface + * @return ChildAdminQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -917,7 +920,7 @@ abstract class AdminQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAdminQuery The current query, for fluid interface + * @return ChildAdminQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Area.php b/core/lib/Thelia/Model/Base/Area.php index 5a76d641b..12f79d0af 100644 --- a/core/lib/Thelia/Model/Base/Area.php +++ b/core/lib/Thelia/Model/Base/Area.php @@ -32,6 +32,7 @@ abstract class Area implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AreaTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -329,9 +330,9 @@ abstract class Area implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Area The current object, for fluid interface */ @@ -381,30 +382,33 @@ abstract class Area implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [name] column value. * - * @return string + * @return string */ public function getName() { + return $this->name; } /** * Get the [postage] column value. * - * @return double + * @return double */ public function getPostage() { + return $this->postage; } @@ -412,8 +416,8 @@ abstract class Area implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -432,8 +436,8 @@ abstract class Area implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -451,8 +455,8 @@ abstract class Area implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Area The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Area The current object (for fluent API support) */ public function setId($v) { @@ -465,14 +469,15 @@ abstract class Area implements ActiveRecordInterface $this->modifiedColumns[AreaTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [name] column. * - * @param string $v new value - * @return \Thelia\Model\Area The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Area The current object (for fluent API support) */ public function setName($v) { @@ -485,14 +490,15 @@ abstract class Area implements ActiveRecordInterface $this->modifiedColumns[AreaTableMap::NAME] = true; } + return $this; } // setName() /** * Set the value of [postage] column. * - * @param double $v new value - * @return \Thelia\Model\Area The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\Area The current object (for fluent API support) */ public function setPostage($v) { @@ -505,15 +511,16 @@ abstract class Area implements ActiveRecordInterface $this->modifiedColumns[AreaTableMap::POSTAGE] = true; } + return $this; } // setPostage() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Area The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Area The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -525,15 +532,16 @@ abstract class Area implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Area The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Area The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -545,6 +553,7 @@ abstract class Area implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -642,10 +651,10 @@ abstract class Area implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -684,7 +693,7 @@ abstract class Area implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Area::setDeleted() @@ -727,8 +736,8 @@ abstract class Area implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -789,8 +798,8 @@ abstract class Area implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -856,7 +865,7 @@ abstract class Area implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -934,7 +943,7 @@ abstract class Area implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -950,12 +959,12 @@ abstract class Area implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -969,7 +978,7 @@ abstract class Area implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1002,12 +1011,12 @@ abstract class Area implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1045,12 +1054,12 @@ abstract class Area implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1064,8 +1073,8 @@ abstract class Area implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1102,8 +1111,8 @@ abstract class Area implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1131,6 +1140,7 @@ abstract class Area implements ActiveRecordInterface if ($this->isColumnModified(AreaTableMap::POSTAGE)) $criteria->add(AreaTableMap::POSTAGE, $this->postage); if ($this->isColumnModified(AreaTableMap::CREATED_AT)) $criteria->add(AreaTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AreaTableMap::UPDATED_AT)) $criteria->add(AreaTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1152,7 +1162,7 @@ abstract class Area implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1162,7 +1172,7 @@ abstract class Area implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1176,6 +1186,7 @@ abstract class Area implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1185,9 +1196,9 @@ abstract class Area implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Area (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Area (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1230,8 +1241,8 @@ abstract class Area implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Area Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Area Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1250,7 +1261,7 @@ abstract class Area implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1292,8 +1303,8 @@ abstract class Area implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1315,8 +1326,8 @@ abstract class Area implements ActiveRecordInterface * If this ChildArea is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCountry[] List of ChildCountry objects * @throws PropelException */ @@ -1372,14 +1383,15 @@ abstract class Area implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $countries A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildArea The current object (for fluent API support) + * @param Collection $countries A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildArea The current object (for fluent API support) */ public function setCountries(Collection $countries, ConnectionInterface $con = null) { $countriesToDelete = $this->getCountries(new Criteria(), $con)->diff($countries); + $this->countriesScheduledForDeletion = $countriesToDelete; foreach ($countriesToDelete as $countryRemoved) { @@ -1400,10 +1412,10 @@ abstract class Area implements ActiveRecordInterface /** * Returns the number of related Country objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Country objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Country objects. * @throws PropelException */ public function countCountries(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1435,8 +1447,8 @@ abstract class Area implements ActiveRecordInterface * Method called to associate a ChildCountry object to this object * through the ChildCountry foreign key attribute. * - * @param ChildCountry $l ChildCountry - * @return \Thelia\Model\Area The current object (for fluent API support) + * @param ChildCountry $l ChildCountry + * @return \Thelia\Model\Area The current object (for fluent API support) */ public function addCountry(ChildCountry $l) { @@ -1462,7 +1474,7 @@ abstract class Area implements ActiveRecordInterface } /** - * @param Country $country The country object to remove. + * @param Country $country The country object to remove. * @return ChildArea The current object (for fluent API support) */ public function removeCountry($country) @@ -1509,8 +1521,8 @@ abstract class Area implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1532,8 +1544,8 @@ abstract class Area implements ActiveRecordInterface * If this ChildArea is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAreaDeliveryModule[] List of ChildAreaDeliveryModule objects * @throws PropelException */ @@ -1589,14 +1601,15 @@ abstract class Area implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $areaDeliveryModules A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildArea The current object (for fluent API support) + * @param Collection $areaDeliveryModules A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildArea The current object (for fluent API support) */ public function setAreaDeliveryModules(Collection $areaDeliveryModules, ConnectionInterface $con = null) { $areaDeliveryModulesToDelete = $this->getAreaDeliveryModules(new Criteria(), $con)->diff($areaDeliveryModules); + $this->areaDeliveryModulesScheduledForDeletion = $areaDeliveryModulesToDelete; foreach ($areaDeliveryModulesToDelete as $areaDeliveryModuleRemoved) { @@ -1617,10 +1630,10 @@ abstract class Area implements ActiveRecordInterface /** * Returns the number of related AreaDeliveryModule objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AreaDeliveryModule objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AreaDeliveryModule objects. * @throws PropelException */ public function countAreaDeliveryModules(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1652,8 +1665,8 @@ abstract class Area implements ActiveRecordInterface * Method called to associate a ChildAreaDeliveryModule object to this object * through the ChildAreaDeliveryModule foreign key attribute. * - * @param ChildAreaDeliveryModule $l ChildAreaDeliveryModule - * @return \Thelia\Model\Area The current object (for fluent API support) + * @param ChildAreaDeliveryModule $l ChildAreaDeliveryModule + * @return \Thelia\Model\Area The current object (for fluent API support) */ public function addAreaDeliveryModule(ChildAreaDeliveryModule $l) { @@ -1680,7 +1693,7 @@ abstract class Area implements ActiveRecordInterface /** * @param AreaDeliveryModule $areaDeliveryModule The areaDeliveryModule object to remove. - * @return ChildArea The current object (for fluent API support) + * @return ChildArea The current object (for fluent API support) */ public function removeAreaDeliveryModule($areaDeliveryModule) { @@ -1697,6 +1710,7 @@ abstract class Area implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1708,9 +1722,9 @@ abstract class Area implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Area. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAreaDeliveryModule[] List of ChildAreaDeliveryModule objects */ public function getAreaDeliveryModulesJoinModule($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1745,7 +1759,7 @@ abstract class Area implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1781,7 +1795,7 @@ abstract class Area implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildArea The current object (for fluent API support) + * @return ChildArea The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1866,6 +1880,7 @@ abstract class Area implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/AreaDeliveryModule.php b/core/lib/Thelia/Model/Base/AreaDeliveryModule.php index 8b0ee90b4..4102566c4 100644 --- a/core/lib/Thelia/Model/Base/AreaDeliveryModule.php +++ b/core/lib/Thelia/Model/Base/AreaDeliveryModule.php @@ -31,6 +31,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AreaDeliveryModuleTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -314,9 +315,9 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return AreaDeliveryModule The current object, for fluid interface */ @@ -366,30 +367,33 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [area_id] column value. * - * @return int + * @return int */ public function getAreaId() { + return $this->area_id; } /** * Get the [delivery_module_id] column value. * - * @return int + * @return int */ public function getDeliveryModuleId() { + return $this->delivery_module_id; } @@ -397,8 +401,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -417,8 +421,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -436,8 +440,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) */ public function setId($v) { @@ -450,14 +454,15 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface $this->modifiedColumns[AreaDeliveryModuleTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [area_id] column. * - * @param int $v new value - * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) */ public function setAreaId($v) { @@ -474,14 +479,15 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface $this->aArea = null; } + return $this; } // setAreaId() /** * Set the value of [delivery_module_id] column. * - * @param int $v new value - * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) */ public function setDeliveryModuleId($v) { @@ -498,15 +504,16 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface $this->aModule = null; } + return $this; } // setDeliveryModuleId() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -518,15 +525,16 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -538,6 +546,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -641,10 +650,10 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -681,7 +690,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see AreaDeliveryModule::setDeleted() @@ -724,8 +733,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -786,8 +795,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -837,7 +846,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -915,7 +924,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -931,12 +940,12 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -950,7 +959,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -983,12 +992,12 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1026,12 +1035,12 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1045,8 +1054,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1083,8 +1092,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1112,6 +1121,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface if ($this->isColumnModified(AreaDeliveryModuleTableMap::DELIVERY_MODULE_ID)) $criteria->add(AreaDeliveryModuleTableMap::DELIVERY_MODULE_ID, $this->delivery_module_id); if ($this->isColumnModified(AreaDeliveryModuleTableMap::CREATED_AT)) $criteria->add(AreaDeliveryModuleTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AreaDeliveryModuleTableMap::UPDATED_AT)) $criteria->add(AreaDeliveryModuleTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1133,7 +1143,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1143,7 +1153,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1157,6 +1167,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1166,9 +1177,9 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\AreaDeliveryModule (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\AreaDeliveryModule (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1191,8 +1202,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\AreaDeliveryModule Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\AreaDeliveryModule Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1208,8 +1219,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Declares an association between this object and a ChildArea object. * - * @param ChildArea $v - * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) + * @param ChildArea $v + * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) * @throws PropelException */ public function setArea(ChildArea $v = null) @@ -1228,6 +1239,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface $v->addAreaDeliveryModule($this); } + return $this; } @@ -1235,8 +1247,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Get the associated ChildArea object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildArea The associated ChildArea object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildArea The associated ChildArea object. * @throws PropelException */ public function getArea(ConnectionInterface $con = null) @@ -1258,8 +1270,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Declares an association between this object and a ChildModule object. * - * @param ChildModule $v - * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) + * @param ChildModule $v + * @return \Thelia\Model\AreaDeliveryModule The current object (for fluent API support) * @throws PropelException */ public function setModule(ChildModule $v = null) @@ -1278,6 +1290,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface $v->addAreaDeliveryModule($this); } + return $this; } @@ -1285,8 +1298,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Get the associated ChildModule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildModule The associated ChildModule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildModule The associated ChildModule object. * @throws PropelException */ public function getModule(ConnectionInterface $con = null) @@ -1329,7 +1342,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1355,7 +1368,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAreaDeliveryModule The current object (for fluent API support) + * @return ChildAreaDeliveryModule The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/AreaDeliveryModuleQuery.php b/core/lib/Thelia/Model/Base/AreaDeliveryModuleQuery.php index b4ab79284..2d21d28e0 100644 --- a/core/lib/Thelia/Model/Base/AreaDeliveryModuleQuery.php +++ b/core/lib/Thelia/Model/Base/AreaDeliveryModuleQuery.php @@ -67,9 +67,9 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AreaDeliveryModuleQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AreaDeliveryModule', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Returns a new ChildAreaDeliveryModuleQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAreaDeliveryModuleQuery */ @@ -109,7 +109,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAreaDeliveryModule|array|mixed the result, formatted by the current formatter @@ -140,10 +140,10 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAreaDeliveryModule A model object, or null if the key is not found + * @return ChildAreaDeliveryModule A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -170,8 +170,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAreaDeliveryModule|array|mixed the result, formatted by the current formatter */ @@ -191,8 +191,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -213,24 +213,26 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AreaDeliveryModuleTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AreaDeliveryModuleTableMap::ID, $keys, Criteria::IN); } @@ -244,11 +246,11 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -287,11 +289,11 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * * @see filterByArea() * - * @param mixed $areaId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $areaId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -330,11 +332,11 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * * @see filterByModule() * - * @param mixed $deliveryModuleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $deliveryModuleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -371,13 +373,13 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -414,13 +416,13 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -450,8 +452,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Area object * - * @param \Thelia\Model\Area|ObjectCollection $area The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Area|ObjectCollection $area The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -475,8 +477,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Area relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -509,11 +511,11 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AreaQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AreaQuery A secondary query class using the current class as primary query */ public function useAreaQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -525,8 +527,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Module object * - * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -550,8 +552,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Module relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -584,11 +586,11 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query */ public function useModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -600,7 +602,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAreaDeliveryModule $areaDeliveryModule Object to remove from the list of results + * @param ChildAreaDeliveryModule $areaDeliveryModule Object to remove from the list of results * * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ @@ -616,8 +618,8 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Deletes all rows from the area_delivery_module table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -648,13 +650,13 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAreaDeliveryModule or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAreaDeliveryModule object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAreaDeliveryModule object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -674,6 +676,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AreaDeliveryModuleTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -692,9 +695,9 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface + * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -704,9 +707,9 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface + * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -716,7 +719,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface + * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -726,7 +729,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface + * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -736,7 +739,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface + * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -746,7 +749,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface + * @return ChildAreaDeliveryModuleQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/AreaQuery.php b/core/lib/Thelia/Model/Base/AreaQuery.php index f2ca14354..e1033e576 100644 --- a/core/lib/Thelia/Model/Base/AreaQuery.php +++ b/core/lib/Thelia/Model/Base/AreaQuery.php @@ -67,9 +67,9 @@ abstract class AreaQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AreaQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Area', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class AreaQuery extends ModelCriteria /** * Returns a new ChildAreaQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAreaQuery */ @@ -109,7 +109,7 @@ abstract class AreaQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildArea|array|mixed the result, formatted by the current formatter @@ -140,10 +140,10 @@ abstract class AreaQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildArea A model object, or null if the key is not found + * @return ChildArea A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -170,8 +170,8 @@ abstract class AreaQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildArea|array|mixed the result, formatted by the current formatter */ @@ -191,8 +191,8 @@ abstract class AreaQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -213,24 +213,26 @@ abstract class AreaQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAreaQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AreaTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAreaQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AreaTableMap::ID, $keys, Criteria::IN); } @@ -244,11 +246,11 @@ abstract class AreaQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaQuery The current query, for fluid interface */ @@ -284,9 +286,9 @@ abstract class AreaQuery extends ModelCriteria * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%' * * - * @param string $name The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $name The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaQuery The current query, for fluid interface */ @@ -314,11 +316,11 @@ abstract class AreaQuery extends ModelCriteria * $query->filterByPostage(array('min' => 12)); // WHERE postage > 12 * * - * @param mixed $postage The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $postage The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaQuery The current query, for fluid interface */ @@ -355,13 +357,13 @@ abstract class AreaQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaQuery The current query, for fluid interface */ @@ -398,13 +400,13 @@ abstract class AreaQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaQuery The current query, for fluid interface */ @@ -434,8 +436,8 @@ abstract class AreaQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Country object * - * @param \Thelia\Model\Country|ObjectCollection $country the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Country|ObjectCollection $country the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaQuery The current query, for fluid interface */ @@ -457,8 +459,8 @@ abstract class AreaQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Country relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAreaQuery The current query, for fluid interface */ @@ -491,11 +493,11 @@ abstract class AreaQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query */ public function useCountryQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -507,8 +509,8 @@ abstract class AreaQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AreaDeliveryModule object * - * @param \Thelia\Model\AreaDeliveryModule|ObjectCollection $areaDeliveryModule the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AreaDeliveryModule|ObjectCollection $areaDeliveryModule the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAreaQuery The current query, for fluid interface */ @@ -530,8 +532,8 @@ abstract class AreaQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AreaDeliveryModule relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAreaQuery The current query, for fluid interface */ @@ -564,11 +566,11 @@ abstract class AreaQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AreaDeliveryModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AreaDeliveryModuleQuery A secondary query class using the current class as primary query */ public function useAreaDeliveryModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -580,7 +582,7 @@ abstract class AreaQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildArea $area Object to remove from the list of results + * @param ChildArea $area Object to remove from the list of results * * @return ChildAreaQuery The current query, for fluid interface */ @@ -596,8 +598,8 @@ abstract class AreaQuery extends ModelCriteria /** * Deletes all rows from the area table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -628,13 +630,13 @@ abstract class AreaQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildArea or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildArea object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildArea object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -654,6 +656,7 @@ abstract class AreaQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AreaTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -672,9 +675,9 @@ abstract class AreaQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAreaQuery The current query, for fluid interface + * @return ChildAreaQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -684,9 +687,9 @@ abstract class AreaQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAreaQuery The current query, for fluid interface + * @return ChildAreaQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -696,7 +699,7 @@ abstract class AreaQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAreaQuery The current query, for fluid interface + * @return ChildAreaQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -706,7 +709,7 @@ abstract class AreaQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAreaQuery The current query, for fluid interface + * @return ChildAreaQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -716,7 +719,7 @@ abstract class AreaQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAreaQuery The current query, for fluid interface + * @return ChildAreaQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -726,7 +729,7 @@ abstract class AreaQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAreaQuery The current query, for fluid interface + * @return ChildAreaQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Attribute.php b/core/lib/Thelia/Model/Base/Attribute.php index 09a4676c1..05d30c1ca 100644 --- a/core/lib/Thelia/Model/Base/Attribute.php +++ b/core/lib/Thelia/Model/Base/Attribute.php @@ -38,6 +38,7 @@ abstract class Attribute implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -378,9 +379,9 @@ abstract class Attribute implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Attribute The current object, for fluid interface */ @@ -430,20 +431,22 @@ abstract class Attribute implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -451,8 +454,8 @@ abstract class Attribute implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -471,8 +474,8 @@ abstract class Attribute implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -490,8 +493,8 @@ abstract class Attribute implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function setId($v) { @@ -504,14 +507,15 @@ abstract class Attribute implements ActiveRecordInterface $this->modifiedColumns[AttributeTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function setPosition($v) { @@ -524,15 +528,16 @@ abstract class Attribute implements ActiveRecordInterface $this->modifiedColumns[AttributeTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -544,15 +549,16 @@ abstract class Attribute implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -564,6 +570,7 @@ abstract class Attribute implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -658,10 +665,10 @@ abstract class Attribute implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -705,7 +712,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Attribute::setDeleted() @@ -748,8 +755,8 @@ abstract class Attribute implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -810,8 +817,8 @@ abstract class Attribute implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -937,7 +944,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1009,7 +1016,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1025,12 +1032,12 @@ abstract class Attribute implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1044,7 +1051,7 @@ abstract class Attribute implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1074,12 +1081,12 @@ abstract class Attribute implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1122,12 +1129,12 @@ abstract class Attribute implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1141,8 +1148,8 @@ abstract class Attribute implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1176,8 +1183,8 @@ abstract class Attribute implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1203,6 +1210,7 @@ abstract class Attribute implements ActiveRecordInterface if ($this->isColumnModified(AttributeTableMap::POSITION)) $criteria->add(AttributeTableMap::POSITION, $this->position); if ($this->isColumnModified(AttributeTableMap::CREATED_AT)) $criteria->add(AttributeTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AttributeTableMap::UPDATED_AT)) $criteria->add(AttributeTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1224,7 +1232,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1234,7 +1242,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1248,6 +1256,7 @@ abstract class Attribute implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1257,9 +1266,9 @@ abstract class Attribute implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Attribute (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Attribute (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1313,8 +1322,8 @@ abstract class Attribute implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Attribute Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Attribute Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1333,7 +1342,7 @@ abstract class Attribute implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1381,8 +1390,8 @@ abstract class Attribute implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1404,8 +1413,8 @@ abstract class Attribute implements ActiveRecordInterface * If this ChildAttribute is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeAv[] List of ChildAttributeAv objects * @throws PropelException */ @@ -1461,14 +1470,15 @@ abstract class Attribute implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeAvs A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAttribute The current object (for fluent API support) + * @param Collection $attributeAvs A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAttribute The current object (for fluent API support) */ public function setAttributeAvs(Collection $attributeAvs, ConnectionInterface $con = null) { $attributeAvsToDelete = $this->getAttributeAvs(new Criteria(), $con)->diff($attributeAvs); + $this->attributeAvsScheduledForDeletion = $attributeAvsToDelete; foreach ($attributeAvsToDelete as $attributeAvRemoved) { @@ -1489,10 +1499,10 @@ abstract class Attribute implements ActiveRecordInterface /** * Returns the number of related AttributeAv objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeAv objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeAv objects. * @throws PropelException */ public function countAttributeAvs(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1524,8 +1534,8 @@ abstract class Attribute implements ActiveRecordInterface * Method called to associate a ChildAttributeAv object to this object * through the ChildAttributeAv foreign key attribute. * - * @param ChildAttributeAv $l ChildAttributeAv - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param ChildAttributeAv $l ChildAttributeAv + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function addAttributeAv(ChildAttributeAv $l) { @@ -1551,7 +1561,7 @@ abstract class Attribute implements ActiveRecordInterface } /** - * @param AttributeAv $attributeAv The attributeAv object to remove. + * @param AttributeAv $attributeAv The attributeAv object to remove. * @return ChildAttribute The current object (for fluent API support) */ public function removeAttributeAv($attributeAv) @@ -1598,8 +1608,8 @@ abstract class Attribute implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1621,8 +1631,8 @@ abstract class Attribute implements ActiveRecordInterface * If this ChildAttribute is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects * @throws PropelException */ @@ -1678,14 +1688,15 @@ abstract class Attribute implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeCombinations A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAttribute The current object (for fluent API support) + * @param Collection $attributeCombinations A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAttribute The current object (for fluent API support) */ public function setAttributeCombinations(Collection $attributeCombinations, ConnectionInterface $con = null) { $attributeCombinationsToDelete = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1709,10 +1720,10 @@ abstract class Attribute implements ActiveRecordInterface /** * Returns the number of related AttributeCombination objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeCombination objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeCombination objects. * @throws PropelException */ public function countAttributeCombinations(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1744,8 +1755,8 @@ abstract class Attribute implements ActiveRecordInterface * Method called to associate a ChildAttributeCombination object to this object * through the ChildAttributeCombination foreign key attribute. * - * @param ChildAttributeCombination $l ChildAttributeCombination - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param ChildAttributeCombination $l ChildAttributeCombination + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function addAttributeCombination(ChildAttributeCombination $l) { @@ -1772,7 +1783,7 @@ abstract class Attribute implements ActiveRecordInterface /** * @param AttributeCombination $attributeCombination The attributeCombination object to remove. - * @return ChildAttribute The current object (for fluent API support) + * @return ChildAttribute The current object (for fluent API support) */ public function removeAttributeCombination($attributeCombination) { @@ -1789,6 +1800,7 @@ abstract class Attribute implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1800,9 +1812,9 @@ abstract class Attribute implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Attribute. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects */ public function getAttributeCombinationsJoinAttributeAv($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1813,6 +1825,7 @@ abstract class Attribute implements ActiveRecordInterface return $this->getAttributeCombinations($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1824,9 +1837,9 @@ abstract class Attribute implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Attribute. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects */ public function getAttributeCombinationsJoinProductSaleElements($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1866,8 +1879,8 @@ abstract class Attribute implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1889,8 +1902,8 @@ abstract class Attribute implements ActiveRecordInterface * If this ChildAttribute is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeTemplate[] List of ChildAttributeTemplate objects * @throws PropelException */ @@ -1946,14 +1959,15 @@ abstract class Attribute implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeTemplates A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAttribute The current object (for fluent API support) + * @param Collection $attributeTemplates A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAttribute The current object (for fluent API support) */ public function setAttributeTemplates(Collection $attributeTemplates, ConnectionInterface $con = null) { $attributeTemplatesToDelete = $this->getAttributeTemplates(new Criteria(), $con)->diff($attributeTemplates); + $this->attributeTemplatesScheduledForDeletion = $attributeTemplatesToDelete; foreach ($attributeTemplatesToDelete as $attributeTemplateRemoved) { @@ -1974,10 +1988,10 @@ abstract class Attribute implements ActiveRecordInterface /** * Returns the number of related AttributeTemplate objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeTemplate objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeTemplate objects. * @throws PropelException */ public function countAttributeTemplates(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2009,8 +2023,8 @@ abstract class Attribute implements ActiveRecordInterface * Method called to associate a ChildAttributeTemplate object to this object * through the ChildAttributeTemplate foreign key attribute. * - * @param ChildAttributeTemplate $l ChildAttributeTemplate - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param ChildAttributeTemplate $l ChildAttributeTemplate + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function addAttributeTemplate(ChildAttributeTemplate $l) { @@ -2037,7 +2051,7 @@ abstract class Attribute implements ActiveRecordInterface /** * @param AttributeTemplate $attributeTemplate The attributeTemplate object to remove. - * @return ChildAttribute The current object (for fluent API support) + * @return ChildAttribute The current object (for fluent API support) */ public function removeAttributeTemplate($attributeTemplate) { @@ -2054,6 +2068,7 @@ abstract class Attribute implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2065,9 +2080,9 @@ abstract class Attribute implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Attribute. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeTemplate[] List of ChildAttributeTemplate objects */ public function getAttributeTemplatesJoinTemplate($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2107,8 +2122,8 @@ abstract class Attribute implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2130,8 +2145,8 @@ abstract class Attribute implements ActiveRecordInterface * If this ChildAttribute is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeI18n[] List of ChildAttributeI18n objects * @throws PropelException */ @@ -2187,14 +2202,15 @@ abstract class Attribute implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAttribute The current object (for fluent API support) + * @param Collection $attributeI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAttribute The current object (for fluent API support) */ public function setAttributeI18ns(Collection $attributeI18ns, ConnectionInterface $con = null) { $attributeI18nsToDelete = $this->getAttributeI18ns(new Criteria(), $con)->diff($attributeI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2218,10 +2234,10 @@ abstract class Attribute implements ActiveRecordInterface /** * Returns the number of related AttributeI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeI18n objects. * @throws PropelException */ public function countAttributeI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2253,8 +2269,8 @@ abstract class Attribute implements ActiveRecordInterface * Method called to associate a ChildAttributeI18n object to this object * through the ChildAttributeI18n foreign key attribute. * - * @param ChildAttributeI18n $l ChildAttributeI18n - * @return \Thelia\Model\Attribute The current object (for fluent API support) + * @param ChildAttributeI18n $l ChildAttributeI18n + * @return \Thelia\Model\Attribute The current object (for fluent API support) */ public function addAttributeI18n(ChildAttributeI18n $l) { @@ -2284,7 +2300,7 @@ abstract class Attribute implements ActiveRecordInterface } /** - * @param AttributeI18n $attributeI18n The attributeI18n object to remove. + * @param AttributeI18n $attributeI18n The attributeI18n object to remove. * @return ChildAttribute The current object (for fluent API support) */ public function removeAttributeI18n($attributeI18n) @@ -2342,8 +2358,8 @@ abstract class Attribute implements ActiveRecordInterface * If this ChildAttribute is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildTemplate[] List of ChildTemplate objects */ @@ -2373,9 +2389,9 @@ abstract class Attribute implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $templates A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAttribute The current object (for fluent API support) + * @param Collection $templates A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAttribute The current object (for fluent API support) */ public function setTemplates(Collection $templates, ConnectionInterface $con = null) { @@ -2399,9 +2415,9 @@ abstract class Attribute implements ActiveRecordInterface * Gets the number of ChildTemplate objects related by a many-to-many relationship * to the current object by way of the attribute_template cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildTemplate objects */ @@ -2429,7 +2445,7 @@ abstract class Attribute implements ActiveRecordInterface * Associate a ChildTemplate object to this object * through the attribute_template cross reference table. * - * @param ChildTemplate $template The ChildAttributeTemplate object to relate + * @param ChildTemplate $template The ChildAttributeTemplate object to relate * @return ChildAttribute The current object (for fluent API support) */ public function addTemplate(ChildTemplate $template) @@ -2447,7 +2463,7 @@ abstract class Attribute implements ActiveRecordInterface } /** - * @param Template $template The template object to add. + * @param Template $template The template object to add. */ protected function doAddTemplate($template) { @@ -2466,7 +2482,7 @@ abstract class Attribute implements ActiveRecordInterface * Remove a ChildTemplate object to this object * through the attribute_template cross reference table. * - * @param ChildTemplate $template The ChildAttributeTemplate object to relate + * @param ChildTemplate $template The ChildAttributeTemplate object to relate * @return ChildAttribute The current object (for fluent API support) */ public function removeTemplate(ChildTemplate $template) @@ -2508,7 +2524,7 @@ abstract class Attribute implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2566,7 +2582,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAttribute The current object (for fluent API support) + * @return ChildAttribute The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2580,9 +2596,9 @@ abstract class Attribute implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildAttribute The current object (for fluent API support) + * @return ChildAttribute The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2594,7 +2610,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2604,8 +2620,8 @@ abstract class Attribute implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildAttributeI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2638,10 +2654,10 @@ abstract class Attribute implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildAttribute The current object (for fluent API support) + * @return ChildAttribute The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2666,7 +2682,7 @@ abstract class Attribute implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildAttributeI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2674,6 +2690,7 @@ abstract class Attribute implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2684,6 +2701,7 @@ abstract class Attribute implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2696,6 +2714,7 @@ abstract class Attribute implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2706,6 +2725,7 @@ abstract class Attribute implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2718,6 +2738,7 @@ abstract class Attribute implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -2728,6 +2749,7 @@ abstract class Attribute implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -2740,6 +2762,7 @@ abstract class Attribute implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -2750,6 +2773,7 @@ abstract class Attribute implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -2838,6 +2862,7 @@ abstract class Attribute implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/AttributeAv.php b/core/lib/Thelia/Model/Base/AttributeAv.php index 73d2085c8..57eddd579 100644 --- a/core/lib/Thelia/Model/Base/AttributeAv.php +++ b/core/lib/Thelia/Model/Base/AttributeAv.php @@ -34,6 +34,7 @@ abstract class AttributeAv implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeAvTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -350,9 +351,9 @@ abstract class AttributeAv implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return AttributeAv The current object, for fluid interface */ @@ -402,30 +403,33 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [attribute_id] column value. * - * @return int + * @return int */ public function getAttributeId() { + return $this->attribute_id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -433,8 +437,8 @@ abstract class AttributeAv implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -453,8 +457,8 @@ abstract class AttributeAv implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -472,8 +476,8 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) */ public function setId($v) { @@ -486,14 +490,15 @@ abstract class AttributeAv implements ActiveRecordInterface $this->modifiedColumns[AttributeAvTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [attribute_id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) */ public function setAttributeId($v) { @@ -510,14 +515,15 @@ abstract class AttributeAv implements ActiveRecordInterface $this->aAttribute = null; } + return $this; } // setAttributeId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) */ public function setPosition($v) { @@ -530,15 +536,16 @@ abstract class AttributeAv implements ActiveRecordInterface $this->modifiedColumns[AttributeAvTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -550,15 +557,16 @@ abstract class AttributeAv implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -570,6 +578,7 @@ abstract class AttributeAv implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -670,10 +679,10 @@ abstract class AttributeAv implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -713,7 +722,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see AttributeAv::setDeleted() @@ -756,8 +765,8 @@ abstract class AttributeAv implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -818,8 +827,8 @@ abstract class AttributeAv implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -896,7 +905,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -974,7 +983,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -990,12 +999,12 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1009,7 +1018,7 @@ abstract class AttributeAv implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1042,12 +1051,12 @@ abstract class AttributeAv implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1088,12 +1097,12 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1107,8 +1116,8 @@ abstract class AttributeAv implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1145,8 +1154,8 @@ abstract class AttributeAv implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1174,6 +1183,7 @@ abstract class AttributeAv implements ActiveRecordInterface if ($this->isColumnModified(AttributeAvTableMap::POSITION)) $criteria->add(AttributeAvTableMap::POSITION, $this->position); if ($this->isColumnModified(AttributeAvTableMap::CREATED_AT)) $criteria->add(AttributeAvTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AttributeAvTableMap::UPDATED_AT)) $criteria->add(AttributeAvTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1195,7 +1205,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1205,7 +1215,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1219,6 +1229,7 @@ abstract class AttributeAv implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1228,9 +1239,9 @@ abstract class AttributeAv implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\AttributeAv (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\AttributeAv (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1273,8 +1284,8 @@ abstract class AttributeAv implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\AttributeAv Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\AttributeAv Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1290,8 +1301,8 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Declares an association between this object and a ChildAttribute object. * - * @param ChildAttribute $v - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param ChildAttribute $v + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) * @throws PropelException */ public function setAttribute(ChildAttribute $v = null) @@ -1310,6 +1321,7 @@ abstract class AttributeAv implements ActiveRecordInterface $v->addAttributeAv($this); } + return $this; } @@ -1317,8 +1329,8 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Get the associated ChildAttribute object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAttribute The associated ChildAttribute object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAttribute The associated ChildAttribute object. * @throws PropelException */ public function getAttribute(ConnectionInterface $con = null) @@ -1343,7 +1355,7 @@ abstract class AttributeAv implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1385,8 +1397,8 @@ abstract class AttributeAv implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1408,8 +1420,8 @@ abstract class AttributeAv implements ActiveRecordInterface * If this ChildAttributeAv is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects * @throws PropelException */ @@ -1465,14 +1477,15 @@ abstract class AttributeAv implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeCombinations A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAttributeAv The current object (for fluent API support) + * @param Collection $attributeCombinations A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAttributeAv The current object (for fluent API support) */ public function setAttributeCombinations(Collection $attributeCombinations, ConnectionInterface $con = null) { $attributeCombinationsToDelete = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1496,10 +1509,10 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Returns the number of related AttributeCombination objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeCombination objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeCombination objects. * @throws PropelException */ public function countAttributeCombinations(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1531,8 +1544,8 @@ abstract class AttributeAv implements ActiveRecordInterface * Method called to associate a ChildAttributeCombination object to this object * through the ChildAttributeCombination foreign key attribute. * - * @param ChildAttributeCombination $l ChildAttributeCombination - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param ChildAttributeCombination $l ChildAttributeCombination + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) */ public function addAttributeCombination(ChildAttributeCombination $l) { @@ -1559,7 +1572,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * @param AttributeCombination $attributeCombination The attributeCombination object to remove. - * @return ChildAttributeAv The current object (for fluent API support) + * @return ChildAttributeAv The current object (for fluent API support) */ public function removeAttributeCombination($attributeCombination) { @@ -1576,6 +1589,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1587,9 +1601,9 @@ abstract class AttributeAv implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in AttributeAv. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects */ public function getAttributeCombinationsJoinAttribute($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1600,6 +1614,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this->getAttributeCombinations($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1611,9 +1626,9 @@ abstract class AttributeAv implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in AttributeAv. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects */ public function getAttributeCombinationsJoinProductSaleElements($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1653,8 +1668,8 @@ abstract class AttributeAv implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1676,8 +1691,8 @@ abstract class AttributeAv implements ActiveRecordInterface * If this ChildAttributeAv is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeAvI18n[] List of ChildAttributeAvI18n objects * @throws PropelException */ @@ -1733,14 +1748,15 @@ abstract class AttributeAv implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeAvI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildAttributeAv The current object (for fluent API support) + * @param Collection $attributeAvI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildAttributeAv The current object (for fluent API support) */ public function setAttributeAvI18ns(Collection $attributeAvI18ns, ConnectionInterface $con = null) { $attributeAvI18nsToDelete = $this->getAttributeAvI18ns(new Criteria(), $con)->diff($attributeAvI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1764,10 +1780,10 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Returns the number of related AttributeAvI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeAvI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeAvI18n objects. * @throws PropelException */ public function countAttributeAvI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1799,8 +1815,8 @@ abstract class AttributeAv implements ActiveRecordInterface * Method called to associate a ChildAttributeAvI18n object to this object * through the ChildAttributeAvI18n foreign key attribute. * - * @param ChildAttributeAvI18n $l ChildAttributeAvI18n - * @return \Thelia\Model\AttributeAv The current object (for fluent API support) + * @param ChildAttributeAvI18n $l ChildAttributeAvI18n + * @return \Thelia\Model\AttributeAv The current object (for fluent API support) */ public function addAttributeAvI18n(ChildAttributeAvI18n $l) { @@ -1830,7 +1846,7 @@ abstract class AttributeAv implements ActiveRecordInterface } /** - * @param AttributeAvI18n $attributeAvI18n The attributeAvI18n object to remove. + * @param AttributeAvI18n $attributeAvI18n The attributeAvI18n object to remove. * @return ChildAttributeAv The current object (for fluent API support) */ public function removeAttributeAvI18n($attributeAvI18n) @@ -1872,7 +1888,7 @@ abstract class AttributeAv implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1913,7 +1929,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAttributeAv The current object (for fluent API support) + * @return ChildAttributeAv The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1927,9 +1943,9 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildAttributeAv The current object (for fluent API support) + * @return ChildAttributeAv The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1941,7 +1957,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1951,8 +1967,8 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildAttributeAvI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1985,10 +2001,10 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildAttributeAv The current object (for fluent API support) + * @return ChildAttributeAv The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2013,7 +2029,7 @@ abstract class AttributeAv implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildAttributeAvI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2021,6 +2037,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2031,6 +2048,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2043,6 +2061,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2053,6 +2072,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2065,6 +2085,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -2075,6 +2096,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -2087,6 +2109,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -2097,6 +2120,7 @@ abstract class AttributeAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -2185,6 +2209,7 @@ abstract class AttributeAv implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/AttributeAvI18n.php b/core/lib/Thelia/Model/Base/AttributeAvI18n.php index 6f044307d..e6ba4dd03 100644 --- a/core/lib/Thelia/Model/Base/AttributeAvI18n.php +++ b/core/lib/Thelia/Model/Base/AttributeAvI18n.php @@ -26,6 +26,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeAvI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return AttributeAvI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class AttributeAvI18n implements ActiveRecordInterface $this->aAttributeAv = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class AttributeAvI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeAvI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class AttributeAvI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeAvI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class AttributeAvI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeAvI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class AttributeAvI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeAvI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeAvI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AttributeAvI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see AttributeAvI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface if ($this->isColumnModified(AttributeAvI18nTableMap::DESCRIPTION)) $criteria->add(AttributeAvI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(AttributeAvI18nTableMap::CHAPO)) $criteria->add(AttributeAvI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(AttributeAvI18nTableMap::POSTSCRIPTUM)) $criteria->add(AttributeAvI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\AttributeAvI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\AttributeAvI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\AttributeAvI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\AttributeAvI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class AttributeAvI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildAttributeAv object. * - * @param ChildAttributeAv $v - * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) + * @param ChildAttributeAv $v + * @return \Thelia\Model\AttributeAvI18n The current object (for fluent API support) * @throws PropelException */ public function setAttributeAv(ChildAttributeAv $v = null) @@ -1231,14 +1247,16 @@ abstract class AttributeAvI18n implements ActiveRecordInterface $v->addAttributeAvI18n($this); } + return $this; } + /** * Get the associated ChildAttributeAv object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAttributeAv The associated ChildAttributeAv object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAttributeAv The associated ChildAttributeAv object. * @throws PropelException */ public function getAttributeAv(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/AttributeAvI18nQuery.php b/core/lib/Thelia/Model/Base/AttributeAvI18nQuery.php index 0d5116f8d..df90b3baa 100644 --- a/core/lib/Thelia/Model/Base/AttributeAvI18nQuery.php +++ b/core/lib/Thelia/Model/Base/AttributeAvI18nQuery.php @@ -67,9 +67,9 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AttributeAvI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AttributeAvI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Returns a new ChildAttributeAvI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAttributeAvI18nQuery */ @@ -140,10 +140,10 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAttributeAvI18n A model object, or null if the key is not found + * @return ChildAttributeAvI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAttributeAvI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * * @see filterByAttributeAv() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\AttributeAv object * * @param \Thelia\Model\AttributeAv|ObjectCollection $attributeAv The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeAv relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class AttributeAvI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeAvQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeAvQuery A secondary query class using the current class as primary query */ public function useAttributeAvQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAttributeAvI18n $attributeAvI18n Object to remove from the list of results + * @param ChildAttributeAvI18n $attributeAvI18n Object to remove from the list of results * * @return ChildAttributeAvI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Deletes all rows from the attribute_av_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class AttributeAvI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAttributeAvI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAttributeAvI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAttributeAvI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class AttributeAvI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AttributeAvI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/AttributeAvQuery.php b/core/lib/Thelia/Model/Base/AttributeAvQuery.php index 8c0af8c07..d0227b7c9 100644 --- a/core/lib/Thelia/Model/Base/AttributeAvQuery.php +++ b/core/lib/Thelia/Model/Base/AttributeAvQuery.php @@ -72,9 +72,9 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AttributeAvQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AttributeAv', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Returns a new ChildAttributeAvQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAttributeAvQuery */ @@ -114,7 +114,7 @@ abstract class AttributeAvQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAttributeAv|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class AttributeAvQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAttributeAv A model object, or null if the key is not found + * @return ChildAttributeAv A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAttributeAv|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class AttributeAvQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAttributeAvQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AttributeAvTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAttributeAvQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AttributeAvTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class AttributeAvQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class AttributeAvQuery extends ModelCriteria * * @see filterByAttribute() * - * @param mixed $attributeId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $attributeId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -333,11 +335,11 @@ abstract class AttributeAvQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -374,13 +376,13 @@ abstract class AttributeAvQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -417,13 +419,13 @@ abstract class AttributeAvQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -453,8 +455,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Attribute object * - * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -478,8 +480,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Attribute relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -512,11 +514,11 @@ abstract class AttributeAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query */ public function useAttributeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -528,8 +530,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeCombination object * - * @param \Thelia\Model\AttributeCombination|ObjectCollection $attributeCombination the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeCombination|ObjectCollection $attributeCombination the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -551,8 +553,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeCombination relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -585,11 +587,11 @@ abstract class AttributeAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeCombinationQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeCombinationQuery A secondary query class using the current class as primary query */ public function useAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -601,8 +603,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeAvI18n object * - * @param \Thelia\Model\AttributeAvI18n|ObjectCollection $attributeAvI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeAvI18n|ObjectCollection $attributeAvI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -624,8 +626,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeAvI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -658,11 +660,11 @@ abstract class AttributeAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeAvI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeAvI18nQuery A secondary query class using the current class as primary query */ public function useAttributeAvI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -674,7 +676,7 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAttributeAv $attributeAv Object to remove from the list of results + * @param ChildAttributeAv $attributeAv Object to remove from the list of results * * @return ChildAttributeAvQuery The current query, for fluid interface */ @@ -690,8 +692,8 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Deletes all rows from the attribute_av table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -722,13 +724,13 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAttributeAv or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAttributeAv object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAttributeAv object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -748,6 +750,7 @@ abstract class AttributeAvQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AttributeAvTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -766,9 +769,9 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -778,9 +781,9 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -790,7 +793,7 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -800,7 +803,7 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -810,7 +813,7 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -820,7 +823,7 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -832,11 +835,11 @@ abstract class AttributeAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -851,10 +854,10 @@ abstract class AttributeAvQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildAttributeAvQuery The current query, for fluid interface + * @return ChildAttributeAvQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -871,11 +874,11 @@ abstract class AttributeAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildAttributeAvI18nQuery A secondary query class using the current class as primary query + * @return ChildAttributeAvI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/AttributeCombination.php b/core/lib/Thelia/Model/Base/AttributeCombination.php index ce5507889..44dc93257 100644 --- a/core/lib/Thelia/Model/Base/AttributeCombination.php +++ b/core/lib/Thelia/Model/Base/AttributeCombination.php @@ -33,6 +33,7 @@ abstract class AttributeCombination implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeCombinationTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -321,9 +322,9 @@ abstract class AttributeCombination implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return AttributeCombination The current object, for fluid interface */ @@ -373,30 +374,33 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Get the [attribute_id] column value. * - * @return int + * @return int */ public function getAttributeId() { + return $this->attribute_id; } /** * Get the [attribute_av_id] column value. * - * @return int + * @return int */ public function getAttributeAvId() { + return $this->attribute_av_id; } /** * Get the [product_sale_elements_id] column value. * - * @return int + * @return int */ public function getProductSaleElementsId() { + return $this->product_sale_elements_id; } @@ -404,8 +408,8 @@ abstract class AttributeCombination implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -424,8 +428,8 @@ abstract class AttributeCombination implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -443,8 +447,8 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Set the value of [attribute_id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) */ public function setAttributeId($v) { @@ -461,14 +465,15 @@ abstract class AttributeCombination implements ActiveRecordInterface $this->aAttribute = null; } + return $this; } // setAttributeId() /** * Set the value of [attribute_av_id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) */ public function setAttributeAvId($v) { @@ -485,14 +490,15 @@ abstract class AttributeCombination implements ActiveRecordInterface $this->aAttributeAv = null; } + return $this; } // setAttributeAvId() /** * Set the value of [product_sale_elements_id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) */ public function setProductSaleElementsId($v) { @@ -509,15 +515,16 @@ abstract class AttributeCombination implements ActiveRecordInterface $this->aProductSaleElements = null; } + return $this; } // setProductSaleElementsId() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -529,15 +536,16 @@ abstract class AttributeCombination implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -549,6 +557,7 @@ abstract class AttributeCombination implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -655,10 +664,10 @@ abstract class AttributeCombination implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -696,7 +705,7 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see AttributeCombination::setDeleted() @@ -739,8 +748,8 @@ abstract class AttributeCombination implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -801,8 +810,8 @@ abstract class AttributeCombination implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -859,7 +868,7 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -869,6 +878,7 @@ abstract class AttributeCombination implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; + // check the columns in natural order for more readable SQL queries if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_ID)) { $modifiedColumns[':p' . $index++] = '`ATTRIBUTE_ID`'; @@ -925,7 +935,7 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -941,12 +951,12 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -960,7 +970,7 @@ abstract class AttributeCombination implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -993,12 +1003,12 @@ abstract class AttributeCombination implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1039,12 +1049,12 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1058,8 +1068,8 @@ abstract class AttributeCombination implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1096,8 +1106,8 @@ abstract class AttributeCombination implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1125,6 +1135,7 @@ abstract class AttributeCombination implements ActiveRecordInterface if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) $criteria->add(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $this->product_sale_elements_id); if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) $criteria->add(AttributeCombinationTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AttributeCombinationTableMap::UPDATED_AT)) $criteria->add(AttributeCombinationTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1164,7 +1175,7 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1180,6 +1191,7 @@ abstract class AttributeCombination implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getAttributeId()) && (null === $this->getAttributeAvId()) && (null === $this->getProductSaleElementsId()); } @@ -1189,9 +1201,9 @@ abstract class AttributeCombination implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\AttributeCombination (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\AttributeCombination (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1214,8 +1226,8 @@ abstract class AttributeCombination implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\AttributeCombination Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\AttributeCombination Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1231,8 +1243,8 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Declares an association between this object and a ChildAttribute object. * - * @param ChildAttribute $v - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param ChildAttribute $v + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) * @throws PropelException */ public function setAttribute(ChildAttribute $v = null) @@ -1251,6 +1263,7 @@ abstract class AttributeCombination implements ActiveRecordInterface $v->addAttributeCombination($this); } + return $this; } @@ -1258,8 +1271,8 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Get the associated ChildAttribute object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAttribute The associated ChildAttribute object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAttribute The associated ChildAttribute object. * @throws PropelException */ public function getAttribute(ConnectionInterface $con = null) @@ -1281,8 +1294,8 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Declares an association between this object and a ChildAttributeAv object. * - * @param ChildAttributeAv $v - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param ChildAttributeAv $v + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) * @throws PropelException */ public function setAttributeAv(ChildAttributeAv $v = null) @@ -1301,6 +1314,7 @@ abstract class AttributeCombination implements ActiveRecordInterface $v->addAttributeCombination($this); } + return $this; } @@ -1308,8 +1322,8 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Get the associated ChildAttributeAv object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAttributeAv The associated ChildAttributeAv object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAttributeAv The associated ChildAttributeAv object. * @throws PropelException */ public function getAttributeAv(ConnectionInterface $con = null) @@ -1331,8 +1345,8 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Declares an association between this object and a ChildProductSaleElements object. * - * @param ChildProductSaleElements $v - * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) + * @param ChildProductSaleElements $v + * @return \Thelia\Model\AttributeCombination The current object (for fluent API support) * @throws PropelException */ public function setProductSaleElements(ChildProductSaleElements $v = null) @@ -1351,6 +1365,7 @@ abstract class AttributeCombination implements ActiveRecordInterface $v->addAttributeCombination($this); } + return $this; } @@ -1358,8 +1373,8 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Get the associated ChildProductSaleElements object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProductSaleElements The associated ChildProductSaleElements object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProductSaleElements The associated ChildProductSaleElements object. * @throws PropelException */ public function getProductSaleElements(ConnectionInterface $con = null) @@ -1402,7 +1417,7 @@ abstract class AttributeCombination implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1429,7 +1444,7 @@ abstract class AttributeCombination implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAttributeCombination The current object (for fluent API support) + * @return ChildAttributeCombination The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/AttributeCombinationQuery.php b/core/lib/Thelia/Model/Base/AttributeCombinationQuery.php index 9f93d1f96..d77286e11 100644 --- a/core/lib/Thelia/Model/Base/AttributeCombinationQuery.php +++ b/core/lib/Thelia/Model/Base/AttributeCombinationQuery.php @@ -71,9 +71,9 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AttributeCombinationQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AttributeCombination', $modelAlias = null) { @@ -83,8 +83,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Returns a new ChildAttributeCombinationQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAttributeCombinationQuery */ @@ -144,10 +144,10 @@ abstract class AttributeCombinationQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAttributeCombination A model object, or null if the key is not found + * @return ChildAttributeCombination A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -176,8 +176,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAttributeCombination|array|mixed the result, formatted by the current formatter */ @@ -197,8 +197,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -219,7 +219,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -235,7 +235,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -268,11 +268,11 @@ abstract class AttributeCombinationQuery extends ModelCriteria * * @see filterByAttribute() * - * @param mixed $attributeId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $attributeId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -311,11 +311,11 @@ abstract class AttributeCombinationQuery extends ModelCriteria * * @see filterByAttributeAv() * - * @param mixed $attributeAvId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $attributeAvId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -354,11 +354,11 @@ abstract class AttributeCombinationQuery extends ModelCriteria * * @see filterByProductSaleElements() * - * @param mixed $productSaleElementsId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productSaleElementsId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -395,13 +395,13 @@ abstract class AttributeCombinationQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -438,13 +438,13 @@ abstract class AttributeCombinationQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -474,8 +474,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Attribute object * - * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -499,8 +499,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Attribute relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -533,11 +533,11 @@ abstract class AttributeCombinationQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query */ public function useAttributeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -550,7 +550,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\AttributeAv object * * @param \Thelia\Model\AttributeAv|ObjectCollection $attributeAv The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -574,8 +574,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeAv relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -608,11 +608,11 @@ abstract class AttributeCombinationQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeAvQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeAvQuery A secondary query class using the current class as primary query */ public function useAttributeAvQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -625,7 +625,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ProductSaleElements object * * @param \Thelia\Model\ProductSaleElements|ObjectCollection $productSaleElements The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -649,8 +649,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductSaleElements relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -683,11 +683,11 @@ abstract class AttributeCombinationQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query */ public function useProductSaleElementsQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -699,7 +699,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAttributeCombination $attributeCombination Object to remove from the list of results + * @param ChildAttributeCombination $attributeCombination Object to remove from the list of results * * @return ChildAttributeCombinationQuery The current query, for fluid interface */ @@ -718,8 +718,8 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Deletes all rows from the attribute_combination table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -750,13 +750,13 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAttributeCombination or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAttributeCombination object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAttributeCombination object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -776,6 +776,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AttributeCombinationTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -794,9 +795,9 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAttributeCombinationQuery The current query, for fluid interface + * @return ChildAttributeCombinationQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -806,9 +807,9 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAttributeCombinationQuery The current query, for fluid interface + * @return ChildAttributeCombinationQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -818,7 +819,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAttributeCombinationQuery The current query, for fluid interface + * @return ChildAttributeCombinationQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -828,7 +829,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAttributeCombinationQuery The current query, for fluid interface + * @return ChildAttributeCombinationQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -838,7 +839,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAttributeCombinationQuery The current query, for fluid interface + * @return ChildAttributeCombinationQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -848,7 +849,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAttributeCombinationQuery The current query, for fluid interface + * @return ChildAttributeCombinationQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/AttributeI18n.php b/core/lib/Thelia/Model/Base/AttributeI18n.php index e8a9035d8..6c42fded2 100644 --- a/core/lib/Thelia/Model/Base/AttributeI18n.php +++ b/core/lib/Thelia/Model/Base/AttributeI18n.php @@ -26,6 +26,7 @@ abstract class AttributeI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class AttributeI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return AttributeI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class AttributeI18n implements ActiveRecordInterface $this->aAttribute = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class AttributeI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class AttributeI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class AttributeI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class AttributeI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class AttributeI18n implements ActiveRecordInterface $this->modifiedColumns[AttributeI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class AttributeI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AttributeI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class AttributeI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see AttributeI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class AttributeI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class AttributeI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class AttributeI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class AttributeI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class AttributeI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class AttributeI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class AttributeI18n implements ActiveRecordInterface if ($this->isColumnModified(AttributeI18nTableMap::DESCRIPTION)) $criteria->add(AttributeI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(AttributeI18nTableMap::CHAPO)) $criteria->add(AttributeI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(AttributeI18nTableMap::POSTSCRIPTUM)) $criteria->add(AttributeI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class AttributeI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class AttributeI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\AttributeI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\AttributeI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class AttributeI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\AttributeI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\AttributeI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class AttributeI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildAttribute object. * - * @param ChildAttribute $v - * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) + * @param ChildAttribute $v + * @return \Thelia\Model\AttributeI18n The current object (for fluent API support) * @throws PropelException */ public function setAttribute(ChildAttribute $v = null) @@ -1231,14 +1247,16 @@ abstract class AttributeI18n implements ActiveRecordInterface $v->addAttributeI18n($this); } + return $this; } + /** * Get the associated ChildAttribute object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAttribute The associated ChildAttribute object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAttribute The associated ChildAttribute object. * @throws PropelException */ public function getAttribute(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class AttributeI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/AttributeI18nQuery.php b/core/lib/Thelia/Model/Base/AttributeI18nQuery.php index c7141046f..5b7f05df5 100644 --- a/core/lib/Thelia/Model/Base/AttributeI18nQuery.php +++ b/core/lib/Thelia/Model/Base/AttributeI18nQuery.php @@ -67,9 +67,9 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AttributeI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AttributeI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Returns a new ChildAttributeI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAttributeI18nQuery */ @@ -140,10 +140,10 @@ abstract class AttributeI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAttributeI18n A model object, or null if the key is not found + * @return ChildAttributeI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAttributeI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class AttributeI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class AttributeI18nQuery extends ModelCriteria * * @see filterByAttribute() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class AttributeI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class AttributeI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class AttributeI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class AttributeI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class AttributeI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Attribute object * - * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Attribute relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class AttributeI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query */ public function useAttributeQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAttributeI18n $attributeI18n Object to remove from the list of results + * @param ChildAttributeI18n $attributeI18n Object to remove from the list of results * * @return ChildAttributeI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Deletes all rows from the attribute_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class AttributeI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAttributeI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAttributeI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAttributeI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class AttributeI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AttributeI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/AttributeQuery.php b/core/lib/Thelia/Model/Base/AttributeQuery.php index 8481dd96f..a2f2b6915 100644 --- a/core/lib/Thelia/Model/Base/AttributeQuery.php +++ b/core/lib/Thelia/Model/Base/AttributeQuery.php @@ -72,9 +72,9 @@ abstract class AttributeQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AttributeQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Attribute', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Returns a new ChildAttributeQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAttributeQuery */ @@ -114,7 +114,7 @@ abstract class AttributeQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAttribute|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class AttributeQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAttribute A model object, or null if the key is not found + * @return ChildAttribute A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAttribute|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class AttributeQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class AttributeQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAttributeQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AttributeTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAttributeQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AttributeTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class AttributeQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -290,11 +292,11 @@ abstract class AttributeQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -331,13 +333,13 @@ abstract class AttributeQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -374,13 +376,13 @@ abstract class AttributeQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -410,8 +412,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeAv object * - * @param \Thelia\Model\AttributeAv|ObjectCollection $attributeAv the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeAv|ObjectCollection $attributeAv the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -433,8 +435,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeAv relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -467,11 +469,11 @@ abstract class AttributeQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeAvQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeAvQuery A secondary query class using the current class as primary query */ public function useAttributeAvQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -483,8 +485,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeCombination object * - * @param \Thelia\Model\AttributeCombination|ObjectCollection $attributeCombination the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeCombination|ObjectCollection $attributeCombination the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -506,8 +508,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeCombination relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -540,11 +542,11 @@ abstract class AttributeQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeCombinationQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeCombinationQuery A secondary query class using the current class as primary query */ public function useAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -556,8 +558,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeTemplate object * - * @param \Thelia\Model\AttributeTemplate|ObjectCollection $attributeTemplate the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeTemplate|ObjectCollection $attributeTemplate the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -579,8 +581,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeTemplate relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -613,11 +615,11 @@ abstract class AttributeQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeTemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeTemplateQuery A secondary query class using the current class as primary query */ public function useAttributeTemplateQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -629,8 +631,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeI18n object * - * @param \Thelia\Model\AttributeI18n|ObjectCollection $attributeI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeI18n|ObjectCollection $attributeI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -652,8 +654,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -686,11 +688,11 @@ abstract class AttributeQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeI18nQuery A secondary query class using the current class as primary query */ public function useAttributeI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -703,8 +705,8 @@ abstract class AttributeQuery extends ModelCriteria * Filter the query by a related Template object * using the attribute_template table as cross reference * - * @param Template $template the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Template $template the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -719,7 +721,7 @@ abstract class AttributeQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAttribute $attribute Object to remove from the list of results + * @param ChildAttribute $attribute Object to remove from the list of results * * @return ChildAttributeQuery The current query, for fluid interface */ @@ -735,8 +737,8 @@ abstract class AttributeQuery extends ModelCriteria /** * Deletes all rows from the attribute table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -767,13 +769,13 @@ abstract class AttributeQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAttribute or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAttribute object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAttribute object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -793,6 +795,7 @@ abstract class AttributeQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AttributeTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -811,9 +814,9 @@ abstract class AttributeQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -823,9 +826,9 @@ abstract class AttributeQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -835,7 +838,7 @@ abstract class AttributeQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -845,7 +848,7 @@ abstract class AttributeQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -855,7 +858,7 @@ abstract class AttributeQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -865,7 +868,7 @@ abstract class AttributeQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -877,11 +880,11 @@ abstract class AttributeQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -896,10 +899,10 @@ abstract class AttributeQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildAttributeQuery The current query, for fluid interface + * @return ChildAttributeQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -916,11 +919,11 @@ abstract class AttributeQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildAttributeI18nQuery A secondary query class using the current class as primary query + * @return ChildAttributeI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/AttributeTemplate.php b/core/lib/Thelia/Model/Base/AttributeTemplate.php index 8f05b01cf..144510c25 100644 --- a/core/lib/Thelia/Model/Base/AttributeTemplate.php +++ b/core/lib/Thelia/Model/Base/AttributeTemplate.php @@ -31,6 +31,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeTemplateTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -320,9 +321,9 @@ abstract class AttributeTemplate implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return AttributeTemplate The current object, for fluid interface */ @@ -372,40 +373,44 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [attribute_id] column value. * - * @return int + * @return int */ public function getAttributeId() { + return $this->attribute_id; } /** * Get the [template_id] column value. * - * @return int + * @return int */ public function getTemplateId() { + return $this->template_id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -413,8 +418,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -433,8 +438,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -452,8 +457,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) */ public function setId($v) { @@ -466,14 +471,15 @@ abstract class AttributeTemplate implements ActiveRecordInterface $this->modifiedColumns[AttributeTemplateTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [attribute_id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) */ public function setAttributeId($v) { @@ -490,14 +496,15 @@ abstract class AttributeTemplate implements ActiveRecordInterface $this->aAttribute = null; } + return $this; } // setAttributeId() /** * Set the value of [template_id] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) */ public function setTemplateId($v) { @@ -514,14 +521,15 @@ abstract class AttributeTemplate implements ActiveRecordInterface $this->aTemplate = null; } + return $this; } // setTemplateId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) */ public function setPosition($v) { @@ -534,15 +542,16 @@ abstract class AttributeTemplate implements ActiveRecordInterface $this->modifiedColumns[AttributeTemplateTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -554,15 +563,16 @@ abstract class AttributeTemplate implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -574,6 +584,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -680,10 +691,10 @@ abstract class AttributeTemplate implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -720,7 +731,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see AttributeTemplate::setDeleted() @@ -763,8 +774,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -825,8 +836,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -876,7 +887,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -960,7 +971,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -976,12 +987,12 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -995,7 +1006,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1031,12 +1042,12 @@ abstract class AttributeTemplate implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1075,12 +1086,12 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1094,8 +1105,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1135,8 +1146,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1166,6 +1177,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface if ($this->isColumnModified(AttributeTemplateTableMap::POSITION)) $criteria->add(AttributeTemplateTableMap::POSITION, $this->position); if ($this->isColumnModified(AttributeTemplateTableMap::CREATED_AT)) $criteria->add(AttributeTemplateTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AttributeTemplateTableMap::UPDATED_AT)) $criteria->add(AttributeTemplateTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1187,7 +1199,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1197,7 +1209,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1211,6 +1223,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1220,9 +1233,9 @@ abstract class AttributeTemplate implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\AttributeTemplate (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\AttributeTemplate (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1246,8 +1259,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\AttributeTemplate Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\AttributeTemplate Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1263,8 +1276,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Declares an association between this object and a ChildAttribute object. * - * @param ChildAttribute $v - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param ChildAttribute $v + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) * @throws PropelException */ public function setAttribute(ChildAttribute $v = null) @@ -1283,6 +1296,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface $v->addAttributeTemplate($this); } + return $this; } @@ -1290,8 +1304,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Get the associated ChildAttribute object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAttribute The associated ChildAttribute object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAttribute The associated ChildAttribute object. * @throws PropelException */ public function getAttribute(ConnectionInterface $con = null) @@ -1313,8 +1327,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Declares an association between this object and a ChildTemplate object. * - * @param ChildTemplate $v - * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) + * @param ChildTemplate $v + * @return \Thelia\Model\AttributeTemplate The current object (for fluent API support) * @throws PropelException */ public function setTemplate(ChildTemplate $v = null) @@ -1333,6 +1347,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface $v->addAttributeTemplate($this); } + return $this; } @@ -1340,8 +1355,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Get the associated ChildTemplate object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTemplate The associated ChildTemplate object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTemplate The associated ChildTemplate object. * @throws PropelException */ public function getTemplate(ConnectionInterface $con = null) @@ -1385,7 +1400,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1411,7 +1426,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildAttributeTemplate The current object (for fluent API support) + * @return ChildAttributeTemplate The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/AttributeTemplateQuery.php b/core/lib/Thelia/Model/Base/AttributeTemplateQuery.php index 0cc79c76a..bbfd77ebb 100644 --- a/core/lib/Thelia/Model/Base/AttributeTemplateQuery.php +++ b/core/lib/Thelia/Model/Base/AttributeTemplateQuery.php @@ -71,9 +71,9 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\AttributeTemplateQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\AttributeTemplate', $modelAlias = null) { @@ -83,8 +83,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Returns a new ChildAttributeTemplateQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildAttributeTemplateQuery */ @@ -113,7 +113,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildAttributeTemplate|array|mixed the result, formatted by the current formatter @@ -144,10 +144,10 @@ abstract class AttributeTemplateQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildAttributeTemplate A model object, or null if the key is not found + * @return ChildAttributeTemplate A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -174,8 +174,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildAttributeTemplate|array|mixed the result, formatted by the current formatter */ @@ -195,8 +195,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -217,24 +217,26 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(AttributeTemplateTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(AttributeTemplateTableMap::ID, $keys, Criteria::IN); } @@ -248,11 +250,11 @@ abstract class AttributeTemplateQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -291,11 +293,11 @@ abstract class AttributeTemplateQuery extends ModelCriteria * * @see filterByAttribute() * - * @param mixed $attributeId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $attributeId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -334,11 +336,11 @@ abstract class AttributeTemplateQuery extends ModelCriteria * * @see filterByTemplate() * - * @param mixed $templateId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $templateId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -375,11 +377,11 @@ abstract class AttributeTemplateQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -416,13 +418,13 @@ abstract class AttributeTemplateQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -459,13 +461,13 @@ abstract class AttributeTemplateQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -495,8 +497,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Attribute object * - * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -520,8 +522,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Attribute relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -554,11 +556,11 @@ abstract class AttributeTemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeQuery A secondary query class using the current class as primary query */ public function useAttributeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -570,8 +572,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Template object * - * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -595,8 +597,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Template relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -629,11 +631,11 @@ abstract class AttributeTemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query */ public function useTemplateQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -645,7 +647,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildAttributeTemplate $attributeTemplate Object to remove from the list of results + * @param ChildAttributeTemplate $attributeTemplate Object to remove from the list of results * * @return ChildAttributeTemplateQuery The current query, for fluid interface */ @@ -661,8 +663,8 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Deletes all rows from the attribute_template table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -693,13 +695,13 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildAttributeTemplate or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildAttributeTemplate object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildAttributeTemplate object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -719,6 +721,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + AttributeTemplateTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -737,9 +740,9 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildAttributeTemplateQuery The current query, for fluid interface + * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -749,9 +752,9 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildAttributeTemplateQuery The current query, for fluid interface + * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -761,7 +764,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildAttributeTemplateQuery The current query, for fluid interface + * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -771,7 +774,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildAttributeTemplateQuery The current query, for fluid interface + * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -781,7 +784,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildAttributeTemplateQuery The current query, for fluid interface + * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -791,7 +794,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildAttributeTemplateQuery The current query, for fluid interface + * @return ChildAttributeTemplateQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Cart.php b/core/lib/Thelia/Model/Base/Cart.php index 1d50f13d7..3d86fb87f 100644 --- a/core/lib/Thelia/Model/Base/Cart.php +++ b/core/lib/Thelia/Model/Base/Cart.php @@ -36,6 +36,7 @@ abstract class Cart implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CartTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -379,9 +380,9 @@ abstract class Cart implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Cart The current object, for fluid interface */ @@ -431,70 +432,77 @@ abstract class Cart implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [token] column value. * - * @return string + * @return string */ public function getToken() { + return $this->token; } /** * Get the [customer_id] column value. * - * @return int + * @return int */ public function getCustomerId() { + return $this->customer_id; } /** * Get the [address_delivery_id] column value. * - * @return int + * @return int */ public function getAddressDeliveryId() { + return $this->address_delivery_id; } /** * Get the [address_invoice_id] column value. * - * @return int + * @return int */ public function getAddressInvoiceId() { + return $this->address_invoice_id; } /** * Get the [currency_id] column value. * - * @return int + * @return int */ public function getCurrencyId() { + return $this->currency_id; } /** * Get the [discount] column value. * - * @return double + * @return double */ public function getDiscount() { + return $this->discount; } @@ -502,8 +510,8 @@ abstract class Cart implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -522,8 +530,8 @@ abstract class Cart implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -541,8 +549,8 @@ abstract class Cart implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setId($v) { @@ -555,14 +563,15 @@ abstract class Cart implements ActiveRecordInterface $this->modifiedColumns[CartTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [token] column. * - * @param string $v new value - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setToken($v) { @@ -575,14 +584,15 @@ abstract class Cart implements ActiveRecordInterface $this->modifiedColumns[CartTableMap::TOKEN] = true; } + return $this; } // setToken() /** * Set the value of [customer_id] column. * - * @param int $v new value - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setCustomerId($v) { @@ -599,14 +609,15 @@ abstract class Cart implements ActiveRecordInterface $this->aCustomer = null; } + return $this; } // setCustomerId() /** * Set the value of [address_delivery_id] column. * - * @param int $v new value - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setAddressDeliveryId($v) { @@ -623,14 +634,15 @@ abstract class Cart implements ActiveRecordInterface $this->aAddressRelatedByAddressDeliveryId = null; } + return $this; } // setAddressDeliveryId() /** * Set the value of [address_invoice_id] column. * - * @param int $v new value - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setAddressInvoiceId($v) { @@ -647,14 +659,15 @@ abstract class Cart implements ActiveRecordInterface $this->aAddressRelatedByAddressInvoiceId = null; } + return $this; } // setAddressInvoiceId() /** * Set the value of [currency_id] column. * - * @param int $v new value - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setCurrencyId($v) { @@ -671,14 +684,15 @@ abstract class Cart implements ActiveRecordInterface $this->aCurrency = null; } + return $this; } // setCurrencyId() /** * Set the value of [discount] column. * - * @param double $v new value - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setDiscount($v) { @@ -691,15 +705,16 @@ abstract class Cart implements ActiveRecordInterface $this->modifiedColumns[CartTableMap::DISCOUNT] = true; } + return $this; } // setDiscount() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -711,15 +726,16 @@ abstract class Cart implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -731,6 +747,7 @@ abstract class Cart implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -774,6 +791,7 @@ abstract class Cart implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CartTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -855,10 +873,10 @@ abstract class Cart implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -899,7 +917,7 @@ abstract class Cart implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Cart::setDeleted() @@ -942,8 +960,8 @@ abstract class Cart implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1004,8 +1022,8 @@ abstract class Cart implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1086,7 +1104,7 @@ abstract class Cart implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1188,7 +1206,7 @@ abstract class Cart implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1204,12 +1222,12 @@ abstract class Cart implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1223,7 +1241,7 @@ abstract class Cart implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1268,12 +1286,12 @@ abstract class Cart implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1324,12 +1342,12 @@ abstract class Cart implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1343,8 +1361,8 @@ abstract class Cart implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1393,8 +1411,8 @@ abstract class Cart implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1430,6 +1448,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->isColumnModified(CartTableMap::DISCOUNT)) $criteria->add(CartTableMap::DISCOUNT, $this->discount); if ($this->isColumnModified(CartTableMap::CREATED_AT)) $criteria->add(CartTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CartTableMap::UPDATED_AT)) $criteria->add(CartTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1451,7 +1470,7 @@ abstract class Cart implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1461,7 +1480,7 @@ abstract class Cart implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1475,6 +1494,7 @@ abstract class Cart implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1484,9 +1504,9 @@ abstract class Cart implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Cart (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Cart (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1527,8 +1547,8 @@ abstract class Cart implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Cart Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Cart Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1544,8 +1564,8 @@ abstract class Cart implements ActiveRecordInterface /** * Declares an association between this object and a ChildCustomer object. * - * @param ChildCustomer $v - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param ChildCustomer $v + * @return \Thelia\Model\Cart The current object (for fluent API support) * @throws PropelException */ public function setCustomer(ChildCustomer $v = null) @@ -1564,6 +1584,7 @@ abstract class Cart implements ActiveRecordInterface $v->addCart($this); } + return $this; } @@ -1571,8 +1592,8 @@ abstract class Cart implements ActiveRecordInterface /** * Get the associated ChildCustomer object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCustomer The associated ChildCustomer object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomer The associated ChildCustomer object. * @throws PropelException */ public function getCustomer(ConnectionInterface $con = null) @@ -1594,8 +1615,8 @@ abstract class Cart implements ActiveRecordInterface /** * Declares an association between this object and a ChildAddress object. * - * @param ChildAddress $v - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param ChildAddress $v + * @return \Thelia\Model\Cart The current object (for fluent API support) * @throws PropelException */ public function setAddressRelatedByAddressDeliveryId(ChildAddress $v = null) @@ -1614,6 +1635,7 @@ abstract class Cart implements ActiveRecordInterface $v->addCartRelatedByAddressDeliveryId($this); } + return $this; } @@ -1621,8 +1643,8 @@ abstract class Cart implements ActiveRecordInterface /** * Get the associated ChildAddress object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAddress The associated ChildAddress object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAddress The associated ChildAddress object. * @throws PropelException */ public function getAddressRelatedByAddressDeliveryId(ConnectionInterface $con = null) @@ -1644,8 +1666,8 @@ abstract class Cart implements ActiveRecordInterface /** * Declares an association between this object and a ChildAddress object. * - * @param ChildAddress $v - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param ChildAddress $v + * @return \Thelia\Model\Cart The current object (for fluent API support) * @throws PropelException */ public function setAddressRelatedByAddressInvoiceId(ChildAddress $v = null) @@ -1664,6 +1686,7 @@ abstract class Cart implements ActiveRecordInterface $v->addCartRelatedByAddressInvoiceId($this); } + return $this; } @@ -1671,8 +1694,8 @@ abstract class Cart implements ActiveRecordInterface /** * Get the associated ChildAddress object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildAddress The associated ChildAddress object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAddress The associated ChildAddress object. * @throws PropelException */ public function getAddressRelatedByAddressInvoiceId(ConnectionInterface $con = null) @@ -1694,8 +1717,8 @@ abstract class Cart implements ActiveRecordInterface /** * Declares an association between this object and a ChildCurrency object. * - * @param ChildCurrency $v - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param ChildCurrency $v + * @return \Thelia\Model\Cart The current object (for fluent API support) * @throws PropelException */ public function setCurrency(ChildCurrency $v = null) @@ -1714,6 +1737,7 @@ abstract class Cart implements ActiveRecordInterface $v->addCart($this); } + return $this; } @@ -1721,8 +1745,8 @@ abstract class Cart implements ActiveRecordInterface /** * Get the associated ChildCurrency object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCurrency The associated ChildCurrency object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCurrency The associated ChildCurrency object. * @throws PropelException */ public function getCurrency(ConnectionInterface $con = null) @@ -1747,7 +1771,7 @@ abstract class Cart implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1786,8 +1810,8 @@ abstract class Cart implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1809,8 +1833,8 @@ abstract class Cart implements ActiveRecordInterface * If this ChildCart is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCartItem[] List of ChildCartItem objects * @throws PropelException */ @@ -1866,14 +1890,15 @@ abstract class Cart implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $cartItems A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCart The current object (for fluent API support) + * @param Collection $cartItems A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCart The current object (for fluent API support) */ public function setCartItems(Collection $cartItems, ConnectionInterface $con = null) { $cartItemsToDelete = $this->getCartItems(new Criteria(), $con)->diff($cartItems); + $this->cartItemsScheduledForDeletion = $cartItemsToDelete; foreach ($cartItemsToDelete as $cartItemRemoved) { @@ -1894,10 +1919,10 @@ abstract class Cart implements ActiveRecordInterface /** * Returns the number of related CartItem objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CartItem objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CartItem objects. * @throws PropelException */ public function countCartItems(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1929,8 +1954,8 @@ abstract class Cart implements ActiveRecordInterface * Method called to associate a ChildCartItem object to this object * through the ChildCartItem foreign key attribute. * - * @param ChildCartItem $l ChildCartItem - * @return \Thelia\Model\Cart The current object (for fluent API support) + * @param ChildCartItem $l ChildCartItem + * @return \Thelia\Model\Cart The current object (for fluent API support) */ public function addCartItem(ChildCartItem $l) { @@ -1956,7 +1981,7 @@ abstract class Cart implements ActiveRecordInterface } /** - * @param CartItem $cartItem The cartItem object to remove. + * @param CartItem $cartItem The cartItem object to remove. * @return ChildCart The current object (for fluent API support) */ public function removeCartItem($cartItem) @@ -1974,6 +1999,7 @@ abstract class Cart implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1985,9 +2011,9 @@ abstract class Cart implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Cart. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCartItem[] List of ChildCartItem objects */ public function getCartItemsJoinProduct($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1998,6 +2024,7 @@ abstract class Cart implements ActiveRecordInterface return $this->getCartItems($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2009,9 +2036,9 @@ abstract class Cart implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Cart. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCartItem[] List of ChildCartItem objects */ public function getCartItemsJoinProductSaleElements($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2051,7 +2078,7 @@ abstract class Cart implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2085,7 +2112,7 @@ abstract class Cart implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCart The current object (for fluent API support) + * @return ChildCart The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2170,6 +2197,7 @@ abstract class Cart implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/CartItem.php b/core/lib/Thelia/Model/Base/CartItem.php index 23a8f34b3..dcbba1ea6 100644 --- a/core/lib/Thelia/Model/Base/CartItem.php +++ b/core/lib/Thelia/Model/Base/CartItem.php @@ -33,6 +33,7 @@ abstract class CartItem implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CartItemTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -371,9 +372,9 @@ abstract class CartItem implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CartItem The current object, for fluid interface */ @@ -423,70 +424,77 @@ abstract class CartItem implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [cart_id] column value. * - * @return int + * @return int */ public function getCartId() { + return $this->cart_id; } /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [quantity] column value. * - * @return double + * @return double */ public function getQuantity() { + return $this->quantity; } /** * Get the [product_sale_elements_id] column value. * - * @return int + * @return int */ public function getProductSaleElementsId() { + return $this->product_sale_elements_id; } /** * Get the [price] column value. * - * @return double + * @return double */ public function getPrice() { + return $this->price; } /** * Get the [promo_price] column value. * - * @return double + * @return double */ public function getPromoPrice() { + return $this->promo_price; } @@ -494,8 +502,8 @@ abstract class CartItem implements ActiveRecordInterface * Get the [optionally formatted] temporal [price_end_of_life] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -513,10 +521,11 @@ abstract class CartItem implements ActiveRecordInterface /** * Get the [promo] column value. * - * @return int + * @return int */ public function getPromo() { + return $this->promo; } @@ -524,8 +533,8 @@ abstract class CartItem implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -544,8 +553,8 @@ abstract class CartItem implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -563,8 +572,8 @@ abstract class CartItem implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setId($v) { @@ -577,14 +586,15 @@ abstract class CartItem implements ActiveRecordInterface $this->modifiedColumns[CartItemTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [cart_id] column. * - * @param int $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setCartId($v) { @@ -601,14 +611,15 @@ abstract class CartItem implements ActiveRecordInterface $this->aCart = null; } + return $this; } // setCartId() /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setProductId($v) { @@ -625,14 +636,15 @@ abstract class CartItem implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setProductId() /** * Set the value of [quantity] column. * - * @param double $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setQuantity($v) { @@ -645,14 +657,15 @@ abstract class CartItem implements ActiveRecordInterface $this->modifiedColumns[CartItemTableMap::QUANTITY] = true; } + return $this; } // setQuantity() /** * Set the value of [product_sale_elements_id] column. * - * @param int $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setProductSaleElementsId($v) { @@ -669,14 +682,15 @@ abstract class CartItem implements ActiveRecordInterface $this->aProductSaleElements = null; } + return $this; } // setProductSaleElementsId() /** * Set the value of [price] column. * - * @param double $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setPrice($v) { @@ -689,14 +703,15 @@ abstract class CartItem implements ActiveRecordInterface $this->modifiedColumns[CartItemTableMap::PRICE] = true; } + return $this; } // setPrice() /** * Set the value of [promo_price] column. * - * @param double $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setPromoPrice($v) { @@ -709,15 +724,16 @@ abstract class CartItem implements ActiveRecordInterface $this->modifiedColumns[CartItemTableMap::PROMO_PRICE] = true; } + return $this; } // setPromoPrice() /** * Sets the value of [price_end_of_life] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setPriceEndOfLife($v) { @@ -729,14 +745,15 @@ abstract class CartItem implements ActiveRecordInterface } } // if either are not null + return $this; } // setPriceEndOfLife() /** * Set the value of [promo] column. * - * @param int $v new value - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setPromo($v) { @@ -749,15 +766,16 @@ abstract class CartItem implements ActiveRecordInterface $this->modifiedColumns[CartItemTableMap::PROMO] = true; } + return $this; } // setPromo() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -769,15 +787,16 @@ abstract class CartItem implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CartItem The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -789,6 +808,7 @@ abstract class CartItem implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -832,6 +852,7 @@ abstract class CartItem implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CartItemTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -919,10 +940,10 @@ abstract class CartItem implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -960,7 +981,7 @@ abstract class CartItem implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CartItem::setDeleted() @@ -1003,8 +1024,8 @@ abstract class CartItem implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1065,8 +1086,8 @@ abstract class CartItem implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1123,7 +1144,7 @@ abstract class CartItem implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1237,7 +1258,7 @@ abstract class CartItem implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1253,12 +1274,12 @@ abstract class CartItem implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1272,7 +1293,7 @@ abstract class CartItem implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1323,12 +1344,12 @@ abstract class CartItem implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1375,12 +1396,12 @@ abstract class CartItem implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1394,8 +1415,8 @@ abstract class CartItem implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1450,8 +1471,8 @@ abstract class CartItem implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1491,6 +1512,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->isColumnModified(CartItemTableMap::PROMO)) $criteria->add(CartItemTableMap::PROMO, $this->promo); if ($this->isColumnModified(CartItemTableMap::CREATED_AT)) $criteria->add(CartItemTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CartItemTableMap::UPDATED_AT)) $criteria->add(CartItemTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1512,7 +1534,7 @@ abstract class CartItem implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1522,7 +1544,7 @@ abstract class CartItem implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1536,6 +1558,7 @@ abstract class CartItem implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1545,9 +1568,9 @@ abstract class CartItem implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CartItem (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CartItem (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1576,8 +1599,8 @@ abstract class CartItem implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CartItem Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CartItem Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1593,8 +1616,8 @@ abstract class CartItem implements ActiveRecordInterface /** * Declares an association between this object and a ChildCart object. * - * @param ChildCart $v - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param ChildCart $v + * @return \Thelia\Model\CartItem The current object (for fluent API support) * @throws PropelException */ public function setCart(ChildCart $v = null) @@ -1613,14 +1636,16 @@ abstract class CartItem implements ActiveRecordInterface $v->addCartItem($this); } + return $this; } + /** * Get the associated ChildCart object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCart The associated ChildCart object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCart The associated ChildCart object. * @throws PropelException */ public function getCart(ConnectionInterface $con = null) @@ -1642,8 +1667,8 @@ abstract class CartItem implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\CartItem The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1662,14 +1687,16 @@ abstract class CartItem implements ActiveRecordInterface $v->addCartItem($this); } + return $this; } + /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1691,8 +1718,8 @@ abstract class CartItem implements ActiveRecordInterface /** * Declares an association between this object and a ChildProductSaleElements object. * - * @param ChildProductSaleElements $v - * @return \Thelia\Model\CartItem The current object (for fluent API support) + * @param ChildProductSaleElements $v + * @return \Thelia\Model\CartItem The current object (for fluent API support) * @throws PropelException */ public function setProductSaleElements(ChildProductSaleElements $v = null) @@ -1711,14 +1738,16 @@ abstract class CartItem implements ActiveRecordInterface $v->addCartItem($this); } + return $this; } + /** * Get the associated ChildProductSaleElements object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProductSaleElements The associated ChildProductSaleElements object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProductSaleElements The associated ChildProductSaleElements object. * @throws PropelException */ public function getProductSaleElements(ConnectionInterface $con = null) @@ -1768,7 +1797,7 @@ abstract class CartItem implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1795,7 +1824,7 @@ abstract class CartItem implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCartItem The current object (for fluent API support) + * @return ChildCartItem The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1880,6 +1909,7 @@ abstract class CartItem implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/CartItemQuery.php b/core/lib/Thelia/Model/Base/CartItemQuery.php index 129b1f4c6..9e7e675d1 100644 --- a/core/lib/Thelia/Model/Base/CartItemQuery.php +++ b/core/lib/Thelia/Model/Base/CartItemQuery.php @@ -95,9 +95,9 @@ abstract class CartItemQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CartItemQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CartItem', $modelAlias = null) { @@ -107,8 +107,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Returns a new ChildCartItemQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCartItemQuery */ @@ -137,7 +137,7 @@ abstract class CartItemQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCartItem|array|mixed the result, formatted by the current formatter @@ -168,10 +168,10 @@ abstract class CartItemQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCartItem A model object, or null if the key is not found + * @return ChildCartItem A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -198,8 +198,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCartItem|array|mixed the result, formatted by the current formatter */ @@ -219,8 +219,8 @@ abstract class CartItemQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -241,24 +241,26 @@ abstract class CartItemQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCartItemQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CartItemTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCartItemQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CartItemTableMap::ID, $keys, Criteria::IN); } @@ -272,11 +274,11 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -315,11 +317,11 @@ abstract class CartItemQuery extends ModelCriteria * * @see filterByCart() * - * @param mixed $cartId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $cartId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -358,11 +360,11 @@ abstract class CartItemQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -399,11 +401,11 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterByQuantity(array('min' => 12)); // WHERE quantity > 12 * * - * @param mixed $quantity The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $quantity The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -442,11 +444,11 @@ abstract class CartItemQuery extends ModelCriteria * * @see filterByProductSaleElements() * - * @param mixed $productSaleElementsId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productSaleElementsId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -483,11 +485,11 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterByPrice(array('min' => 12)); // WHERE price > 12 * * - * @param mixed $price The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $price The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -524,11 +526,11 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterByPromoPrice(array('min' => 12)); // WHERE promo_price > 12 * * - * @param mixed $promoPrice The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $promoPrice The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -565,13 +567,13 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterByPriceEndOfLife(array('max' => 'yesterday')); // WHERE price_end_of_life > '2011-03-13' * * - * @param mixed $priceEndOfLife The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $priceEndOfLife The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -608,11 +610,11 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterByPromo(array('min' => 12)); // WHERE promo > 12 * * - * @param mixed $promo The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $promo The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -649,13 +651,13 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -692,13 +694,13 @@ abstract class CartItemQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -728,8 +730,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Cart object * - * @param \Thelia\Model\Cart|ObjectCollection $cart The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Cart|ObjectCollection $cart The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -753,8 +755,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Cart relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -787,11 +789,11 @@ abstract class CartItemQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query */ public function useCartQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -803,8 +805,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -828,8 +830,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -862,11 +864,11 @@ abstract class CartItemQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -879,7 +881,7 @@ abstract class CartItemQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ProductSaleElements object * * @param \Thelia\Model\ProductSaleElements|ObjectCollection $productSaleElements The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -903,8 +905,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductSaleElements relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -937,11 +939,11 @@ abstract class CartItemQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query */ public function useProductSaleElementsQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -953,7 +955,7 @@ abstract class CartItemQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCartItem $cartItem Object to remove from the list of results + * @param ChildCartItem $cartItem Object to remove from the list of results * * @return ChildCartItemQuery The current query, for fluid interface */ @@ -969,8 +971,8 @@ abstract class CartItemQuery extends ModelCriteria /** * Deletes all rows from the cart_item table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1001,13 +1003,13 @@ abstract class CartItemQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCartItem or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCartItem object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCartItem object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1027,6 +1029,7 @@ abstract class CartItemQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CartItemTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1045,9 +1048,9 @@ abstract class CartItemQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCartItemQuery The current query, for fluid interface + * @return ChildCartItemQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1057,9 +1060,9 @@ abstract class CartItemQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCartItemQuery The current query, for fluid interface + * @return ChildCartItemQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1069,7 +1072,7 @@ abstract class CartItemQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCartItemQuery The current query, for fluid interface + * @return ChildCartItemQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1079,7 +1082,7 @@ abstract class CartItemQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCartItemQuery The current query, for fluid interface + * @return ChildCartItemQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1089,7 +1092,7 @@ abstract class CartItemQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCartItemQuery The current query, for fluid interface + * @return ChildCartItemQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1099,7 +1102,7 @@ abstract class CartItemQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCartItemQuery The current query, for fluid interface + * @return ChildCartItemQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/CartQuery.php b/core/lib/Thelia/Model/Base/CartQuery.php index b2c941fc5..9fbd97a12 100644 --- a/core/lib/Thelia/Model/Base/CartQuery.php +++ b/core/lib/Thelia/Model/Base/CartQuery.php @@ -95,9 +95,9 @@ abstract class CartQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CartQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Cart', $modelAlias = null) { @@ -107,8 +107,8 @@ abstract class CartQuery extends ModelCriteria /** * Returns a new ChildCartQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCartQuery */ @@ -137,7 +137,7 @@ abstract class CartQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCart|array|mixed the result, formatted by the current formatter @@ -168,10 +168,10 @@ abstract class CartQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCart A model object, or null if the key is not found + * @return ChildCart A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -198,8 +198,8 @@ abstract class CartQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCart|array|mixed the result, formatted by the current formatter */ @@ -219,8 +219,8 @@ abstract class CartQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -241,24 +241,26 @@ abstract class CartQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCartQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CartTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCartQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CartTableMap::ID, $keys, Criteria::IN); } @@ -272,11 +274,11 @@ abstract class CartQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -312,9 +314,9 @@ abstract class CartQuery extends ModelCriteria * $query->filterByToken('%fooValue%'); // WHERE token LIKE '%fooValue%' * * - * @param string $token The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $token The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -344,11 +346,11 @@ abstract class CartQuery extends ModelCriteria * * @see filterByCustomer() * - * @param mixed $customerId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $customerId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -387,11 +389,11 @@ abstract class CartQuery extends ModelCriteria * * @see filterByAddressRelatedByAddressDeliveryId() * - * @param mixed $addressDeliveryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $addressDeliveryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -430,11 +432,11 @@ abstract class CartQuery extends ModelCriteria * * @see filterByAddressRelatedByAddressInvoiceId() * - * @param mixed $addressInvoiceId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $addressInvoiceId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -473,11 +475,11 @@ abstract class CartQuery extends ModelCriteria * * @see filterByCurrency() * - * @param mixed $currencyId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $currencyId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -514,11 +516,11 @@ abstract class CartQuery extends ModelCriteria * $query->filterByDiscount(array('min' => 12)); // WHERE discount > 12 * * - * @param mixed $discount The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $discount The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -555,13 +557,13 @@ abstract class CartQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -598,13 +600,13 @@ abstract class CartQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -634,8 +636,8 @@ abstract class CartQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Customer object * - * @param \Thelia\Model\Customer|ObjectCollection $customer The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Customer|ObjectCollection $customer The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -659,8 +661,8 @@ abstract class CartQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Customer relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartQuery The current query, for fluid interface */ @@ -693,11 +695,11 @@ abstract class CartQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query */ public function useCustomerQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -709,8 +711,8 @@ abstract class CartQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Address object * - * @param \Thelia\Model\Address|ObjectCollection $address The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Address|ObjectCollection $address The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -734,8 +736,8 @@ abstract class CartQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AddressRelatedByAddressDeliveryId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartQuery The current query, for fluid interface */ @@ -768,11 +770,11 @@ abstract class CartQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query */ public function useAddressRelatedByAddressDeliveryIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -784,8 +786,8 @@ abstract class CartQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Address object * - * @param \Thelia\Model\Address|ObjectCollection $address The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Address|ObjectCollection $address The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -809,8 +811,8 @@ abstract class CartQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AddressRelatedByAddressInvoiceId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartQuery The current query, for fluid interface */ @@ -843,11 +845,11 @@ abstract class CartQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query */ public function useAddressRelatedByAddressInvoiceIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -859,8 +861,8 @@ abstract class CartQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Currency object * - * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -884,8 +886,8 @@ abstract class CartQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Currency relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartQuery The current query, for fluid interface */ @@ -918,11 +920,11 @@ abstract class CartQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query */ public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -934,8 +936,8 @@ abstract class CartQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CartItem object * - * @param \Thelia\Model\CartItem|ObjectCollection $cartItem the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CartItem|ObjectCollection $cartItem the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCartQuery The current query, for fluid interface */ @@ -957,8 +959,8 @@ abstract class CartQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CartItem relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCartQuery The current query, for fluid interface */ @@ -991,11 +993,11 @@ abstract class CartQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartItemQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartItemQuery A secondary query class using the current class as primary query */ public function useCartItemQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1007,7 +1009,7 @@ abstract class CartQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCart $cart Object to remove from the list of results + * @param ChildCart $cart Object to remove from the list of results * * @return ChildCartQuery The current query, for fluid interface */ @@ -1023,8 +1025,8 @@ abstract class CartQuery extends ModelCriteria /** * Deletes all rows from the cart table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1055,13 +1057,13 @@ abstract class CartQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCart or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCart object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCart object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1081,6 +1083,7 @@ abstract class CartQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CartTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1099,9 +1102,9 @@ abstract class CartQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCartQuery The current query, for fluid interface + * @return ChildCartQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1111,9 +1114,9 @@ abstract class CartQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCartQuery The current query, for fluid interface + * @return ChildCartQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1123,7 +1126,7 @@ abstract class CartQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCartQuery The current query, for fluid interface + * @return ChildCartQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1133,7 +1136,7 @@ abstract class CartQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCartQuery The current query, for fluid interface + * @return ChildCartQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1143,7 +1146,7 @@ abstract class CartQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCartQuery The current query, for fluid interface + * @return ChildCartQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1153,7 +1156,7 @@ abstract class CartQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCartQuery The current query, for fluid interface + * @return ChildCartQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Category.php b/core/lib/Thelia/Model/Base/Category.php index 19220876b..dc15b8fad 100644 --- a/core/lib/Thelia/Model/Base/Category.php +++ b/core/lib/Thelia/Model/Base/Category.php @@ -43,6 +43,7 @@ abstract class Category implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -189,6 +190,7 @@ abstract class Category implements ActiveRecordInterface // versionable behavior + /** * @var bool */ @@ -458,9 +460,9 @@ abstract class Category implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Category The current object, for fluid interface */ @@ -510,40 +512,44 @@ abstract class Category implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [parent] column value. * - * @return int + * @return int */ public function getParent() { + return $this->parent; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -551,8 +557,8 @@ abstract class Category implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -571,8 +577,8 @@ abstract class Category implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -590,10 +596,11 @@ abstract class Category implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -601,8 +608,8 @@ abstract class Category implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -620,18 +627,19 @@ abstract class Category implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setId($v) { @@ -644,14 +652,15 @@ abstract class Category implements ActiveRecordInterface $this->modifiedColumns[CategoryTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [parent] column. * - * @param int $v new value - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setParent($v) { @@ -664,14 +673,15 @@ abstract class Category implements ActiveRecordInterface $this->modifiedColumns[CategoryTableMap::PARENT] = true; } + return $this; } // setParent() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setVisible($v) { @@ -684,14 +694,15 @@ abstract class Category implements ActiveRecordInterface $this->modifiedColumns[CategoryTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setPosition($v) { @@ -704,15 +715,16 @@ abstract class Category implements ActiveRecordInterface $this->modifiedColumns[CategoryTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -724,15 +736,16 @@ abstract class Category implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -744,14 +757,15 @@ abstract class Category implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setVersion($v) { @@ -764,15 +778,16 @@ abstract class Category implements ActiveRecordInterface $this->modifiedColumns[CategoryTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -784,14 +799,15 @@ abstract class Category implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -804,6 +820,7 @@ abstract class Category implements ActiveRecordInterface $this->modifiedColumns[CategoryTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -847,6 +864,7 @@ abstract class Category implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CategoryTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -919,10 +937,10 @@ abstract class Category implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -970,7 +988,7 @@ abstract class Category implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Category::setDeleted() @@ -1013,8 +1031,8 @@ abstract class Category implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1087,8 +1105,8 @@ abstract class Category implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1248,7 +1266,7 @@ abstract class Category implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1350,7 +1368,7 @@ abstract class Category implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1366,12 +1384,12 @@ abstract class Category implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1385,7 +1403,7 @@ abstract class Category implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1430,12 +1448,12 @@ abstract class Category implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1489,12 +1507,12 @@ abstract class Category implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1508,8 +1526,8 @@ abstract class Category implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1558,8 +1576,8 @@ abstract class Category implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1595,6 +1613,7 @@ abstract class Category implements ActiveRecordInterface if ($this->isColumnModified(CategoryTableMap::VERSION)) $criteria->add(CategoryTableMap::VERSION, $this->version); if ($this->isColumnModified(CategoryTableMap::VERSION_CREATED_AT)) $criteria->add(CategoryTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(CategoryTableMap::VERSION_CREATED_BY)) $criteria->add(CategoryTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1616,7 +1635,7 @@ abstract class Category implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1626,7 +1645,7 @@ abstract class Category implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1640,6 +1659,7 @@ abstract class Category implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1649,9 +1669,9 @@ abstract class Category implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Category (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Category (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1722,8 +1742,8 @@ abstract class Category implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Category Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Category Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1736,12 +1756,13 @@ abstract class Category implements ActiveRecordInterface return $copyObj; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1795,8 +1816,8 @@ abstract class Category implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1818,8 +1839,8 @@ abstract class Category implements ActiveRecordInterface * If this ChildCategory is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductCategory[] List of ChildProductCategory objects * @throws PropelException */ @@ -1875,9 +1896,9 @@ abstract class Category implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productCategories A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategory The current object (for fluent API support) + * @param Collection $productCategories A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategory The current object (for fluent API support) */ public function setProductCategories(Collection $productCategories, ConnectionInterface $con = null) { @@ -1907,10 +1928,10 @@ abstract class Category implements ActiveRecordInterface /** * Returns the number of related ProductCategory objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductCategory objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductCategory objects. * @throws PropelException */ public function countProductCategories(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1942,8 +1963,8 @@ abstract class Category implements ActiveRecordInterface * Method called to associate a ChildProductCategory object to this object * through the ChildProductCategory foreign key attribute. * - * @param ChildProductCategory $l ChildProductCategory - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param ChildProductCategory $l ChildProductCategory + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function addProductCategory(ChildProductCategory $l) { @@ -1970,7 +1991,7 @@ abstract class Category implements ActiveRecordInterface /** * @param ProductCategory $productCategory The productCategory object to remove. - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function removeProductCategory($productCategory) { @@ -1999,9 +2020,9 @@ abstract class Category implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Category. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProductCategory[] List of ChildProductCategory objects */ public function getProductCategoriesJoinProduct($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2041,8 +2062,8 @@ abstract class Category implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2064,8 +2085,8 @@ abstract class Category implements ActiveRecordInterface * If this ChildCategory is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryImage[] List of ChildCategoryImage objects * @throws PropelException */ @@ -2121,9 +2142,9 @@ abstract class Category implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryImages A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategory The current object (for fluent API support) + * @param Collection $categoryImages A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategory The current object (for fluent API support) */ public function setCategoryImages(Collection $categoryImages, ConnectionInterface $con = null) { @@ -2150,10 +2171,10 @@ abstract class Category implements ActiveRecordInterface /** * Returns the number of related CategoryImage objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryImage objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryImage objects. * @throws PropelException */ public function countCategoryImages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2185,8 +2206,8 @@ abstract class Category implements ActiveRecordInterface * Method called to associate a ChildCategoryImage object to this object * through the ChildCategoryImage foreign key attribute. * - * @param ChildCategoryImage $l ChildCategoryImage - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param ChildCategoryImage $l ChildCategoryImage + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function addCategoryImage(ChildCategoryImage $l) { @@ -2259,8 +2280,8 @@ abstract class Category implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2282,8 +2303,8 @@ abstract class Category implements ActiveRecordInterface * If this ChildCategory is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryDocument[] List of ChildCategoryDocument objects * @throws PropelException */ @@ -2339,9 +2360,9 @@ abstract class Category implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryDocuments A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategory The current object (for fluent API support) + * @param Collection $categoryDocuments A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategory The current object (for fluent API support) */ public function setCategoryDocuments(Collection $categoryDocuments, ConnectionInterface $con = null) { @@ -2368,10 +2389,10 @@ abstract class Category implements ActiveRecordInterface /** * Returns the number of related CategoryDocument objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryDocument objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryDocument objects. * @throws PropelException */ public function countCategoryDocuments(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2403,8 +2424,8 @@ abstract class Category implements ActiveRecordInterface * Method called to associate a ChildCategoryDocument object to this object * through the ChildCategoryDocument foreign key attribute. * - * @param ChildCategoryDocument $l ChildCategoryDocument - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param ChildCategoryDocument $l ChildCategoryDocument + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function addCategoryDocument(ChildCategoryDocument $l) { @@ -2431,7 +2452,7 @@ abstract class Category implements ActiveRecordInterface /** * @param CategoryDocument $categoryDocument The categoryDocument object to remove. - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function removeCategoryDocument($categoryDocument) { @@ -2477,8 +2498,8 @@ abstract class Category implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2500,8 +2521,8 @@ abstract class Category implements ActiveRecordInterface * If this ChildCategory is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryAssociatedContent[] List of ChildCategoryAssociatedContent objects * @throws PropelException */ @@ -2557,9 +2578,9 @@ abstract class Category implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryAssociatedContents A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategory The current object (for fluent API support) + * @param Collection $categoryAssociatedContents A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategory The current object (for fluent API support) */ public function setCategoryAssociatedContents(Collection $categoryAssociatedContents, ConnectionInterface $con = null) { @@ -2586,10 +2607,10 @@ abstract class Category implements ActiveRecordInterface /** * Returns the number of related CategoryAssociatedContent objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryAssociatedContent objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryAssociatedContent objects. * @throws PropelException */ public function countCategoryAssociatedContents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2621,8 +2642,8 @@ abstract class Category implements ActiveRecordInterface * Method called to associate a ChildCategoryAssociatedContent object to this object * through the ChildCategoryAssociatedContent foreign key attribute. * - * @param ChildCategoryAssociatedContent $l ChildCategoryAssociatedContent - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param ChildCategoryAssociatedContent $l ChildCategoryAssociatedContent + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function addCategoryAssociatedContent(ChildCategoryAssociatedContent $l) { @@ -2649,7 +2670,7 @@ abstract class Category implements ActiveRecordInterface /** * @param CategoryAssociatedContent $categoryAssociatedContent The categoryAssociatedContent object to remove. - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function removeCategoryAssociatedContent($categoryAssociatedContent) { @@ -2678,9 +2699,9 @@ abstract class Category implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Category. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCategoryAssociatedContent[] List of ChildCategoryAssociatedContent objects */ public function getCategoryAssociatedContentsJoinContent($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2720,8 +2741,8 @@ abstract class Category implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2743,8 +2764,8 @@ abstract class Category implements ActiveRecordInterface * If this ChildCategory is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryI18n[] List of ChildCategoryI18n objects * @throws PropelException */ @@ -2800,9 +2821,9 @@ abstract class Category implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategory The current object (for fluent API support) + * @param Collection $categoryI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategory The current object (for fluent API support) */ public function setCategoryI18ns(Collection $categoryI18ns, ConnectionInterface $con = null) { @@ -2832,10 +2853,10 @@ abstract class Category implements ActiveRecordInterface /** * Returns the number of related CategoryI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryI18n objects. * @throws PropelException */ public function countCategoryI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2867,8 +2888,8 @@ abstract class Category implements ActiveRecordInterface * Method called to associate a ChildCategoryI18n object to this object * through the ChildCategoryI18n foreign key attribute. * - * @param ChildCategoryI18n $l ChildCategoryI18n - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param ChildCategoryI18n $l ChildCategoryI18n + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function addCategoryI18n(ChildCategoryI18n $l) { @@ -2898,7 +2919,7 @@ abstract class Category implements ActiveRecordInterface } /** - * @param CategoryI18n $categoryI18n The categoryI18n object to remove. + * @param CategoryI18n $categoryI18n The categoryI18n object to remove. * @return ChildCategory The current object (for fluent API support) */ public function removeCategoryI18n($categoryI18n) @@ -2945,8 +2966,8 @@ abstract class Category implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2968,8 +2989,8 @@ abstract class Category implements ActiveRecordInterface * If this ChildCategory is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryVersion[] List of ChildCategoryVersion objects * @throws PropelException */ @@ -3025,9 +3046,9 @@ abstract class Category implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryVersions A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategory The current object (for fluent API support) + * @param Collection $categoryVersions A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategory The current object (for fluent API support) */ public function setCategoryVersions(Collection $categoryVersions, ConnectionInterface $con = null) { @@ -3057,10 +3078,10 @@ abstract class Category implements ActiveRecordInterface /** * Returns the number of related CategoryVersion objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryVersion objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryVersion objects. * @throws PropelException */ public function countCategoryVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3092,8 +3113,8 @@ abstract class Category implements ActiveRecordInterface * Method called to associate a ChildCategoryVersion object to this object * through the ChildCategoryVersion foreign key attribute. * - * @param ChildCategoryVersion $l ChildCategoryVersion - * @return \Thelia\Model\Category The current object (for fluent API support) + * @param ChildCategoryVersion $l ChildCategoryVersion + * @return \Thelia\Model\Category The current object (for fluent API support) */ public function addCategoryVersion(ChildCategoryVersion $l) { @@ -3120,7 +3141,7 @@ abstract class Category implements ActiveRecordInterface /** * @param CategoryVersion $categoryVersion The categoryVersion object to remove. - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function removeCategoryVersion($categoryVersion) { @@ -3177,8 +3198,8 @@ abstract class Category implements ActiveRecordInterface * If this ChildCategory is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildProduct[] List of ChildProduct objects */ @@ -3208,9 +3229,9 @@ abstract class Category implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $products A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategory The current object (for fluent API support) + * @param Collection $products A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategory The current object (for fluent API support) */ public function setProducts(Collection $products, ConnectionInterface $con = null) { @@ -3234,9 +3255,9 @@ abstract class Category implements ActiveRecordInterface * Gets the number of ChildProduct objects related by a many-to-many relationship * to the current object by way of the product_category cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildProduct objects */ @@ -3264,7 +3285,7 @@ abstract class Category implements ActiveRecordInterface * Associate a ChildProduct object to this object * through the product_category cross reference table. * - * @param ChildProduct $product The ChildProductCategory object to relate + * @param ChildProduct $product The ChildProductCategory object to relate * @return ChildCategory The current object (for fluent API support) */ public function addProduct(ChildProduct $product) @@ -3282,7 +3303,7 @@ abstract class Category implements ActiveRecordInterface } /** - * @param Product $product The product object to add. + * @param Product $product The product object to add. */ protected function doAddProduct($product) { @@ -3301,7 +3322,7 @@ abstract class Category implements ActiveRecordInterface * Remove a ChildProduct object to this object * through the product_category cross reference table. * - * @param ChildProduct $product The ChildProductCategory object to relate + * @param ChildProduct $product The ChildProductCategory object to relate * @return ChildCategory The current object (for fluent API support) */ public function removeProduct(ChildProduct $product) @@ -3349,7 +3370,7 @@ abstract class Category implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -3419,9 +3440,9 @@ abstract class Category implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -3433,7 +3454,7 @@ abstract class Category implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -3443,8 +3464,8 @@ abstract class Category implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -3477,10 +3498,10 @@ abstract class Category implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -3505,7 +3526,7 @@ abstract class Category implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -3513,6 +3534,7 @@ abstract class Category implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -3523,6 +3545,7 @@ abstract class Category implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -3535,6 +3558,7 @@ abstract class Category implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -3545,6 +3569,7 @@ abstract class Category implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -3557,6 +3582,7 @@ abstract class Category implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -3567,6 +3593,7 @@ abstract class Category implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -3579,6 +3606,7 @@ abstract class Category implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -3589,6 +3617,7 @@ abstract class Category implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -3601,6 +3630,7 @@ abstract class Category implements ActiveRecordInterface return $this; } + /** * Get the [meta_title] column value. * @@ -3611,6 +3641,7 @@ abstract class Category implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaTitle(); } + /** * Set the value of [meta_title] column. * @@ -3623,6 +3654,7 @@ abstract class Category implements ActiveRecordInterface return $this; } + /** * Get the [meta_description] column value. * @@ -3633,6 +3665,7 @@ abstract class Category implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaDescription(); } + /** * Set the value of [meta_description] column. * @@ -3645,6 +3678,7 @@ abstract class Category implements ActiveRecordInterface return $this; } + /** * Get the [meta_keywords] column value. * @@ -3655,6 +3689,7 @@ abstract class Category implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaKeywords(); } + /** * Set the value of [meta_keywords] column. * @@ -3684,7 +3719,7 @@ abstract class Category implements ActiveRecordInterface /** * Checks whether the current state must be recorded as a version * - * @return boolean + * @return boolean */ public function isVersioningNecessary($con = null) { @@ -3706,9 +3741,9 @@ abstract class Category implements ActiveRecordInterface /** * Creates a version of the current object and saves it. * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ChildCategoryVersion A version object + * @return ChildCategoryVersion A version object */ public function addVersion($con = null) { @@ -3733,10 +3768,10 @@ abstract class Category implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con The connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con The connection to use * - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function toVersion($versionNumber, $con = null) { @@ -3752,9 +3787,9 @@ abstract class Category implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param ChildCategoryVersion $version The version object to use - * @param ConnectionInterface $con the connection to use - * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. + * @param ChildCategoryVersion $version The version object to use + * @param ConnectionInterface $con the connection to use + * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return ChildCategory The current object (for fluent API support) */ @@ -3777,9 +3812,9 @@ abstract class Category implements ActiveRecordInterface /** * Gets the latest persisted version number for the current object * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return integer + * @return integer */ public function getLastVersionNumber($con = null) { @@ -3797,9 +3832,9 @@ abstract class Category implements ActiveRecordInterface /** * Checks whether the current object is the latest one * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return Boolean + * @return Boolean */ public function isLastVersion($con = null) { @@ -3809,10 +3844,10 @@ abstract class Category implements ActiveRecordInterface /** * Retrieves a version object for this entity and a version number * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con the connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con the connection to use * - * @return ChildCategoryVersion A version object + * @return ChildCategoryVersion A version object */ public function getOneVersion($versionNumber, $con = null) { @@ -3825,9 +3860,9 @@ abstract class Category implements ActiveRecordInterface /** * Gets all the versions of this object, in incremental order * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ObjectCollection A list of ChildCategoryVersion objects + * @return ObjectCollection A list of ChildCategoryVersion objects */ public function getAllVersions($con = null) { @@ -3847,12 +3882,12 @@ abstract class Category implements ActiveRecordInterface * ); * * - * @param integer $versionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $versionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersion($versionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -3872,13 +3907,13 @@ abstract class Category implements ActiveRecordInterface * ); * * - * @param integer $fromVersionNumber - * @param integer $toVersionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $fromVersionNumber + * @param integer $toVersionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersions($fromVersionNumber, $toVersionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -3898,12 +3933,12 @@ abstract class Category implements ActiveRecordInterface * ); * * - * @param array $fromVersion An array representing the original version. - * @param array $toVersion An array representing the destination version. - * @param string $keys Main key used for the result diff (versions|columns). - * @param array $ignoredColumns The columns to exclude from the diff. + * @param array $fromVersion An array representing the original version. + * @param array $toVersion An array representing the destination version. + * @param string $keys Main key used for the result diff (versions|columns). + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ protected function computeDiff($fromVersion, $toVersion, $keys = 'columns', $ignoredColumns = array()) { @@ -3940,7 +3975,7 @@ abstract class Category implements ActiveRecordInterface /** * retrieve the last $number versions. * - * @param Integer $number the number of record to return. + * @param Integer $number the number of record to return. * @return PropelCollection|array \Thelia\Model\CategoryVersion[] List of \Thelia\Model\CategoryVersion objects */ public function getLastVersions($number = 10, $criteria = null, $con = null) @@ -3956,7 +3991,7 @@ abstract class Category implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCategory The current object (for fluent API support) + * @return ChildCategory The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php b/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php index 37ca71c40..4d754da4e 100644 --- a/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php +++ b/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php @@ -31,6 +31,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryAssociatedContentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -320,9 +321,9 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CategoryAssociatedContent The current object, for fluid interface */ @@ -372,40 +373,44 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [category_id] column value. * - * @return int + * @return int */ public function getCategoryId() { + return $this->category_id; } /** * Get the [content_id] column value. * - * @return int + * @return int */ public function getContentId() { + return $this->content_id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -413,8 +418,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -433,8 +438,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -452,8 +457,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) */ public function setId($v) { @@ -466,14 +471,15 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface $this->modifiedColumns[CategoryAssociatedContentTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [category_id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) */ public function setCategoryId($v) { @@ -490,14 +496,15 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface $this->aCategory = null; } + return $this; } // setCategoryId() /** * Set the value of [content_id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) */ public function setContentId($v) { @@ -514,14 +521,15 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface $this->aContent = null; } + return $this; } // setContentId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) */ public function setPosition($v) { @@ -534,15 +542,16 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface $this->modifiedColumns[CategoryAssociatedContentTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -554,15 +563,16 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -574,6 +584,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -680,10 +691,10 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -720,7 +731,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CategoryAssociatedContent::setDeleted() @@ -763,8 +774,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -825,8 +836,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -876,7 +887,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -960,7 +971,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -976,12 +987,12 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -995,7 +1006,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1031,12 +1042,12 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1075,12 +1086,12 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1094,8 +1105,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1135,8 +1146,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1166,6 +1177,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface if ($this->isColumnModified(CategoryAssociatedContentTableMap::POSITION)) $criteria->add(CategoryAssociatedContentTableMap::POSITION, $this->position); if ($this->isColumnModified(CategoryAssociatedContentTableMap::CREATED_AT)) $criteria->add(CategoryAssociatedContentTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CategoryAssociatedContentTableMap::UPDATED_AT)) $criteria->add(CategoryAssociatedContentTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1187,7 +1199,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1197,7 +1209,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1211,6 +1223,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1220,9 +1233,9 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CategoryAssociatedContent (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CategoryAssociatedContent (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1246,8 +1259,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CategoryAssociatedContent Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CategoryAssociatedContent Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1263,8 +1276,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategory object. * - * @param ChildCategory $v - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param ChildCategory $v + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) * @throws PropelException */ public function setCategory(ChildCategory $v = null) @@ -1283,6 +1296,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface $v->addCategoryAssociatedContent($this); } + return $this; } @@ -1290,8 +1304,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Get the associated ChildCategory object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategory The associated ChildCategory object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategory The associated ChildCategory object. * @throws PropelException */ public function getCategory(ConnectionInterface $con = null) @@ -1313,8 +1327,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Declares an association between this object and a ChildContent object. * - * @param ChildContent $v - * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) + * @param ChildContent $v + * @return \Thelia\Model\CategoryAssociatedContent The current object (for fluent API support) * @throws PropelException */ public function setContent(ChildContent $v = null) @@ -1333,6 +1347,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface $v->addCategoryAssociatedContent($this); } + return $this; } @@ -1340,8 +1355,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Get the associated ChildContent object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContent The associated ChildContent object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContent The associated ChildContent object. * @throws PropelException */ public function getContent(ConnectionInterface $con = null) @@ -1385,7 +1400,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1411,7 +1426,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCategoryAssociatedContent The current object (for fluent API support) + * @return ChildCategoryAssociatedContent The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/CategoryAssociatedContentQuery.php b/core/lib/Thelia/Model/Base/CategoryAssociatedContentQuery.php index fa76cb167..dd5238d83 100644 --- a/core/lib/Thelia/Model/Base/CategoryAssociatedContentQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryAssociatedContentQuery.php @@ -71,9 +71,9 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryAssociatedContentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CategoryAssociatedContent', $modelAlias = null) { @@ -83,8 +83,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Returns a new ChildCategoryAssociatedContentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryAssociatedContentQuery */ @@ -113,7 +113,7 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryAssociatedContent|array|mixed the result, formatted by the current formatter @@ -144,10 +144,10 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategoryAssociatedContent A model object, or null if the key is not found + * @return ChildCategoryAssociatedContent A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -174,8 +174,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategoryAssociatedContent|array|mixed the result, formatted by the current formatter */ @@ -195,8 +195,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -217,24 +217,26 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CategoryAssociatedContentTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CategoryAssociatedContentTableMap::ID, $keys, Criteria::IN); } @@ -248,11 +250,11 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -291,11 +293,11 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * * @see filterByCategory() * - * @param mixed $categoryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $categoryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -334,11 +336,11 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * * @see filterByContent() * - * @param mixed $contentId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $contentId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -375,11 +377,11 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -416,13 +418,13 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -459,13 +461,13 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -495,8 +497,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Category object * - * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -520,8 +522,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Category relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -554,11 +556,11 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query */ public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -570,8 +572,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Content object * - * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -595,8 +597,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Content relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -629,11 +631,11 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query */ public function useContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -645,7 +647,7 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategoryAssociatedContent $categoryAssociatedContent Object to remove from the list of results + * @param ChildCategoryAssociatedContent $categoryAssociatedContent Object to remove from the list of results * * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ @@ -661,8 +663,8 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Deletes all rows from the category_associated_content table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -693,13 +695,13 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategoryAssociatedContent or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategoryAssociatedContent object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategoryAssociatedContent object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -719,6 +721,7 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryAssociatedContentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -737,9 +740,9 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface + * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -749,9 +752,9 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface + * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -761,7 +764,7 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface + * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -771,7 +774,7 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface + * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -781,7 +784,7 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface + * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -791,7 +794,7 @@ abstract class CategoryAssociatedContentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface + * @return ChildCategoryAssociatedContentQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/CategoryDocument.php b/core/lib/Thelia/Model/Base/CategoryDocument.php index 1d6ddf2e7..035f4d0ff 100644 --- a/core/lib/Thelia/Model/Base/CategoryDocument.php +++ b/core/lib/Thelia/Model/Base/CategoryDocument.php @@ -32,6 +32,7 @@ abstract class CategoryDocument implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryDocumentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class CategoryDocument implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CategoryDocument The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [category_id] column value. * - * @return int + * @return int */ public function getCategoryId() { + return $this->category_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class CategoryDocument implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [category_id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) */ public function setCategoryId($v) { @@ -512,14 +518,15 @@ abstract class CategoryDocument implements ActiveRecordInterface $this->aCategory = null; } + return $this; } // setCategoryId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class CategoryDocument implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class CategoryDocument implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class CategoryDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class CategoryDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class CategoryDocument implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CategoryDocument::setDeleted() @@ -779,8 +790,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class CategoryDocument implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class CategoryDocument implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class CategoryDocument implements ActiveRecordInterface if ($this->isColumnModified(CategoryDocumentTableMap::POSITION)) $criteria->add(CategoryDocumentTableMap::POSITION, $this->position); if ($this->isColumnModified(CategoryDocumentTableMap::CREATED_AT)) $criteria->add(CategoryDocumentTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CategoryDocumentTableMap::UPDATED_AT)) $criteria->add(CategoryDocumentTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class CategoryDocument implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class CategoryDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CategoryDocument (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CategoryDocument (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CategoryDocument Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CategoryDocument Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategory object. * - * @param ChildCategory $v - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param ChildCategory $v + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) * @throws PropelException */ public function setCategory(ChildCategory $v = null) @@ -1323,14 +1336,16 @@ abstract class CategoryDocument implements ActiveRecordInterface $v->addCategoryDocument($this); } + return $this; } + /** * Get the associated ChildCategory object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategory The associated ChildCategory object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategory The associated ChildCategory object. * @throws PropelException */ public function getCategory(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class CategoryDocument implements ActiveRecordInterface return $this->aCategory; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * If this ChildCategoryDocument is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryDocumentI18n[] List of ChildCategoryDocumentI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class CategoryDocument implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryDocumentI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategoryDocument The current object (for fluent API support) + * @param Collection $categoryDocumentI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategoryDocument The current object (for fluent API support) */ public function setCategoryDocumentI18ns(Collection $categoryDocumentI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Returns the number of related CategoryDocumentI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryDocumentI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryDocumentI18n objects. * @throws PropelException */ public function countCategoryDocumentI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class CategoryDocument implements ActiveRecordInterface * Method called to associate a ChildCategoryDocumentI18n object to this object * through the ChildCategoryDocumentI18n foreign key attribute. * - * @param ChildCategoryDocumentI18n $l ChildCategoryDocumentI18n - * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) + * @param ChildCategoryDocumentI18n $l ChildCategoryDocumentI18n + * @return \Thelia\Model\CategoryDocument The current object (for fluent API support) */ public function addCategoryDocumentI18n(ChildCategoryDocumentI18n $l) { @@ -1571,7 +1587,7 @@ abstract class CategoryDocument implements ActiveRecordInterface } /** - * @param CategoryDocumentI18n $categoryDocumentI18n The categoryDocumentI18n object to remove. + * @param CategoryDocumentI18n $categoryDocumentI18n The categoryDocumentI18n object to remove. * @return ChildCategoryDocument The current object (for fluent API support) */ public function removeCategoryDocumentI18n($categoryDocumentI18n) @@ -1614,7 +1630,7 @@ abstract class CategoryDocument implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCategoryDocument The current object (for fluent API support) + * @return ChildCategoryDocument The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildCategoryDocument The current object (for fluent API support) + * @return ChildCategoryDocument The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryDocumentI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildCategoryDocument The current object (for fluent API support) + * @return ChildCategoryDocument The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class CategoryDocument implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryDocumentI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php b/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php index e7cf35e8e..15f3fcab5 100644 --- a/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php @@ -26,6 +26,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryDocumentI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CategoryDocumentI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface $this->aCategoryDocument = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryDocumentI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CategoryDocumentI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CategoryDocumentI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface if ($this->isColumnModified(CategoryDocumentI18nTableMap::DESCRIPTION)) $criteria->add(CategoryDocumentI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(CategoryDocumentI18nTableMap::CHAPO)) $criteria->add(CategoryDocumentI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(CategoryDocumentI18nTableMap::POSTSCRIPTUM)) $criteria->add(CategoryDocumentI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CategoryDocumentI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CategoryDocumentI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CategoryDocumentI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CategoryDocumentI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategoryDocument object. * - * @param ChildCategoryDocument $v - * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) + * @param ChildCategoryDocument $v + * @return \Thelia\Model\CategoryDocumentI18n The current object (for fluent API support) * @throws PropelException */ public function setCategoryDocument(ChildCategoryDocument $v = null) @@ -1231,14 +1247,16 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface $v->addCategoryDocumentI18n($this); } + return $this; } + /** * Get the associated ChildCategoryDocument object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategoryDocument The associated ChildCategoryDocument object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategoryDocument The associated ChildCategoryDocument object. * @throws PropelException */ public function getCategoryDocument(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CategoryDocumentI18nQuery.php b/core/lib/Thelia/Model/Base/CategoryDocumentI18nQuery.php index 2695037d8..d9dc050aa 100644 --- a/core/lib/Thelia/Model/Base/CategoryDocumentI18nQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryDocumentI18nQuery.php @@ -67,9 +67,9 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryDocumentI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CategoryDocumentI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Returns a new ChildCategoryDocumentI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryDocumentI18nQuery */ @@ -140,10 +140,10 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategoryDocumentI18n A model object, or null if the key is not found + * @return ChildCategoryDocumentI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategoryDocumentI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * * @see filterByCategoryDocument() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\CategoryDocument object * * @param \Thelia\Model\CategoryDocument|ObjectCollection $categoryDocument The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryDocumentQuery A secondary query class using the current class as primary query */ public function useCategoryDocumentQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategoryDocumentI18n $categoryDocumentI18n Object to remove from the list of results + * @param ChildCategoryDocumentI18n $categoryDocumentI18n Object to remove from the list of results * * @return ChildCategoryDocumentI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Deletes all rows from the category_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategoryDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategoryDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategoryDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class CategoryDocumentI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryDocumentI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/CategoryDocumentQuery.php b/core/lib/Thelia/Model/Base/CategoryDocumentQuery.php index be4b142c6..55fb01406 100644 --- a/core/lib/Thelia/Model/Base/CategoryDocumentQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryDocumentQuery.php @@ -72,9 +72,9 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryDocumentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CategoryDocument', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Returns a new ChildCategoryDocumentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryDocumentQuery */ @@ -114,7 +114,7 @@ abstract class CategoryDocumentQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryDocument|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class CategoryDocumentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategoryDocument A model object, or null if the key is not found + * @return ChildCategoryDocument A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategoryDocument|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CategoryDocumentTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CategoryDocumentTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class CategoryDocumentQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class CategoryDocumentQuery extends ModelCriteria * * @see filterByCategory() * - * @param mixed $categoryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $categoryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class CategoryDocumentQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class CategoryDocumentQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class CategoryDocumentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class CategoryDocumentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Category object * - * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Category relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class CategoryDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query */ public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryDocumentI18n object * - * @param \Thelia\Model\CategoryDocumentI18n|ObjectCollection $categoryDocumentI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryDocumentI18n|ObjectCollection $categoryDocumentI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryDocumentI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class CategoryDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryDocumentI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryDocumentI18nQuery A secondary query class using the current class as primary query */ public function useCategoryDocumentI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategoryDocument $categoryDocument Object to remove from the list of results + * @param ChildCategoryDocument $categoryDocument Object to remove from the list of results * * @return ChildCategoryDocumentQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Deletes all rows from the category_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategoryDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategoryDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategoryDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class CategoryDocumentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryDocumentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class CategoryDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class CategoryDocumentQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryDocumentQuery The current query, for fluid interface + * @return ChildCategoryDocumentQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class CategoryDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryDocumentI18nQuery A secondary query class using the current class as primary query + * @return ChildCategoryDocumentI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/CategoryI18n.php b/core/lib/Thelia/Model/Base/CategoryI18n.php index 538d27d4c..42db8b43f 100644 --- a/core/lib/Thelia/Model/Base/CategoryI18n.php +++ b/core/lib/Thelia/Model/Base/CategoryI18n.php @@ -26,6 +26,7 @@ abstract class CategoryI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class CategoryI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CategoryI18n The current object, for fluid interface */ @@ -394,98 +395,107 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Get the [meta_title] column value. * - * @return string + * @return string */ public function getMetaTitle() { + return $this->meta_title; } /** * Get the [meta_description] column value. * - * @return string + * @return string */ public function getMetaDescription() { + return $this->meta_description; } /** * Get the [meta_keywords] column value. * - * @return string + * @return string */ public function getMetaKeywords() { + return $this->meta_keywords; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setId($v) { @@ -502,14 +512,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->aCategory = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -522,14 +533,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -542,14 +554,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -562,14 +575,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -582,14 +596,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -602,14 +617,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() /** * Set the value of [meta_title] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setMetaTitle($v) { @@ -622,14 +638,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::META_TITLE] = true; } + return $this; } // setMetaTitle() /** * Set the value of [meta_description] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setMetaDescription($v) { @@ -642,14 +659,15 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::META_DESCRIPTION] = true; } + return $this; } // setMetaDescription() /** * Set the value of [meta_keywords] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) */ public function setMetaKeywords($v) { @@ -662,6 +680,7 @@ abstract class CategoryI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryI18nTableMap::META_KEYWORDS] = true; } + return $this; } // setMetaKeywords() @@ -705,6 +724,7 @@ abstract class CategoryI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CategoryI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -771,10 +791,10 @@ abstract class CategoryI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -810,7 +830,7 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CategoryI18n::setDeleted() @@ -853,8 +873,8 @@ abstract class CategoryI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -904,8 +924,8 @@ abstract class CategoryI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -948,7 +968,7 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1039,7 +1059,7 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1055,12 +1075,12 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1074,7 +1094,7 @@ abstract class CategoryI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1119,12 +1139,12 @@ abstract class CategoryI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1163,12 +1183,12 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1182,8 +1202,8 @@ abstract class CategoryI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1232,8 +1252,8 @@ abstract class CategoryI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1269,6 +1289,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->isColumnModified(CategoryI18nTableMap::META_TITLE)) $criteria->add(CategoryI18nTableMap::META_TITLE, $this->meta_title); if ($this->isColumnModified(CategoryI18nTableMap::META_DESCRIPTION)) $criteria->add(CategoryI18nTableMap::META_DESCRIPTION, $this->meta_description); if ($this->isColumnModified(CategoryI18nTableMap::META_KEYWORDS)) $criteria->add(CategoryI18nTableMap::META_KEYWORDS, $this->meta_keywords); + return $criteria; } @@ -1306,7 +1327,7 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1321,6 +1342,7 @@ abstract class CategoryI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1330,9 +1352,9 @@ abstract class CategoryI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CategoryI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CategoryI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1359,8 +1381,8 @@ abstract class CategoryI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CategoryI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CategoryI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1376,8 +1398,8 @@ abstract class CategoryI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategory object. * - * @param ChildCategory $v - * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) + * @param ChildCategory $v + * @return \Thelia\Model\CategoryI18n The current object (for fluent API support) * @throws PropelException */ public function setCategory(ChildCategory $v = null) @@ -1396,14 +1418,16 @@ abstract class CategoryI18n implements ActiveRecordInterface $v->addCategoryI18n($this); } + return $this; } + /** * Get the associated ChildCategory object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategory The associated ChildCategory object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategory The associated ChildCategory object. * @throws PropelException */ public function getCategory(ConnectionInterface $con = null) @@ -1451,7 +1475,7 @@ abstract class CategoryI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CategoryI18nQuery.php b/core/lib/Thelia/Model/Base/CategoryI18nQuery.php index 90658580f..68a692f2d 100644 --- a/core/lib/Thelia/Model/Base/CategoryI18nQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryI18nQuery.php @@ -79,9 +79,9 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CategoryI18n', $modelAlias = null) { @@ -91,8 +91,8 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Returns a new ChildCategoryI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryI18nQuery */ @@ -152,10 +152,10 @@ abstract class CategoryI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategoryI18n A model object, or null if the key is not found + * @return ChildCategoryI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -183,8 +183,8 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategoryI18n|array|mixed the result, formatted by the current formatter */ @@ -204,8 +204,8 @@ abstract class CategoryI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -226,7 +226,7 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -241,7 +241,7 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -272,11 +272,11 @@ abstract class CategoryI18nQuery extends ModelCriteria * * @see filterByCategory() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -312,9 +312,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -341,9 +341,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -370,9 +370,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -399,9 +399,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -428,9 +428,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -457,9 +457,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByMetaTitle('%fooValue%'); // WHERE meta_title LIKE '%fooValue%' * * - * @param string $metaTitle The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaTitle The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -486,9 +486,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByMetaDescription('%fooValue%'); // WHERE meta_description LIKE '%fooValue%' * * - * @param string $metaDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -515,9 +515,9 @@ abstract class CategoryI18nQuery extends ModelCriteria * $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%' * * - * @param string $metaKeywords The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaKeywords The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -538,8 +538,8 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Category object * - * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -563,8 +563,8 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Category relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -597,11 +597,11 @@ abstract class CategoryI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query */ public function useCategoryQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -613,7 +613,7 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategoryI18n $categoryI18n Object to remove from the list of results + * @param ChildCategoryI18n $categoryI18n Object to remove from the list of results * * @return ChildCategoryI18nQuery The current query, for fluid interface */ @@ -631,8 +631,8 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Deletes all rows from the category_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -663,13 +663,13 @@ abstract class CategoryI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategoryI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategoryI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategoryI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -689,6 +689,7 @@ abstract class CategoryI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/CategoryImage.php b/core/lib/Thelia/Model/Base/CategoryImage.php index 9d4cfcf8e..f2bfdacf4 100644 --- a/core/lib/Thelia/Model/Base/CategoryImage.php +++ b/core/lib/Thelia/Model/Base/CategoryImage.php @@ -32,6 +32,7 @@ abstract class CategoryImage implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryImageTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class CategoryImage implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CategoryImage The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [category_id] column value. * - * @return int + * @return int */ public function getCategoryId() { + return $this->category_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class CategoryImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class CategoryImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class CategoryImage implements ActiveRecordInterface $this->modifiedColumns[CategoryImageTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [category_id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) */ public function setCategoryId($v) { @@ -512,14 +518,15 @@ abstract class CategoryImage implements ActiveRecordInterface $this->aCategory = null; } + return $this; } // setCategoryId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class CategoryImage implements ActiveRecordInterface $this->modifiedColumns[CategoryImageTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class CategoryImage implements ActiveRecordInterface $this->modifiedColumns[CategoryImageTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class CategoryImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class CategoryImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class CategoryImage implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CategoryImage::setDeleted() @@ -779,8 +790,8 @@ abstract class CategoryImage implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class CategoryImage implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class CategoryImage implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class CategoryImage implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class CategoryImage implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class CategoryImage implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class CategoryImage implements ActiveRecordInterface if ($this->isColumnModified(CategoryImageTableMap::POSITION)) $criteria->add(CategoryImageTableMap::POSITION, $this->position); if ($this->isColumnModified(CategoryImageTableMap::CREATED_AT)) $criteria->add(CategoryImageTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CategoryImageTableMap::UPDATED_AT)) $criteria->add(CategoryImageTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class CategoryImage implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class CategoryImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CategoryImage (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CategoryImage (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class CategoryImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CategoryImage Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CategoryImage Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategory object. * - * @param ChildCategory $v - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param ChildCategory $v + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) * @throws PropelException */ public function setCategory(ChildCategory $v = null) @@ -1323,14 +1336,16 @@ abstract class CategoryImage implements ActiveRecordInterface $v->addCategoryImage($this); } + return $this; } + /** * Get the associated ChildCategory object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategory The associated ChildCategory object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategory The associated ChildCategory object. * @throws PropelException */ public function getCategory(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class CategoryImage implements ActiveRecordInterface return $this->aCategory; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class CategoryImage implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class CategoryImage implements ActiveRecordInterface * If this ChildCategoryImage is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryImageI18n[] List of ChildCategoryImageI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class CategoryImage implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryImageI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCategoryImage The current object (for fluent API support) + * @param Collection $categoryImageI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCategoryImage The current object (for fluent API support) */ public function setCategoryImageI18ns(Collection $categoryImageI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Returns the number of related CategoryImageI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryImageI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryImageI18n objects. * @throws PropelException */ public function countCategoryImageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class CategoryImage implements ActiveRecordInterface * Method called to associate a ChildCategoryImageI18n object to this object * through the ChildCategoryImageI18n foreign key attribute. * - * @param ChildCategoryImageI18n $l ChildCategoryImageI18n - * @return \Thelia\Model\CategoryImage The current object (for fluent API support) + * @param ChildCategoryImageI18n $l ChildCategoryImageI18n + * @return \Thelia\Model\CategoryImage The current object (for fluent API support) */ public function addCategoryImageI18n(ChildCategoryImageI18n $l) { @@ -1571,7 +1587,7 @@ abstract class CategoryImage implements ActiveRecordInterface } /** - * @param CategoryImageI18n $categoryImageI18n The categoryImageI18n object to remove. + * @param CategoryImageI18n $categoryImageI18n The categoryImageI18n object to remove. * @return ChildCategoryImage The current object (for fluent API support) */ public function removeCategoryImageI18n($categoryImageI18n) @@ -1614,7 +1630,7 @@ abstract class CategoryImage implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCategoryImage The current object (for fluent API support) + * @return ChildCategoryImage The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildCategoryImage The current object (for fluent API support) + * @return ChildCategoryImage The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryImageI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildCategoryImage The current object (for fluent API support) + * @return ChildCategoryImage The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class CategoryImage implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryImageI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/CategoryImageI18n.php b/core/lib/Thelia/Model/Base/CategoryImageI18n.php index fbc5c27ad..968d6c1b2 100644 --- a/core/lib/Thelia/Model/Base/CategoryImageI18n.php +++ b/core/lib/Thelia/Model/Base/CategoryImageI18n.php @@ -26,6 +26,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryImageI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CategoryImageI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class CategoryImageI18n implements ActiveRecordInterface $this->aCategoryImage = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class CategoryImageI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryImageI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class CategoryImageI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryImageI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class CategoryImageI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryImageI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class CategoryImageI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryImageI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface $this->modifiedColumns[CategoryImageI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CategoryImageI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CategoryImageI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface if ($this->isColumnModified(CategoryImageI18nTableMap::DESCRIPTION)) $criteria->add(CategoryImageI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(CategoryImageI18nTableMap::CHAPO)) $criteria->add(CategoryImageI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(CategoryImageI18nTableMap::POSTSCRIPTUM)) $criteria->add(CategoryImageI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CategoryImageI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CategoryImageI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CategoryImageI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CategoryImageI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class CategoryImageI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategoryImage object. * - * @param ChildCategoryImage $v - * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) + * @param ChildCategoryImage $v + * @return \Thelia\Model\CategoryImageI18n The current object (for fluent API support) * @throws PropelException */ public function setCategoryImage(ChildCategoryImage $v = null) @@ -1231,14 +1247,16 @@ abstract class CategoryImageI18n implements ActiveRecordInterface $v->addCategoryImageI18n($this); } + return $this; } + /** * Get the associated ChildCategoryImage object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategoryImage The associated ChildCategoryImage object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategoryImage The associated ChildCategoryImage object. * @throws PropelException */ public function getCategoryImage(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CategoryImageI18nQuery.php b/core/lib/Thelia/Model/Base/CategoryImageI18nQuery.php index 01623914b..424a478cf 100644 --- a/core/lib/Thelia/Model/Base/CategoryImageI18nQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryImageI18nQuery.php @@ -67,9 +67,9 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryImageI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CategoryImageI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Returns a new ChildCategoryImageI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryImageI18nQuery */ @@ -140,10 +140,10 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategoryImageI18n A model object, or null if the key is not found + * @return ChildCategoryImageI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategoryImageI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * * @see filterByCategoryImage() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\CategoryImage object * * @param \Thelia\Model\CategoryImage|ObjectCollection $categoryImage The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class CategoryImageI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryImageQuery A secondary query class using the current class as primary query */ public function useCategoryImageQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategoryImageI18n $categoryImageI18n Object to remove from the list of results + * @param ChildCategoryImageI18n $categoryImageI18n Object to remove from the list of results * * @return ChildCategoryImageI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Deletes all rows from the category_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class CategoryImageI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategoryImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategoryImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategoryImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class CategoryImageI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryImageI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/CategoryImageQuery.php b/core/lib/Thelia/Model/Base/CategoryImageQuery.php index 96f0d9d5f..af219e055 100644 --- a/core/lib/Thelia/Model/Base/CategoryImageQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryImageQuery.php @@ -72,9 +72,9 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryImageQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CategoryImage', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Returns a new ChildCategoryImageQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryImageQuery */ @@ -114,7 +114,7 @@ abstract class CategoryImageQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCategoryImage|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class CategoryImageQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategoryImage A model object, or null if the key is not found + * @return ChildCategoryImage A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategoryImage|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class CategoryImageQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryImageQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CategoryImageTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryImageQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CategoryImageTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class CategoryImageQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class CategoryImageQuery extends ModelCriteria * * @see filterByCategory() * - * @param mixed $categoryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $categoryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class CategoryImageQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class CategoryImageQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class CategoryImageQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class CategoryImageQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Category object * - * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Category relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class CategoryImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query */ public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryImageI18n object * - * @param \Thelia\Model\CategoryImageI18n|ObjectCollection $categoryImageI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryImageI18n|ObjectCollection $categoryImageI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryImageI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class CategoryImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryImageI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryImageI18nQuery A secondary query class using the current class as primary query */ public function useCategoryImageI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategoryImage $categoryImage Object to remove from the list of results + * @param ChildCategoryImage $categoryImage Object to remove from the list of results * * @return ChildCategoryImageQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Deletes all rows from the category_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategoryImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategoryImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategoryImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class CategoryImageQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryImageTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class CategoryImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class CategoryImageQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryImageQuery The current query, for fluid interface + * @return ChildCategoryImageQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class CategoryImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryImageI18nQuery A secondary query class using the current class as primary query + * @return ChildCategoryImageI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/CategoryQuery.php b/core/lib/Thelia/Model/Base/CategoryQuery.php index b8e79fb22..5cd4bc8f9 100644 --- a/core/lib/Thelia/Model/Base/CategoryQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryQuery.php @@ -107,9 +107,9 @@ abstract class CategoryQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Category', $modelAlias = null) { @@ -119,8 +119,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Returns a new ChildCategoryQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryQuery */ @@ -149,7 +149,7 @@ abstract class CategoryQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCategory|array|mixed the result, formatted by the current formatter @@ -180,10 +180,10 @@ abstract class CategoryQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategory A model object, or null if the key is not found + * @return ChildCategory A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -210,8 +210,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategory|array|mixed the result, formatted by the current formatter */ @@ -231,8 +231,8 @@ abstract class CategoryQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -253,24 +253,26 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CategoryTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CategoryTableMap::ID, $keys, Criteria::IN); } @@ -284,11 +286,11 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -325,11 +327,11 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByParent(array('min' => 12)); // WHERE parent > 12 * * - * @param mixed $parent The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $parent The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -366,11 +368,11 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -407,11 +409,11 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -448,13 +450,13 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -491,13 +493,13 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -534,11 +536,11 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -575,13 +577,13 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -617,9 +619,9 @@ abstract class CategoryQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -640,8 +642,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductCategory object * - * @param \Thelia\Model\ProductCategory|ObjectCollection $productCategory the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductCategory|ObjectCollection $productCategory the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -663,8 +665,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductCategory relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -697,11 +699,11 @@ abstract class CategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductCategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductCategoryQuery A secondary query class using the current class as primary query */ public function useProductCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -713,8 +715,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryImage object * - * @param \Thelia\Model\CategoryImage|ObjectCollection $categoryImage the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryImage|ObjectCollection $categoryImage the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -736,8 +738,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -770,11 +772,11 @@ abstract class CategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryImageQuery A secondary query class using the current class as primary query */ public function useCategoryImageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -786,8 +788,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryDocument object * - * @param \Thelia\Model\CategoryDocument|ObjectCollection $categoryDocument the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryDocument|ObjectCollection $categoryDocument the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -809,8 +811,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -843,11 +845,11 @@ abstract class CategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryDocumentQuery A secondary query class using the current class as primary query */ public function useCategoryDocumentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -859,8 +861,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryAssociatedContent object * - * @param \Thelia\Model\CategoryAssociatedContent|ObjectCollection $categoryAssociatedContent the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryAssociatedContent|ObjectCollection $categoryAssociatedContent the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -882,8 +884,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryAssociatedContent relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -916,11 +918,11 @@ abstract class CategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryAssociatedContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryAssociatedContentQuery A secondary query class using the current class as primary query */ public function useCategoryAssociatedContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -932,8 +934,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryI18n object * - * @param \Thelia\Model\CategoryI18n|ObjectCollection $categoryI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryI18n|ObjectCollection $categoryI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -955,8 +957,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -989,11 +991,11 @@ abstract class CategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryI18nQuery A secondary query class using the current class as primary query */ public function useCategoryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -1005,8 +1007,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryVersion object * - * @param \Thelia\Model\CategoryVersion|ObjectCollection $categoryVersion the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryVersion|ObjectCollection $categoryVersion the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -1028,8 +1030,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryVersion relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -1062,11 +1064,11 @@ abstract class CategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryVersionQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryVersionQuery A secondary query class using the current class as primary query */ public function useCategoryVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1079,8 +1081,8 @@ abstract class CategoryQuery extends ModelCriteria * Filter the query by a related Product object * using the product_category table as cross reference * - * @param Product $product the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Product $product the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -1095,7 +1097,7 @@ abstract class CategoryQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategory $category Object to remove from the list of results + * @param ChildCategory $category Object to remove from the list of results * * @return ChildCategoryQuery The current query, for fluid interface */ @@ -1111,8 +1113,8 @@ abstract class CategoryQuery extends ModelCriteria /** * Deletes all rows from the category table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1143,13 +1145,13 @@ abstract class CategoryQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategory or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategory object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategory object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1169,6 +1171,7 @@ abstract class CategoryQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1187,11 +1190,11 @@ abstract class CategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1206,10 +1209,10 @@ abstract class CategoryQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1226,11 +1229,11 @@ abstract class CategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCategoryI18nQuery A secondary query class using the current class as primary query + * @return ChildCategoryI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1246,7 +1249,7 @@ abstract class CategoryQuery extends ModelCriteria * * @return boolean */ - public static function isVersioningEnabled() + static public function isVersioningEnabled() { return self::$isVersioningEnabled; } @@ -1254,7 +1257,7 @@ abstract class CategoryQuery extends ModelCriteria /** * Enables versioning */ - public static function enableVersioning() + static public function enableVersioning() { self::$isVersioningEnabled = true; } @@ -1262,7 +1265,7 @@ abstract class CategoryQuery extends ModelCriteria /** * Disables versioning */ - public static function disableVersioning() + static public function disableVersioning() { self::$isVersioningEnabled = false; } @@ -1272,9 +1275,9 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1284,9 +1287,9 @@ abstract class CategoryQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1296,7 +1299,7 @@ abstract class CategoryQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1306,7 +1309,7 @@ abstract class CategoryQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1316,7 +1319,7 @@ abstract class CategoryQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1326,7 +1329,7 @@ abstract class CategoryQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCategoryQuery The current query, for fluid interface + * @return ChildCategoryQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/CategoryVersion.php b/core/lib/Thelia/Model/Base/CategoryVersion.php index f0108ef10..69d67b252 100644 --- a/core/lib/Thelia/Model/Base/CategoryVersion.php +++ b/core/lib/Thelia/Model/Base/CategoryVersion.php @@ -28,6 +28,7 @@ abstract class CategoryVersion implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CategoryVersionTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -344,9 +345,9 @@ abstract class CategoryVersion implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CategoryVersion The current object, for fluid interface */ @@ -396,40 +397,44 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [parent] column value. * - * @return int + * @return int */ public function getParent() { + return $this->parent; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -437,8 +442,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -457,8 +462,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -476,10 +481,11 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -487,8 +493,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -506,18 +512,19 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setId($v) { @@ -534,14 +541,15 @@ abstract class CategoryVersion implements ActiveRecordInterface $this->aCategory = null; } + return $this; } // setId() /** * Set the value of [parent] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setParent($v) { @@ -554,14 +562,15 @@ abstract class CategoryVersion implements ActiveRecordInterface $this->modifiedColumns[CategoryVersionTableMap::PARENT] = true; } + return $this; } // setParent() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setVisible($v) { @@ -574,14 +583,15 @@ abstract class CategoryVersion implements ActiveRecordInterface $this->modifiedColumns[CategoryVersionTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setPosition($v) { @@ -594,15 +604,16 @@ abstract class CategoryVersion implements ActiveRecordInterface $this->modifiedColumns[CategoryVersionTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -614,15 +625,16 @@ abstract class CategoryVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -634,14 +646,15 @@ abstract class CategoryVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setVersion($v) { @@ -654,15 +667,16 @@ abstract class CategoryVersion implements ActiveRecordInterface $this->modifiedColumns[CategoryVersionTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -674,14 +688,15 @@ abstract class CategoryVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -694,6 +709,7 @@ abstract class CategoryVersion implements ActiveRecordInterface $this->modifiedColumns[CategoryVersionTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -737,6 +753,7 @@ abstract class CategoryVersion implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CategoryVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -812,10 +829,10 @@ abstract class CategoryVersion implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -851,7 +868,7 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CategoryVersion::setDeleted() @@ -894,8 +911,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -945,8 +962,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -989,7 +1006,7 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1080,7 +1097,7 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1096,12 +1113,12 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1115,7 +1132,7 @@ abstract class CategoryVersion implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1160,12 +1177,12 @@ abstract class CategoryVersion implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1204,12 +1221,12 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1223,8 +1240,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1273,8 +1290,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1310,6 +1327,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->isColumnModified(CategoryVersionTableMap::VERSION)) $criteria->add(CategoryVersionTableMap::VERSION, $this->version); if ($this->isColumnModified(CategoryVersionTableMap::VERSION_CREATED_AT)) $criteria->add(CategoryVersionTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(CategoryVersionTableMap::VERSION_CREATED_BY)) $criteria->add(CategoryVersionTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1347,7 +1365,7 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1362,6 +1380,7 @@ abstract class CategoryVersion implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getVersion()); } @@ -1371,9 +1390,9 @@ abstract class CategoryVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CategoryVersion (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CategoryVersion (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1400,8 +1419,8 @@ abstract class CategoryVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CategoryVersion Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CategoryVersion Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1417,8 +1436,8 @@ abstract class CategoryVersion implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategory object. * - * @param ChildCategory $v - * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) + * @param ChildCategory $v + * @return \Thelia\Model\CategoryVersion The current object (for fluent API support) * @throws PropelException */ public function setCategory(ChildCategory $v = null) @@ -1437,14 +1456,16 @@ abstract class CategoryVersion implements ActiveRecordInterface $v->addCategoryVersion($this); } + return $this; } + /** * Get the associated ChildCategory object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategory The associated ChildCategory object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategory The associated ChildCategory object. * @throws PropelException */ public function getCategory(ConnectionInterface $con = null) @@ -1492,7 +1513,7 @@ abstract class CategoryVersion implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CategoryVersionQuery.php b/core/lib/Thelia/Model/Base/CategoryVersionQuery.php index 4448e60e0..a51640003 100644 --- a/core/lib/Thelia/Model/Base/CategoryVersionQuery.php +++ b/core/lib/Thelia/Model/Base/CategoryVersionQuery.php @@ -79,9 +79,9 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CategoryVersionQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CategoryVersion', $modelAlias = null) { @@ -91,8 +91,8 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Returns a new ChildCategoryVersionQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCategoryVersionQuery */ @@ -152,10 +152,10 @@ abstract class CategoryVersionQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCategoryVersion A model object, or null if the key is not found + * @return ChildCategoryVersion A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -183,8 +183,8 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCategoryVersion|array|mixed the result, formatted by the current formatter */ @@ -204,8 +204,8 @@ abstract class CategoryVersionQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -226,7 +226,7 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -241,7 +241,7 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -272,11 +272,11 @@ abstract class CategoryVersionQuery extends ModelCriteria * * @see filterByCategory() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -313,11 +313,11 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByParent(array('min' => 12)); // WHERE parent > 12 * * - * @param mixed $parent The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $parent The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -354,11 +354,11 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -395,11 +395,11 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -436,13 +436,13 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -479,13 +479,13 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -522,11 +522,11 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -563,13 +563,13 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -605,9 +605,9 @@ abstract class CategoryVersionQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -628,8 +628,8 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Category object * - * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -653,8 +653,8 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Category relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -687,11 +687,11 @@ abstract class CategoryVersionQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query */ public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -703,7 +703,7 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCategoryVersion $categoryVersion Object to remove from the list of results + * @param ChildCategoryVersion $categoryVersion Object to remove from the list of results * * @return ChildCategoryVersionQuery The current query, for fluid interface */ @@ -721,8 +721,8 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Deletes all rows from the category_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -753,13 +753,13 @@ abstract class CategoryVersionQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCategoryVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCategoryVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCategoryVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -779,6 +779,7 @@ abstract class CategoryVersionQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CategoryVersionTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/Config.php b/core/lib/Thelia/Model/Base/Config.php index 41ce820c2..2868accd3 100644 --- a/core/lib/Thelia/Model/Base/Config.php +++ b/core/lib/Thelia/Model/Base/Config.php @@ -30,6 +30,7 @@ abstract class Config implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ConfigTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -357,9 +358,9 @@ abstract class Config implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Config The current object, for fluid interface */ @@ -409,50 +410,55 @@ abstract class Config implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [name] column value. * - * @return string + * @return string */ public function getName() { + return $this->name; } /** * Get the [value] column value. * - * @return string + * @return string */ public function getValue() { + return $this->value; } /** * Get the [secured] column value. * - * @return int + * @return int */ public function getSecured() { + return $this->secured; } /** * Get the [hidden] column value. * - * @return int + * @return int */ public function getHidden() { + return $this->hidden; } @@ -460,8 +466,8 @@ abstract class Config implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -480,8 +486,8 @@ abstract class Config implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -499,8 +505,8 @@ abstract class Config implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function setId($v) { @@ -513,14 +519,15 @@ abstract class Config implements ActiveRecordInterface $this->modifiedColumns[ConfigTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [name] column. * - * @param string $v new value - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function setName($v) { @@ -533,14 +540,15 @@ abstract class Config implements ActiveRecordInterface $this->modifiedColumns[ConfigTableMap::NAME] = true; } + return $this; } // setName() /** * Set the value of [value] column. * - * @param string $v new value - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function setValue($v) { @@ -553,14 +561,15 @@ abstract class Config implements ActiveRecordInterface $this->modifiedColumns[ConfigTableMap::VALUE] = true; } + return $this; } // setValue() /** * Set the value of [secured] column. * - * @param int $v new value - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function setSecured($v) { @@ -573,14 +582,15 @@ abstract class Config implements ActiveRecordInterface $this->modifiedColumns[ConfigTableMap::SECURED] = true; } + return $this; } // setSecured() /** * Set the value of [hidden] column. * - * @param int $v new value - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function setHidden($v) { @@ -593,15 +603,16 @@ abstract class Config implements ActiveRecordInterface $this->modifiedColumns[ConfigTableMap::HIDDEN] = true; } + return $this; } // setHidden() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -613,15 +624,16 @@ abstract class Config implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -633,6 +645,7 @@ abstract class Config implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -680,6 +693,7 @@ abstract class Config implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ConfigTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -743,10 +757,10 @@ abstract class Config implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -783,7 +797,7 @@ abstract class Config implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Config::setDeleted() @@ -826,8 +840,8 @@ abstract class Config implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -888,8 +902,8 @@ abstract class Config implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -937,7 +951,7 @@ abstract class Config implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1027,7 +1041,7 @@ abstract class Config implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1043,12 +1057,12 @@ abstract class Config implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1062,7 +1076,7 @@ abstract class Config implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1101,12 +1115,12 @@ abstract class Config implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1143,12 +1157,12 @@ abstract class Config implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1162,8 +1176,8 @@ abstract class Config implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1206,8 +1220,8 @@ abstract class Config implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1239,6 +1253,7 @@ abstract class Config implements ActiveRecordInterface if ($this->isColumnModified(ConfigTableMap::HIDDEN)) $criteria->add(ConfigTableMap::HIDDEN, $this->hidden); if ($this->isColumnModified(ConfigTableMap::CREATED_AT)) $criteria->add(ConfigTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ConfigTableMap::UPDATED_AT)) $criteria->add(ConfigTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1260,7 +1275,7 @@ abstract class Config implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1270,7 +1285,7 @@ abstract class Config implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1284,6 +1299,7 @@ abstract class Config implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1293,9 +1309,9 @@ abstract class Config implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Config (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Config (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1334,8 +1350,8 @@ abstract class Config implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Config Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Config Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1354,7 +1370,7 @@ abstract class Config implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class Config implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class Config implements ActiveRecordInterface * If this ChildConfig is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildConfigI18n[] List of ChildConfigI18n objects * @throws PropelException */ @@ -1473,14 +1489,15 @@ abstract class Config implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $configI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildConfig The current object (for fluent API support) + * @param Collection $configI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildConfig The current object (for fluent API support) */ public function setConfigI18ns(Collection $configI18ns, ConnectionInterface $con = null) { $configI18nsToDelete = $this->getConfigI18ns(new Criteria(), $con)->diff($configI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1504,10 +1521,10 @@ abstract class Config implements ActiveRecordInterface /** * Returns the number of related ConfigI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ConfigI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ConfigI18n objects. * @throws PropelException */ public function countConfigI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1539,8 +1556,8 @@ abstract class Config implements ActiveRecordInterface * Method called to associate a ChildConfigI18n object to this object * through the ChildConfigI18n foreign key attribute. * - * @param ChildConfigI18n $l ChildConfigI18n - * @return \Thelia\Model\Config The current object (for fluent API support) + * @param ChildConfigI18n $l ChildConfigI18n + * @return \Thelia\Model\Config The current object (for fluent API support) */ public function addConfigI18n(ChildConfigI18n $l) { @@ -1570,7 +1587,7 @@ abstract class Config implements ActiveRecordInterface } /** - * @param ConfigI18n $configI18n The configI18n object to remove. + * @param ConfigI18n $configI18n The configI18n object to remove. * @return ChildConfig The current object (for fluent API support) */ public function removeConfigI18n($configI18n) @@ -1615,7 +1632,7 @@ abstract class Config implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1666,7 @@ abstract class Config implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildConfig The current object (for fluent API support) + * @return ChildConfig The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1680,9 @@ abstract class Config implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildConfig The current object (for fluent API support) + * @return ChildConfig The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1694,7 @@ abstract class Config implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1704,8 @@ abstract class Config implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildConfigI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1738,10 @@ abstract class Config implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildConfig The current object (for fluent API support) + * @return ChildConfig The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1766,7 @@ abstract class Config implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildConfigI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -1757,6 +1774,7 @@ abstract class Config implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -1767,6 +1785,7 @@ abstract class Config implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -1779,6 +1798,7 @@ abstract class Config implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -1789,6 +1809,7 @@ abstract class Config implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -1801,6 +1822,7 @@ abstract class Config implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -1811,6 +1833,7 @@ abstract class Config implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -1823,6 +1846,7 @@ abstract class Config implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -1833,6 +1857,7 @@ abstract class Config implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -1921,6 +1946,7 @@ abstract class Config implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ConfigI18n.php b/core/lib/Thelia/Model/Base/ConfigI18n.php index d0b928c91..b2bbc6160 100644 --- a/core/lib/Thelia/Model/Base/ConfigI18n.php +++ b/core/lib/Thelia/Model/Base/ConfigI18n.php @@ -26,6 +26,7 @@ abstract class ConfigI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ConfigI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ConfigI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ConfigI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ConfigI18n implements ActiveRecordInterface $this->aConfig = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ConfigI18n implements ActiveRecordInterface $this->modifiedColumns[ConfigI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ConfigI18n implements ActiveRecordInterface $this->modifiedColumns[ConfigI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ConfigI18n implements ActiveRecordInterface $this->modifiedColumns[ConfigI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ConfigI18n implements ActiveRecordInterface $this->modifiedColumns[ConfigI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ConfigI18n implements ActiveRecordInterface $this->modifiedColumns[ConfigI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ConfigI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ConfigI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ConfigI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ConfigI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ConfigI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ConfigI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ConfigI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ConfigI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ConfigI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ConfigI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ConfigI18n implements ActiveRecordInterface if ($this->isColumnModified(ConfigI18nTableMap::DESCRIPTION)) $criteria->add(ConfigI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ConfigI18nTableMap::CHAPO)) $criteria->add(ConfigI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ConfigI18nTableMap::POSTSCRIPTUM)) $criteria->add(ConfigI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ConfigI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ConfigI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ConfigI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ConfigI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ConfigI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ConfigI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ConfigI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ConfigI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildConfig object. * - * @param ChildConfig $v - * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) + * @param ChildConfig $v + * @return \Thelia\Model\ConfigI18n The current object (for fluent API support) * @throws PropelException */ public function setConfig(ChildConfig $v = null) @@ -1231,14 +1247,16 @@ abstract class ConfigI18n implements ActiveRecordInterface $v->addConfigI18n($this); } + return $this; } + /** * Get the associated ChildConfig object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildConfig The associated ChildConfig object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildConfig The associated ChildConfig object. * @throws PropelException */ public function getConfig(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ConfigI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ConfigI18nQuery.php b/core/lib/Thelia/Model/Base/ConfigI18nQuery.php index 4d9c07df2..b10bb1da3 100644 --- a/core/lib/Thelia/Model/Base/ConfigI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ConfigI18nQuery.php @@ -67,9 +67,9 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ConfigI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ConfigI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Returns a new ChildConfigI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildConfigI18nQuery */ @@ -140,10 +140,10 @@ abstract class ConfigI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildConfigI18n A model object, or null if the key is not found + * @return ChildConfigI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildConfigI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ConfigI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ConfigI18nQuery extends ModelCriteria * * @see filterByConfig() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ConfigI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ConfigI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ConfigI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ConfigI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ConfigI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Config object * - * @param \Thelia\Model\Config|ObjectCollection $config The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Config|ObjectCollection $config The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Config relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ConfigI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ConfigQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ConfigQuery A secondary query class using the current class as primary query */ public function useConfigQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildConfigI18n $configI18n Object to remove from the list of results + * @param ChildConfigI18n $configI18n Object to remove from the list of results * * @return ChildConfigI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Deletes all rows from the config_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ConfigI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildConfigI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildConfigI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildConfigI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ConfigI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ConfigI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ConfigQuery.php b/core/lib/Thelia/Model/Base/ConfigQuery.php index 9d8d2c1b4..d219bb4a2 100644 --- a/core/lib/Thelia/Model/Base/ConfigQuery.php +++ b/core/lib/Thelia/Model/Base/ConfigQuery.php @@ -72,9 +72,9 @@ abstract class ConfigQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ConfigQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Config', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class ConfigQuery extends ModelCriteria /** * Returns a new ChildConfigQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildConfigQuery */ @@ -114,7 +114,7 @@ abstract class ConfigQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildConfig|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class ConfigQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildConfig A model object, or null if the key is not found + * @return ChildConfig A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class ConfigQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildConfig|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class ConfigQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class ConfigQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildConfigQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ConfigTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildConfigQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ConfigTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class ConfigQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -289,9 +291,9 @@ abstract class ConfigQuery extends ModelCriteria * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%' * * - * @param string $name The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $name The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -318,9 +320,9 @@ abstract class ConfigQuery extends ModelCriteria * $query->filterByValue('%fooValue%'); // WHERE value LIKE '%fooValue%' * * - * @param string $value The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $value The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -348,11 +350,11 @@ abstract class ConfigQuery extends ModelCriteria * $query->filterBySecured(array('min' => 12)); // WHERE secured > 12 * * - * @param mixed $secured The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $secured The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -389,11 +391,11 @@ abstract class ConfigQuery extends ModelCriteria * $query->filterByHidden(array('min' => 12)); // WHERE hidden > 12 * * - * @param mixed $hidden The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $hidden The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -430,13 +432,13 @@ abstract class ConfigQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -473,13 +475,13 @@ abstract class ConfigQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -509,8 +511,8 @@ abstract class ConfigQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ConfigI18n object * - * @param \Thelia\Model\ConfigI18n|ObjectCollection $configI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ConfigI18n|ObjectCollection $configI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildConfigQuery The current query, for fluid interface */ @@ -532,8 +534,8 @@ abstract class ConfigQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ConfigI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildConfigQuery The current query, for fluid interface */ @@ -566,11 +568,11 @@ abstract class ConfigQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ConfigI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ConfigI18nQuery A secondary query class using the current class as primary query */ public function useConfigI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -582,7 +584,7 @@ abstract class ConfigQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildConfig $config Object to remove from the list of results + * @param ChildConfig $config Object to remove from the list of results * * @return ChildConfigQuery The current query, for fluid interface */ @@ -598,8 +600,8 @@ abstract class ConfigQuery extends ModelCriteria /** * Deletes all rows from the config table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -630,13 +632,13 @@ abstract class ConfigQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildConfig or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildConfig object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildConfig object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -656,6 +658,7 @@ abstract class ConfigQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ConfigTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -674,9 +677,9 @@ abstract class ConfigQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -686,9 +689,9 @@ abstract class ConfigQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -698,7 +701,7 @@ abstract class ConfigQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -708,7 +711,7 @@ abstract class ConfigQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -718,7 +721,7 @@ abstract class ConfigQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -728,7 +731,7 @@ abstract class ConfigQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -740,11 +743,11 @@ abstract class ConfigQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -759,10 +762,10 @@ abstract class ConfigQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildConfigQuery The current query, for fluid interface + * @return ChildConfigQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -779,11 +782,11 @@ abstract class ConfigQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildConfigI18nQuery A secondary query class using the current class as primary query + * @return ChildConfigI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/Content.php b/core/lib/Thelia/Model/Base/Content.php index 992b5e757..67951239b 100644 --- a/core/lib/Thelia/Model/Base/Content.php +++ b/core/lib/Thelia/Model/Base/Content.php @@ -45,6 +45,7 @@ abstract class Content implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -191,6 +192,7 @@ abstract class Content implements ActiveRecordInterface // versionable behavior + /** * @var bool */ @@ -466,9 +468,9 @@ abstract class Content implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Content The current object, for fluid interface */ @@ -518,30 +520,33 @@ abstract class Content implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -549,8 +554,8 @@ abstract class Content implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -569,8 +574,8 @@ abstract class Content implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -588,10 +593,11 @@ abstract class Content implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -599,8 +605,8 @@ abstract class Content implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -618,18 +624,19 @@ abstract class Content implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setId($v) { @@ -642,14 +649,15 @@ abstract class Content implements ActiveRecordInterface $this->modifiedColumns[ContentTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setVisible($v) { @@ -662,14 +670,15 @@ abstract class Content implements ActiveRecordInterface $this->modifiedColumns[ContentTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setPosition($v) { @@ -682,15 +691,16 @@ abstract class Content implements ActiveRecordInterface $this->modifiedColumns[ContentTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -702,15 +712,16 @@ abstract class Content implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -722,14 +733,15 @@ abstract class Content implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setVersion($v) { @@ -742,15 +754,16 @@ abstract class Content implements ActiveRecordInterface $this->modifiedColumns[ContentTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -762,14 +775,15 @@ abstract class Content implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -782,6 +796,7 @@ abstract class Content implements ActiveRecordInterface $this->modifiedColumns[ContentTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -825,6 +840,7 @@ abstract class Content implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ContentTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -894,10 +910,10 @@ abstract class Content implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -947,7 +963,7 @@ abstract class Content implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Content::setDeleted() @@ -990,8 +1006,8 @@ abstract class Content implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1064,8 +1080,8 @@ abstract class Content implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1242,7 +1258,7 @@ abstract class Content implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1338,7 +1354,7 @@ abstract class Content implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1354,12 +1370,12 @@ abstract class Content implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1373,7 +1389,7 @@ abstract class Content implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1415,12 +1431,12 @@ abstract class Content implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1476,12 +1492,12 @@ abstract class Content implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1495,8 +1511,8 @@ abstract class Content implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1542,8 +1558,8 @@ abstract class Content implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1577,6 +1593,7 @@ abstract class Content implements ActiveRecordInterface if ($this->isColumnModified(ContentTableMap::VERSION)) $criteria->add(ContentTableMap::VERSION, $this->version); if ($this->isColumnModified(ContentTableMap::VERSION_CREATED_AT)) $criteria->add(ContentTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(ContentTableMap::VERSION_CREATED_BY)) $criteria->add(ContentTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1598,7 +1615,7 @@ abstract class Content implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1608,7 +1625,7 @@ abstract class Content implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1622,6 +1639,7 @@ abstract class Content implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1631,9 +1649,9 @@ abstract class Content implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Content (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Content (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1709,8 +1727,8 @@ abstract class Content implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Content Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Content Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1729,7 +1747,7 @@ abstract class Content implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1786,8 +1804,8 @@ abstract class Content implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1809,8 +1827,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentFolder[] List of ChildContentFolder objects * @throws PropelException */ @@ -1866,14 +1884,15 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentFolders A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $contentFolders A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setContentFolders(Collection $contentFolders, ConnectionInterface $con = null) { $contentFoldersToDelete = $this->getContentFolders(new Criteria(), $con)->diff($contentFolders); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1897,10 +1916,10 @@ abstract class Content implements ActiveRecordInterface /** * Returns the number of related ContentFolder objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentFolder objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentFolder objects. * @throws PropelException */ public function countContentFolders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1932,8 +1951,8 @@ abstract class Content implements ActiveRecordInterface * Method called to associate a ChildContentFolder object to this object * through the ChildContentFolder foreign key attribute. * - * @param ChildContentFolder $l ChildContentFolder - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param ChildContentFolder $l ChildContentFolder + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function addContentFolder(ChildContentFolder $l) { @@ -1960,7 +1979,7 @@ abstract class Content implements ActiveRecordInterface /** * @param ContentFolder $contentFolder The contentFolder object to remove. - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function removeContentFolder($contentFolder) { @@ -1977,6 +1996,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1988,9 +2008,9 @@ abstract class Content implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Content. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildContentFolder[] List of ChildContentFolder objects */ public function getContentFoldersJoinFolder($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2030,8 +2050,8 @@ abstract class Content implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2053,8 +2073,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentImage[] List of ChildContentImage objects * @throws PropelException */ @@ -2110,14 +2130,15 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentImages A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $contentImages A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setContentImages(Collection $contentImages, ConnectionInterface $con = null) { $contentImagesToDelete = $this->getContentImages(new Criteria(), $con)->diff($contentImages); + $this->contentImagesScheduledForDeletion = $contentImagesToDelete; foreach ($contentImagesToDelete as $contentImageRemoved) { @@ -2138,10 +2159,10 @@ abstract class Content implements ActiveRecordInterface /** * Returns the number of related ContentImage objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentImage objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentImage objects. * @throws PropelException */ public function countContentImages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2173,8 +2194,8 @@ abstract class Content implements ActiveRecordInterface * Method called to associate a ChildContentImage object to this object * through the ChildContentImage foreign key attribute. * - * @param ChildContentImage $l ChildContentImage - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param ChildContentImage $l ChildContentImage + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function addContentImage(ChildContentImage $l) { @@ -2247,8 +2268,8 @@ abstract class Content implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2270,8 +2291,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentDocument[] List of ChildContentDocument objects * @throws PropelException */ @@ -2327,14 +2348,15 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentDocuments A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $contentDocuments A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setContentDocuments(Collection $contentDocuments, ConnectionInterface $con = null) { $contentDocumentsToDelete = $this->getContentDocuments(new Criteria(), $con)->diff($contentDocuments); + $this->contentDocumentsScheduledForDeletion = $contentDocumentsToDelete; foreach ($contentDocumentsToDelete as $contentDocumentRemoved) { @@ -2355,10 +2377,10 @@ abstract class Content implements ActiveRecordInterface /** * Returns the number of related ContentDocument objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentDocument objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentDocument objects. * @throws PropelException */ public function countContentDocuments(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2390,8 +2412,8 @@ abstract class Content implements ActiveRecordInterface * Method called to associate a ChildContentDocument object to this object * through the ChildContentDocument foreign key attribute. * - * @param ChildContentDocument $l ChildContentDocument - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param ChildContentDocument $l ChildContentDocument + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function addContentDocument(ChildContentDocument $l) { @@ -2418,7 +2440,7 @@ abstract class Content implements ActiveRecordInterface /** * @param ContentDocument $contentDocument The contentDocument object to remove. - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function removeContentDocument($contentDocument) { @@ -2464,8 +2486,8 @@ abstract class Content implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2487,8 +2509,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductAssociatedContent[] List of ChildProductAssociatedContent objects * @throws PropelException */ @@ -2544,14 +2566,15 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productAssociatedContents A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $productAssociatedContents A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setProductAssociatedContents(Collection $productAssociatedContents, ConnectionInterface $con = null) { $productAssociatedContentsToDelete = $this->getProductAssociatedContents(new Criteria(), $con)->diff($productAssociatedContents); + $this->productAssociatedContentsScheduledForDeletion = $productAssociatedContentsToDelete; foreach ($productAssociatedContentsToDelete as $productAssociatedContentRemoved) { @@ -2572,10 +2595,10 @@ abstract class Content implements ActiveRecordInterface /** * Returns the number of related ProductAssociatedContent objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductAssociatedContent objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductAssociatedContent objects. * @throws PropelException */ public function countProductAssociatedContents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2607,8 +2630,8 @@ abstract class Content implements ActiveRecordInterface * Method called to associate a ChildProductAssociatedContent object to this object * through the ChildProductAssociatedContent foreign key attribute. * - * @param ChildProductAssociatedContent $l ChildProductAssociatedContent - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param ChildProductAssociatedContent $l ChildProductAssociatedContent + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function addProductAssociatedContent(ChildProductAssociatedContent $l) { @@ -2635,7 +2658,7 @@ abstract class Content implements ActiveRecordInterface /** * @param ProductAssociatedContent $productAssociatedContent The productAssociatedContent object to remove. - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function removeProductAssociatedContent($productAssociatedContent) { @@ -2652,6 +2675,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2663,9 +2687,9 @@ abstract class Content implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Content. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProductAssociatedContent[] List of ChildProductAssociatedContent objects */ public function getProductAssociatedContentsJoinProduct($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2705,8 +2729,8 @@ abstract class Content implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2728,8 +2752,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCategoryAssociatedContent[] List of ChildCategoryAssociatedContent objects * @throws PropelException */ @@ -2785,14 +2809,15 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categoryAssociatedContents A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $categoryAssociatedContents A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setCategoryAssociatedContents(Collection $categoryAssociatedContents, ConnectionInterface $con = null) { $categoryAssociatedContentsToDelete = $this->getCategoryAssociatedContents(new Criteria(), $con)->diff($categoryAssociatedContents); + $this->categoryAssociatedContentsScheduledForDeletion = $categoryAssociatedContentsToDelete; foreach ($categoryAssociatedContentsToDelete as $categoryAssociatedContentRemoved) { @@ -2813,10 +2838,10 @@ abstract class Content implements ActiveRecordInterface /** * Returns the number of related CategoryAssociatedContent objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CategoryAssociatedContent objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CategoryAssociatedContent objects. * @throws PropelException */ public function countCategoryAssociatedContents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2848,8 +2873,8 @@ abstract class Content implements ActiveRecordInterface * Method called to associate a ChildCategoryAssociatedContent object to this object * through the ChildCategoryAssociatedContent foreign key attribute. * - * @param ChildCategoryAssociatedContent $l ChildCategoryAssociatedContent - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param ChildCategoryAssociatedContent $l ChildCategoryAssociatedContent + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function addCategoryAssociatedContent(ChildCategoryAssociatedContent $l) { @@ -2876,7 +2901,7 @@ abstract class Content implements ActiveRecordInterface /** * @param CategoryAssociatedContent $categoryAssociatedContent The categoryAssociatedContent object to remove. - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function removeCategoryAssociatedContent($categoryAssociatedContent) { @@ -2893,6 +2918,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2904,9 +2930,9 @@ abstract class Content implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Content. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCategoryAssociatedContent[] List of ChildCategoryAssociatedContent objects */ public function getCategoryAssociatedContentsJoinCategory($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2946,8 +2972,8 @@ abstract class Content implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2969,8 +2995,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentI18n[] List of ChildContentI18n objects * @throws PropelException */ @@ -3026,14 +3052,15 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $contentI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setContentI18ns(Collection $contentI18ns, ConnectionInterface $con = null) { $contentI18nsToDelete = $this->getContentI18ns(new Criteria(), $con)->diff($contentI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -3057,10 +3084,10 @@ abstract class Content implements ActiveRecordInterface /** * Returns the number of related ContentI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentI18n objects. * @throws PropelException */ public function countContentI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3092,8 +3119,8 @@ abstract class Content implements ActiveRecordInterface * Method called to associate a ChildContentI18n object to this object * through the ChildContentI18n foreign key attribute. * - * @param ChildContentI18n $l ChildContentI18n - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param ChildContentI18n $l ChildContentI18n + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function addContentI18n(ChildContentI18n $l) { @@ -3123,7 +3150,7 @@ abstract class Content implements ActiveRecordInterface } /** - * @param ContentI18n $contentI18n The contentI18n object to remove. + * @param ContentI18n $contentI18n The contentI18n object to remove. * @return ChildContent The current object (for fluent API support) */ public function removeContentI18n($contentI18n) @@ -3170,8 +3197,8 @@ abstract class Content implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -3193,8 +3220,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentVersion[] List of ChildContentVersion objects * @throws PropelException */ @@ -3250,14 +3277,15 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentVersions A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $contentVersions A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setContentVersions(Collection $contentVersions, ConnectionInterface $con = null) { $contentVersionsToDelete = $this->getContentVersions(new Criteria(), $con)->diff($contentVersions); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -3281,10 +3309,10 @@ abstract class Content implements ActiveRecordInterface /** * Returns the number of related ContentVersion objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentVersion objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentVersion objects. * @throws PropelException */ public function countContentVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3316,8 +3344,8 @@ abstract class Content implements ActiveRecordInterface * Method called to associate a ChildContentVersion object to this object * through the ChildContentVersion foreign key attribute. * - * @param ChildContentVersion $l ChildContentVersion - * @return \Thelia\Model\Content The current object (for fluent API support) + * @param ChildContentVersion $l ChildContentVersion + * @return \Thelia\Model\Content The current object (for fluent API support) */ public function addContentVersion(ChildContentVersion $l) { @@ -3344,7 +3372,7 @@ abstract class Content implements ActiveRecordInterface /** * @param ContentVersion $contentVersion The contentVersion object to remove. - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function removeContentVersion($contentVersion) { @@ -3401,8 +3429,8 @@ abstract class Content implements ActiveRecordInterface * If this ChildContent is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildFolder[] List of ChildFolder objects */ @@ -3432,9 +3460,9 @@ abstract class Content implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $folders A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContent The current object (for fluent API support) + * @param Collection $folders A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContent The current object (for fluent API support) */ public function setFolders(Collection $folders, ConnectionInterface $con = null) { @@ -3458,9 +3486,9 @@ abstract class Content implements ActiveRecordInterface * Gets the number of ChildFolder objects related by a many-to-many relationship * to the current object by way of the content_folder cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildFolder objects */ @@ -3488,7 +3516,7 @@ abstract class Content implements ActiveRecordInterface * Associate a ChildFolder object to this object * through the content_folder cross reference table. * - * @param ChildFolder $folder The ChildContentFolder object to relate + * @param ChildFolder $folder The ChildContentFolder object to relate * @return ChildContent The current object (for fluent API support) */ public function addFolder(ChildFolder $folder) @@ -3506,7 +3534,7 @@ abstract class Content implements ActiveRecordInterface } /** - * @param Folder $folder The folder object to add. + * @param Folder $folder The folder object to add. */ protected function doAddFolder($folder) { @@ -3525,7 +3553,7 @@ abstract class Content implements ActiveRecordInterface * Remove a ChildFolder object to this object * through the content_folder cross reference table. * - * @param ChildFolder $folder The ChildContentFolder object to relate + * @param ChildFolder $folder The ChildContentFolder object to relate * @return ChildContent The current object (for fluent API support) */ public function removeFolder(ChildFolder $folder) @@ -3572,7 +3600,7 @@ abstract class Content implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -3648,7 +3676,7 @@ abstract class Content implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -3662,9 +3690,9 @@ abstract class Content implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -3676,7 +3704,7 @@ abstract class Content implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -3686,8 +3714,8 @@ abstract class Content implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildContentI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -3720,10 +3748,10 @@ abstract class Content implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -3748,7 +3776,7 @@ abstract class Content implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildContentI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -3756,6 +3784,7 @@ abstract class Content implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -3766,6 +3795,7 @@ abstract class Content implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -3778,6 +3808,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -3788,6 +3819,7 @@ abstract class Content implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -3800,6 +3832,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -3810,6 +3843,7 @@ abstract class Content implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -3822,6 +3856,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -3832,6 +3867,7 @@ abstract class Content implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -3844,6 +3880,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * Get the [meta_title] column value. * @@ -3854,6 +3891,7 @@ abstract class Content implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaTitle(); } + /** * Set the value of [meta_title] column. * @@ -3866,6 +3904,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * Get the [meta_description] column value. * @@ -3876,6 +3915,7 @@ abstract class Content implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaDescription(); } + /** * Set the value of [meta_description] column. * @@ -3888,6 +3928,7 @@ abstract class Content implements ActiveRecordInterface return $this; } + /** * Get the [meta_keywords] column value. * @@ -3898,6 +3939,7 @@ abstract class Content implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaKeywords(); } + /** * Set the value of [meta_keywords] column. * @@ -3927,7 +3969,7 @@ abstract class Content implements ActiveRecordInterface /** * Checks whether the current state must be recorded as a version * - * @return boolean + * @return boolean */ public function isVersioningNecessary($con = null) { @@ -3949,9 +3991,9 @@ abstract class Content implements ActiveRecordInterface /** * Creates a version of the current object and saves it. * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ChildContentVersion A version object + * @return ChildContentVersion A version object */ public function addVersion($con = null) { @@ -3975,10 +4017,10 @@ abstract class Content implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con The connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con The connection to use * - * @return ChildContent The current object (for fluent API support) + * @return ChildContent The current object (for fluent API support) */ public function toVersion($versionNumber, $con = null) { @@ -3994,9 +4036,9 @@ abstract class Content implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param ChildContentVersion $version The version object to use - * @param ConnectionInterface $con the connection to use - * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. + * @param ChildContentVersion $version The version object to use + * @param ConnectionInterface $con the connection to use + * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return ChildContent The current object (for fluent API support) */ @@ -4018,9 +4060,9 @@ abstract class Content implements ActiveRecordInterface /** * Gets the latest persisted version number for the current object * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return integer + * @return integer */ public function getLastVersionNumber($con = null) { @@ -4038,9 +4080,9 @@ abstract class Content implements ActiveRecordInterface /** * Checks whether the current object is the latest one * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return Boolean + * @return Boolean */ public function isLastVersion($con = null) { @@ -4050,10 +4092,10 @@ abstract class Content implements ActiveRecordInterface /** * Retrieves a version object for this entity and a version number * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con the connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con the connection to use * - * @return ChildContentVersion A version object + * @return ChildContentVersion A version object */ public function getOneVersion($versionNumber, $con = null) { @@ -4066,9 +4108,9 @@ abstract class Content implements ActiveRecordInterface /** * Gets all the versions of this object, in incremental order * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ObjectCollection A list of ChildContentVersion objects + * @return ObjectCollection A list of ChildContentVersion objects */ public function getAllVersions($con = null) { @@ -4088,12 +4130,12 @@ abstract class Content implements ActiveRecordInterface * ); * * - * @param integer $versionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $versionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersion($versionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -4113,13 +4155,13 @@ abstract class Content implements ActiveRecordInterface * ); * * - * @param integer $fromVersionNumber - * @param integer $toVersionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $fromVersionNumber + * @param integer $toVersionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersions($fromVersionNumber, $toVersionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -4139,12 +4181,12 @@ abstract class Content implements ActiveRecordInterface * ); * * - * @param array $fromVersion An array representing the original version. - * @param array $toVersion An array representing the destination version. - * @param string $keys Main key used for the result diff (versions|columns). - * @param array $ignoredColumns The columns to exclude from the diff. + * @param array $fromVersion An array representing the original version. + * @param array $toVersion An array representing the destination version. + * @param string $keys Main key used for the result diff (versions|columns). + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ protected function computeDiff($fromVersion, $toVersion, $keys = 'columns', $ignoredColumns = array()) { @@ -4181,7 +4223,7 @@ abstract class Content implements ActiveRecordInterface /** * retrieve the last $number versions. * - * @param Integer $number the number of record to return. + * @param Integer $number the number of record to return. * @return PropelCollection|array \Thelia\Model\ContentVersion[] List of \Thelia\Model\ContentVersion objects */ public function getLastVersions($number = 10, $criteria = null, $con = null) @@ -4268,6 +4310,7 @@ abstract class Content implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ContentDocument.php b/core/lib/Thelia/Model/Base/ContentDocument.php index 7595e7d2c..cf4e8464a 100644 --- a/core/lib/Thelia/Model/Base/ContentDocument.php +++ b/core/lib/Thelia/Model/Base/ContentDocument.php @@ -32,6 +32,7 @@ abstract class ContentDocument implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentDocumentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class ContentDocument implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ContentDocument The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [content_id] column value. * - * @return int + * @return int */ public function getContentId() { + return $this->content_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class ContentDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class ContentDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class ContentDocument implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [content_id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) */ public function setContentId($v) { @@ -512,14 +518,15 @@ abstract class ContentDocument implements ActiveRecordInterface $this->aContent = null; } + return $this; } // setContentId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class ContentDocument implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class ContentDocument implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class ContentDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class ContentDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class ContentDocument implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ContentDocument::setDeleted() @@ -779,8 +790,8 @@ abstract class ContentDocument implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class ContentDocument implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class ContentDocument implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class ContentDocument implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class ContentDocument implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class ContentDocument implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class ContentDocument implements ActiveRecordInterface if ($this->isColumnModified(ContentDocumentTableMap::POSITION)) $criteria->add(ContentDocumentTableMap::POSITION, $this->position); if ($this->isColumnModified(ContentDocumentTableMap::CREATED_AT)) $criteria->add(ContentDocumentTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ContentDocumentTableMap::UPDATED_AT)) $criteria->add(ContentDocumentTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class ContentDocument implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class ContentDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ContentDocument (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ContentDocument (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class ContentDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ContentDocument Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ContentDocument Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Declares an association between this object and a ChildContent object. * - * @param ChildContent $v - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param ChildContent $v + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) * @throws PropelException */ public function setContent(ChildContent $v = null) @@ -1323,14 +1336,16 @@ abstract class ContentDocument implements ActiveRecordInterface $v->addContentDocument($this); } + return $this; } + /** * Get the associated ChildContent object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContent The associated ChildContent object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContent The associated ChildContent object. * @throws PropelException */ public function getContent(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class ContentDocument implements ActiveRecordInterface return $this->aContent; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class ContentDocument implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class ContentDocument implements ActiveRecordInterface * If this ChildContentDocument is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentDocumentI18n[] List of ChildContentDocumentI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class ContentDocument implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentDocumentI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContentDocument The current object (for fluent API support) + * @param Collection $contentDocumentI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContentDocument The current object (for fluent API support) */ public function setContentDocumentI18ns(Collection $contentDocumentI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Returns the number of related ContentDocumentI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentDocumentI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentDocumentI18n objects. * @throws PropelException */ public function countContentDocumentI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class ContentDocument implements ActiveRecordInterface * Method called to associate a ChildContentDocumentI18n object to this object * through the ChildContentDocumentI18n foreign key attribute. * - * @param ChildContentDocumentI18n $l ChildContentDocumentI18n - * @return \Thelia\Model\ContentDocument The current object (for fluent API support) + * @param ChildContentDocumentI18n $l ChildContentDocumentI18n + * @return \Thelia\Model\ContentDocument The current object (for fluent API support) */ public function addContentDocumentI18n(ChildContentDocumentI18n $l) { @@ -1571,7 +1587,7 @@ abstract class ContentDocument implements ActiveRecordInterface } /** - * @param ContentDocumentI18n $contentDocumentI18n The contentDocumentI18n object to remove. + * @param ContentDocumentI18n $contentDocumentI18n The contentDocumentI18n object to remove. * @return ChildContentDocument The current object (for fluent API support) */ public function removeContentDocumentI18n($contentDocumentI18n) @@ -1614,7 +1630,7 @@ abstract class ContentDocument implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildContentDocument The current object (for fluent API support) + * @return ChildContentDocument The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildContentDocument The current object (for fluent API support) + * @return ChildContentDocument The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildContentDocumentI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildContentDocument The current object (for fluent API support) + * @return ChildContentDocument The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class ContentDocument implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildContentDocumentI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/ContentDocumentI18n.php b/core/lib/Thelia/Model/Base/ContentDocumentI18n.php index af0b1fada..e3f7a6a42 100644 --- a/core/lib/Thelia/Model/Base/ContentDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/ContentDocumentI18n.php @@ -26,6 +26,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentDocumentI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ContentDocumentI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface $this->aContentDocument = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentDocumentI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ContentDocumentI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ContentDocumentI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface if ($this->isColumnModified(ContentDocumentI18nTableMap::DESCRIPTION)) $criteria->add(ContentDocumentI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ContentDocumentI18nTableMap::CHAPO)) $criteria->add(ContentDocumentI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ContentDocumentI18nTableMap::POSTSCRIPTUM)) $criteria->add(ContentDocumentI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ContentDocumentI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ContentDocumentI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ContentDocumentI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ContentDocumentI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildContentDocument object. * - * @param ChildContentDocument $v - * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) + * @param ChildContentDocument $v + * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) * @throws PropelException */ public function setContentDocument(ChildContentDocument $v = null) @@ -1231,14 +1247,16 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface $v->addContentDocumentI18n($this); } + return $this; } + /** * Get the associated ChildContentDocument object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContentDocument The associated ChildContentDocument object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContentDocument The associated ChildContentDocument object. * @throws PropelException */ public function getContentDocument(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ContentDocumentI18nQuery.php b/core/lib/Thelia/Model/Base/ContentDocumentI18nQuery.php index 518e12083..67ef58154 100644 --- a/core/lib/Thelia/Model/Base/ContentDocumentI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ContentDocumentI18nQuery.php @@ -67,9 +67,9 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentDocumentI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ContentDocumentI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Returns a new ChildContentDocumentI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentDocumentI18nQuery */ @@ -140,10 +140,10 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContentDocumentI18n A model object, or null if the key is not found + * @return ChildContentDocumentI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContentDocumentI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * * @see filterByContentDocument() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ContentDocument object * * @param \Thelia\Model\ContentDocument|ObjectCollection $contentDocument The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentDocumentQuery A secondary query class using the current class as primary query */ public function useContentDocumentQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContentDocumentI18n $contentDocumentI18n Object to remove from the list of results + * @param ChildContentDocumentI18n $contentDocumentI18n Object to remove from the list of results * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Deletes all rows from the content_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContentDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContentDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContentDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ContentDocumentI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentDocumentI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ContentDocumentQuery.php b/core/lib/Thelia/Model/Base/ContentDocumentQuery.php index 8018a0f92..f6e09b426 100644 --- a/core/lib/Thelia/Model/Base/ContentDocumentQuery.php +++ b/core/lib/Thelia/Model/Base/ContentDocumentQuery.php @@ -72,9 +72,9 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentDocumentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ContentDocument', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Returns a new ChildContentDocumentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentDocumentQuery */ @@ -114,7 +114,7 @@ abstract class ContentDocumentQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildContentDocument|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class ContentDocumentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContentDocument A model object, or null if the key is not found + * @return ChildContentDocument A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContentDocument|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class ContentDocumentQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ContentDocumentTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ContentDocumentTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class ContentDocumentQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class ContentDocumentQuery extends ModelCriteria * * @see filterByContent() * - * @param mixed $contentId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $contentId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class ContentDocumentQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class ContentDocumentQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class ContentDocumentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class ContentDocumentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Content object * - * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Content relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class ContentDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query */ public function useContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentDocumentI18n object * - * @param \Thelia\Model\ContentDocumentI18n|ObjectCollection $contentDocumentI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentDocumentI18n|ObjectCollection $contentDocumentI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentDocumentI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class ContentDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentDocumentI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentDocumentI18nQuery A secondary query class using the current class as primary query */ public function useContentDocumentI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContentDocument $contentDocument Object to remove from the list of results + * @param ChildContentDocument $contentDocument Object to remove from the list of results * * @return ChildContentDocumentQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Deletes all rows from the content_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContentDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContentDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContentDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class ContentDocumentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentDocumentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class ContentDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class ContentDocumentQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentDocumentQuery The current query, for fluid interface + * @return ChildContentDocumentQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class ContentDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentDocumentI18nQuery A secondary query class using the current class as primary query + * @return ChildContentDocumentI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/ContentFolder.php b/core/lib/Thelia/Model/Base/ContentFolder.php index b7d481cc0..f58fcd62c 100644 --- a/core/lib/Thelia/Model/Base/ContentFolder.php +++ b/core/lib/Thelia/Model/Base/ContentFolder.php @@ -31,6 +31,7 @@ abstract class ContentFolder implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentFolderTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -314,9 +315,9 @@ abstract class ContentFolder implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ContentFolder The current object, for fluid interface */ @@ -366,30 +367,33 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Get the [content_id] column value. * - * @return int + * @return int */ public function getContentId() { + return $this->content_id; } /** * Get the [folder_id] column value. * - * @return int + * @return int */ public function getFolderId() { + return $this->folder_id; } /** * Get the [default_folder] column value. * - * @return boolean + * @return boolean */ public function getDefaultFolder() { + return $this->default_folder; } @@ -397,8 +401,8 @@ abstract class ContentFolder implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -417,8 +421,8 @@ abstract class ContentFolder implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -436,8 +440,8 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Set the value of [content_id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentFolder The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentFolder The current object (for fluent API support) */ public function setContentId($v) { @@ -454,14 +458,15 @@ abstract class ContentFolder implements ActiveRecordInterface $this->aContent = null; } + return $this; } // setContentId() /** * Set the value of [folder_id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentFolder The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentFolder The current object (for fluent API support) */ public function setFolderId($v) { @@ -478,6 +483,7 @@ abstract class ContentFolder implements ActiveRecordInterface $this->aFolder = null; } + return $this; } // setFolderId() @@ -488,8 +494,8 @@ abstract class ContentFolder implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\ContentFolder The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\ContentFolder The current object (for fluent API support) */ public function setDefaultFolder($v) { @@ -506,15 +512,16 @@ abstract class ContentFolder implements ActiveRecordInterface $this->modifiedColumns[ContentFolderTableMap::DEFAULT_FOLDER] = true; } + return $this; } // setDefaultFolder() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentFolder The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentFolder The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -526,15 +533,16 @@ abstract class ContentFolder implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentFolder The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentFolder The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -546,6 +554,7 @@ abstract class ContentFolder implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -649,10 +658,10 @@ abstract class ContentFolder implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -689,7 +698,7 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ContentFolder::setDeleted() @@ -732,8 +741,8 @@ abstract class ContentFolder implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -794,8 +803,8 @@ abstract class ContentFolder implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -845,7 +854,7 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -855,6 +864,7 @@ abstract class ContentFolder implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; + // check the columns in natural order for more readable SQL queries if ($this->isColumnModified(ContentFolderTableMap::CONTENT_ID)) { $modifiedColumns[':p' . $index++] = '`CONTENT_ID`'; @@ -911,7 +921,7 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -927,12 +937,12 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -946,7 +956,7 @@ abstract class ContentFolder implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -979,12 +989,12 @@ abstract class ContentFolder implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1022,12 +1032,12 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1041,8 +1051,8 @@ abstract class ContentFolder implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1079,8 +1089,8 @@ abstract class ContentFolder implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1108,6 +1118,7 @@ abstract class ContentFolder implements ActiveRecordInterface if ($this->isColumnModified(ContentFolderTableMap::DEFAULT_FOLDER)) $criteria->add(ContentFolderTableMap::DEFAULT_FOLDER, $this->default_folder); if ($this->isColumnModified(ContentFolderTableMap::CREATED_AT)) $criteria->add(ContentFolderTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ContentFolderTableMap::UPDATED_AT)) $criteria->add(ContentFolderTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1145,7 +1156,7 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1160,6 +1171,7 @@ abstract class ContentFolder implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getContentId()) && (null === $this->getFolderId()); } @@ -1169,9 +1181,9 @@ abstract class ContentFolder implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ContentFolder (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ContentFolder (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1206,8 @@ abstract class ContentFolder implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ContentFolder Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ContentFolder Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1223,8 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Declares an association between this object and a ChildContent object. * - * @param ChildContent $v - * @return \Thelia\Model\ContentFolder The current object (for fluent API support) + * @param ChildContent $v + * @return \Thelia\Model\ContentFolder The current object (for fluent API support) * @throws PropelException */ public function setContent(ChildContent $v = null) @@ -1231,6 +1243,7 @@ abstract class ContentFolder implements ActiveRecordInterface $v->addContentFolder($this); } + return $this; } @@ -1238,8 +1251,8 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Get the associated ChildContent object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContent The associated ChildContent object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContent The associated ChildContent object. * @throws PropelException */ public function getContent(ConnectionInterface $con = null) @@ -1261,8 +1274,8 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Declares an association between this object and a ChildFolder object. * - * @param ChildFolder $v - * @return \Thelia\Model\ContentFolder The current object (for fluent API support) + * @param ChildFolder $v + * @return \Thelia\Model\ContentFolder The current object (for fluent API support) * @throws PropelException */ public function setFolder(ChildFolder $v = null) @@ -1281,6 +1294,7 @@ abstract class ContentFolder implements ActiveRecordInterface $v->addContentFolder($this); } + return $this; } @@ -1288,8 +1302,8 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Get the associated ChildFolder object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFolder The associated ChildFolder object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFolder The associated ChildFolder object. * @throws PropelException */ public function getFolder(ConnectionInterface $con = null) @@ -1332,7 +1346,7 @@ abstract class ContentFolder implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1358,7 +1372,7 @@ abstract class ContentFolder implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildContentFolder The current object (for fluent API support) + * @return ChildContentFolder The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/ContentFolderQuery.php b/core/lib/Thelia/Model/Base/ContentFolderQuery.php index f405f3a70..4aa4e26df 100644 --- a/core/lib/Thelia/Model/Base/ContentFolderQuery.php +++ b/core/lib/Thelia/Model/Base/ContentFolderQuery.php @@ -67,9 +67,9 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentFolderQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ContentFolder', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Returns a new ChildContentFolderQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentFolderQuery */ @@ -140,10 +140,10 @@ abstract class ContentFolderQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContentFolder A model object, or null if the key is not found + * @return ChildContentFolder A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContentFolder|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ContentFolderQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ContentFolderQuery extends ModelCriteria * * @see filterByContent() * - * @param mixed $contentId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $contentId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -303,11 +303,11 @@ abstract class ContentFolderQuery extends ModelCriteria * * @see filterByFolder() * - * @param mixed $folderId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $folderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -343,12 +343,12 @@ abstract class ContentFolderQuery extends ModelCriteria * $query->filterByDefaultFolder('yes'); // WHERE default_folder = true * * - * @param boolean|string $defaultFolder The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $defaultFolder The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -371,13 +371,13 @@ abstract class ContentFolderQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -414,13 +414,13 @@ abstract class ContentFolderQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -450,8 +450,8 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Content object * - * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -475,8 +475,8 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Content relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -509,11 +509,11 @@ abstract class ContentFolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query */ public function useContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -525,8 +525,8 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Folder object * - * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -550,8 +550,8 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Folder relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -584,11 +584,11 @@ abstract class ContentFolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query */ public function useFolderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -600,7 +600,7 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContentFolder $contentFolder Object to remove from the list of results + * @param ChildContentFolder $contentFolder Object to remove from the list of results * * @return ChildContentFolderQuery The current query, for fluid interface */ @@ -618,8 +618,8 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Deletes all rows from the content_folder table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -650,13 +650,13 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContentFolder or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContentFolder object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContentFolder object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -676,6 +676,7 @@ abstract class ContentFolderQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentFolderTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -694,9 +695,9 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildContentFolderQuery The current query, for fluid interface + * @return ChildContentFolderQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -706,9 +707,9 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildContentFolderQuery The current query, for fluid interface + * @return ChildContentFolderQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -718,7 +719,7 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildContentFolderQuery The current query, for fluid interface + * @return ChildContentFolderQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -728,7 +729,7 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildContentFolderQuery The current query, for fluid interface + * @return ChildContentFolderQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -738,7 +739,7 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildContentFolderQuery The current query, for fluid interface + * @return ChildContentFolderQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -748,7 +749,7 @@ abstract class ContentFolderQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildContentFolderQuery The current query, for fluid interface + * @return ChildContentFolderQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/ContentI18n.php b/core/lib/Thelia/Model/Base/ContentI18n.php index 9fabb1b29..904f88911 100644 --- a/core/lib/Thelia/Model/Base/ContentI18n.php +++ b/core/lib/Thelia/Model/Base/ContentI18n.php @@ -26,6 +26,7 @@ abstract class ContentI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class ContentI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ContentI18n The current object, for fluid interface */ @@ -394,98 +395,107 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Get the [meta_title] column value. * - * @return string + * @return string */ public function getMetaTitle() { + return $this->meta_title; } /** * Get the [meta_description] column value. * - * @return string + * @return string */ public function getMetaDescription() { + return $this->meta_description; } /** * Get the [meta_keywords] column value. * - * @return string + * @return string */ public function getMetaKeywords() { + return $this->meta_keywords; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setId($v) { @@ -502,14 +512,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->aContent = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -522,14 +533,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -542,14 +554,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -562,14 +575,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -582,14 +596,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -602,14 +617,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() /** * Set the value of [meta_title] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setMetaTitle($v) { @@ -622,14 +638,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::META_TITLE] = true; } + return $this; } // setMetaTitle() /** * Set the value of [meta_description] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setMetaDescription($v) { @@ -642,14 +659,15 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::META_DESCRIPTION] = true; } + return $this; } // setMetaDescription() /** * Set the value of [meta_keywords] column. * - * @param string $v new value - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) */ public function setMetaKeywords($v) { @@ -662,6 +680,7 @@ abstract class ContentI18n implements ActiveRecordInterface $this->modifiedColumns[ContentI18nTableMap::META_KEYWORDS] = true; } + return $this; } // setMetaKeywords() @@ -705,6 +724,7 @@ abstract class ContentI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ContentI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -771,10 +791,10 @@ abstract class ContentI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -810,7 +830,7 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ContentI18n::setDeleted() @@ -853,8 +873,8 @@ abstract class ContentI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -904,8 +924,8 @@ abstract class ContentI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -948,7 +968,7 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1039,7 +1059,7 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1055,12 +1075,12 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1074,7 +1094,7 @@ abstract class ContentI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1119,12 +1139,12 @@ abstract class ContentI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1163,12 +1183,12 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1182,8 +1202,8 @@ abstract class ContentI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1232,8 +1252,8 @@ abstract class ContentI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1269,6 +1289,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->isColumnModified(ContentI18nTableMap::META_TITLE)) $criteria->add(ContentI18nTableMap::META_TITLE, $this->meta_title); if ($this->isColumnModified(ContentI18nTableMap::META_DESCRIPTION)) $criteria->add(ContentI18nTableMap::META_DESCRIPTION, $this->meta_description); if ($this->isColumnModified(ContentI18nTableMap::META_KEYWORDS)) $criteria->add(ContentI18nTableMap::META_KEYWORDS, $this->meta_keywords); + return $criteria; } @@ -1306,7 +1327,7 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1321,6 +1342,7 @@ abstract class ContentI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1330,9 +1352,9 @@ abstract class ContentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ContentI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ContentI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1359,8 +1381,8 @@ abstract class ContentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ContentI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ContentI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1376,8 +1398,8 @@ abstract class ContentI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildContent object. * - * @param ChildContent $v - * @return \Thelia\Model\ContentI18n The current object (for fluent API support) + * @param ChildContent $v + * @return \Thelia\Model\ContentI18n The current object (for fluent API support) * @throws PropelException */ public function setContent(ChildContent $v = null) @@ -1396,14 +1418,16 @@ abstract class ContentI18n implements ActiveRecordInterface $v->addContentI18n($this); } + return $this; } + /** * Get the associated ChildContent object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContent The associated ChildContent object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContent The associated ChildContent object. * @throws PropelException */ public function getContent(ConnectionInterface $con = null) @@ -1451,7 +1475,7 @@ abstract class ContentI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ContentI18nQuery.php b/core/lib/Thelia/Model/Base/ContentI18nQuery.php index 3632883c2..c2b1dc15b 100644 --- a/core/lib/Thelia/Model/Base/ContentI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ContentI18nQuery.php @@ -79,9 +79,9 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ContentI18n', $modelAlias = null) { @@ -91,8 +91,8 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Returns a new ChildContentI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentI18nQuery */ @@ -152,10 +152,10 @@ abstract class ContentI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContentI18n A model object, or null if the key is not found + * @return ChildContentI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -183,8 +183,8 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContentI18n|array|mixed the result, formatted by the current formatter */ @@ -204,8 +204,8 @@ abstract class ContentI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -226,7 +226,7 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -241,7 +241,7 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -272,11 +272,11 @@ abstract class ContentI18nQuery extends ModelCriteria * * @see filterByContent() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -312,9 +312,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -341,9 +341,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -370,9 +370,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -399,9 +399,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -428,9 +428,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -457,9 +457,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByMetaTitle('%fooValue%'); // WHERE meta_title LIKE '%fooValue%' * * - * @param string $metaTitle The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaTitle The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -486,9 +486,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByMetaDescription('%fooValue%'); // WHERE meta_description LIKE '%fooValue%' * * - * @param string $metaDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -515,9 +515,9 @@ abstract class ContentI18nQuery extends ModelCriteria * $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%' * * - * @param string $metaKeywords The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaKeywords The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -538,8 +538,8 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Content object * - * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -563,8 +563,8 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Content relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -597,11 +597,11 @@ abstract class ContentI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query */ public function useContentQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -613,7 +613,7 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContentI18n $contentI18n Object to remove from the list of results + * @param ChildContentI18n $contentI18n Object to remove from the list of results * * @return ChildContentI18nQuery The current query, for fluid interface */ @@ -631,8 +631,8 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Deletes all rows from the content_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -663,13 +663,13 @@ abstract class ContentI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -689,6 +689,7 @@ abstract class ContentI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ContentImage.php b/core/lib/Thelia/Model/Base/ContentImage.php index 0b1085a2f..62fad409f 100644 --- a/core/lib/Thelia/Model/Base/ContentImage.php +++ b/core/lib/Thelia/Model/Base/ContentImage.php @@ -32,6 +32,7 @@ abstract class ContentImage implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentImageTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class ContentImage implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ContentImage The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class ContentImage implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [content_id] column value. * - * @return int + * @return int */ public function getContentId() { + return $this->content_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class ContentImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class ContentImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class ContentImage implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentImage The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class ContentImage implements ActiveRecordInterface $this->modifiedColumns[ContentImageTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [content_id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentImage The current object (for fluent API support) */ public function setContentId($v) { @@ -512,14 +518,15 @@ abstract class ContentImage implements ActiveRecordInterface $this->aContent = null; } + return $this; } // setContentId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentImage The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class ContentImage implements ActiveRecordInterface $this->modifiedColumns[ContentImageTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentImage The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class ContentImage implements ActiveRecordInterface $this->modifiedColumns[ContentImageTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentImage The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class ContentImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentImage The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class ContentImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class ContentImage implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ContentImage::setDeleted() @@ -779,8 +790,8 @@ abstract class ContentImage implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class ContentImage implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class ContentImage implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class ContentImage implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class ContentImage implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class ContentImage implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class ContentImage implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class ContentImage implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class ContentImage implements ActiveRecordInterface if ($this->isColumnModified(ContentImageTableMap::POSITION)) $criteria->add(ContentImageTableMap::POSITION, $this->position); if ($this->isColumnModified(ContentImageTableMap::CREATED_AT)) $criteria->add(ContentImageTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ContentImageTableMap::UPDATED_AT)) $criteria->add(ContentImageTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class ContentImage implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class ContentImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ContentImage (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ContentImage (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class ContentImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ContentImage Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ContentImage Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class ContentImage implements ActiveRecordInterface /** * Declares an association between this object and a ChildContent object. * - * @param ChildContent $v - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param ChildContent $v + * @return \Thelia\Model\ContentImage The current object (for fluent API support) * @throws PropelException */ public function setContent(ChildContent $v = null) @@ -1323,14 +1336,16 @@ abstract class ContentImage implements ActiveRecordInterface $v->addContentImage($this); } + return $this; } + /** * Get the associated ChildContent object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContent The associated ChildContent object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContent The associated ChildContent object. * @throws PropelException */ public function getContent(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class ContentImage implements ActiveRecordInterface return $this->aContent; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class ContentImage implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class ContentImage implements ActiveRecordInterface * If this ChildContentImage is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentImageI18n[] List of ChildContentImageI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class ContentImage implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentImageI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildContentImage The current object (for fluent API support) + * @param Collection $contentImageI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildContentImage The current object (for fluent API support) */ public function setContentImageI18ns(Collection $contentImageI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class ContentImage implements ActiveRecordInterface /** * Returns the number of related ContentImageI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentImageI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentImageI18n objects. * @throws PropelException */ public function countContentImageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class ContentImage implements ActiveRecordInterface * Method called to associate a ChildContentImageI18n object to this object * through the ChildContentImageI18n foreign key attribute. * - * @param ChildContentImageI18n $l ChildContentImageI18n - * @return \Thelia\Model\ContentImage The current object (for fluent API support) + * @param ChildContentImageI18n $l ChildContentImageI18n + * @return \Thelia\Model\ContentImage The current object (for fluent API support) */ public function addContentImageI18n(ChildContentImageI18n $l) { @@ -1571,7 +1587,7 @@ abstract class ContentImage implements ActiveRecordInterface } /** - * @param ContentImageI18n $contentImageI18n The contentImageI18n object to remove. + * @param ContentImageI18n $contentImageI18n The contentImageI18n object to remove. * @return ChildContentImage The current object (for fluent API support) */ public function removeContentImageI18n($contentImageI18n) @@ -1614,7 +1630,7 @@ abstract class ContentImage implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildContentImage The current object (for fluent API support) + * @return ChildContentImage The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class ContentImage implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildContentImage The current object (for fluent API support) + * @return ChildContentImage The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class ContentImage implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildContentImageI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class ContentImage implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildContentImage The current object (for fluent API support) + * @return ChildContentImage The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class ContentImage implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildContentImageI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/ContentImageI18n.php b/core/lib/Thelia/Model/Base/ContentImageI18n.php index 2c3c87537..b29fc6d9d 100644 --- a/core/lib/Thelia/Model/Base/ContentImageI18n.php +++ b/core/lib/Thelia/Model/Base/ContentImageI18n.php @@ -26,6 +26,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentImageI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ContentImageI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ContentImageI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ContentImageI18n implements ActiveRecordInterface $this->aContentImage = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ContentImageI18n implements ActiveRecordInterface $this->modifiedColumns[ContentImageI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ContentImageI18n implements ActiveRecordInterface $this->modifiedColumns[ContentImageI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ContentImageI18n implements ActiveRecordInterface $this->modifiedColumns[ContentImageI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ContentImageI18n implements ActiveRecordInterface $this->modifiedColumns[ContentImageI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface $this->modifiedColumns[ContentImageI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ContentImageI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ContentImageI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ContentImageI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ContentImageI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ContentImageI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ContentImageI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ContentImageI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ContentImageI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface if ($this->isColumnModified(ContentImageI18nTableMap::DESCRIPTION)) $criteria->add(ContentImageI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ContentImageI18nTableMap::CHAPO)) $criteria->add(ContentImageI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ContentImageI18nTableMap::POSTSCRIPTUM)) $criteria->add(ContentImageI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ContentImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ContentImageI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ContentImageI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ContentImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ContentImageI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ContentImageI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ContentImageI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildContentImage object. * - * @param ChildContentImage $v - * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) + * @param ChildContentImage $v + * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) * @throws PropelException */ public function setContentImage(ChildContentImage $v = null) @@ -1231,14 +1247,16 @@ abstract class ContentImageI18n implements ActiveRecordInterface $v->addContentImageI18n($this); } + return $this; } + /** * Get the associated ChildContentImage object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContentImage The associated ChildContentImage object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContentImage The associated ChildContentImage object. * @throws PropelException */ public function getContentImage(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ContentImageI18nQuery.php b/core/lib/Thelia/Model/Base/ContentImageI18nQuery.php index 56beef66a..e99e58f37 100644 --- a/core/lib/Thelia/Model/Base/ContentImageI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ContentImageI18nQuery.php @@ -67,9 +67,9 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentImageI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ContentImageI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Returns a new ChildContentImageI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentImageI18nQuery */ @@ -140,10 +140,10 @@ abstract class ContentImageI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContentImageI18n A model object, or null if the key is not found + * @return ChildContentImageI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContentImageI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ContentImageI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ContentImageI18nQuery extends ModelCriteria * * @see filterByContentImage() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ContentImageI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ContentImageI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ContentImageI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ContentImageI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ContentImageI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class ContentImageI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ContentImage object * * @param \Thelia\Model\ContentImage|ObjectCollection $contentImage The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ContentImageI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentImageQuery A secondary query class using the current class as primary query */ public function useContentImageQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContentImageI18n $contentImageI18n Object to remove from the list of results + * @param ChildContentImageI18n $contentImageI18n Object to remove from the list of results * * @return ChildContentImageI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Deletes all rows from the content_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ContentImageI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContentImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContentImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContentImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ContentImageI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentImageI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ContentImageQuery.php b/core/lib/Thelia/Model/Base/ContentImageQuery.php index 93b944ae1..339bdfc55 100644 --- a/core/lib/Thelia/Model/Base/ContentImageQuery.php +++ b/core/lib/Thelia/Model/Base/ContentImageQuery.php @@ -72,9 +72,9 @@ abstract class ContentImageQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentImageQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ContentImage', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class ContentImageQuery extends ModelCriteria /** * Returns a new ChildContentImageQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentImageQuery */ @@ -114,7 +114,7 @@ abstract class ContentImageQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildContentImage|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class ContentImageQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContentImage A model object, or null if the key is not found + * @return ChildContentImage A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class ContentImageQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContentImage|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class ContentImageQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class ContentImageQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentImageQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ContentImageTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentImageQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ContentImageTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class ContentImageQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class ContentImageQuery extends ModelCriteria * * @see filterByContent() * - * @param mixed $contentId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $contentId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class ContentImageQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class ContentImageQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class ContentImageQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class ContentImageQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class ContentImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Content object * - * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class ContentImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Content relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class ContentImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query */ public function useContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class ContentImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentImageI18n object * - * @param \Thelia\Model\ContentImageI18n|ObjectCollection $contentImageI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentImageI18n|ObjectCollection $contentImageI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class ContentImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentImageI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class ContentImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentImageI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentImageI18nQuery A secondary query class using the current class as primary query */ public function useContentImageI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class ContentImageQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContentImage $contentImage Object to remove from the list of results + * @param ChildContentImage $contentImage Object to remove from the list of results * * @return ChildContentImageQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class ContentImageQuery extends ModelCriteria /** * Deletes all rows from the content_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class ContentImageQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContentImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContentImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContentImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class ContentImageQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentImageTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class ContentImageQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class ContentImageQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class ContentImageQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class ContentImageQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class ContentImageQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class ContentImageQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class ContentImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class ContentImageQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentImageQuery The current query, for fluid interface + * @return ChildContentImageQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class ContentImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentImageI18nQuery A secondary query class using the current class as primary query + * @return ChildContentImageI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/ContentQuery.php b/core/lib/Thelia/Model/Base/ContentQuery.php index c3a9ecdac..0cbd7191d 100644 --- a/core/lib/Thelia/Model/Base/ContentQuery.php +++ b/core/lib/Thelia/Model/Base/ContentQuery.php @@ -107,9 +107,9 @@ abstract class ContentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Content', $modelAlias = null) { @@ -119,8 +119,8 @@ abstract class ContentQuery extends ModelCriteria /** * Returns a new ChildContentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentQuery */ @@ -149,7 +149,7 @@ abstract class ContentQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildContent|array|mixed the result, formatted by the current formatter @@ -180,10 +180,10 @@ abstract class ContentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContent A model object, or null if the key is not found + * @return ChildContent A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -210,8 +210,8 @@ abstract class ContentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContent|array|mixed the result, formatted by the current formatter */ @@ -231,8 +231,8 @@ abstract class ContentQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -253,24 +253,26 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ContentTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ContentTableMap::ID, $keys, Criteria::IN); } @@ -284,11 +286,11 @@ abstract class ContentQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -325,11 +327,11 @@ abstract class ContentQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -366,11 +368,11 @@ abstract class ContentQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -407,13 +409,13 @@ abstract class ContentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -450,13 +452,13 @@ abstract class ContentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -493,11 +495,11 @@ abstract class ContentQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -534,13 +536,13 @@ abstract class ContentQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -576,9 +578,9 @@ abstract class ContentQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -599,8 +601,8 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentFolder object * - * @param \Thelia\Model\ContentFolder|ObjectCollection $contentFolder the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentFolder|ObjectCollection $contentFolder the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -622,8 +624,8 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentFolder relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentQuery The current query, for fluid interface */ @@ -656,11 +658,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentFolderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentFolderQuery A secondary query class using the current class as primary query */ public function useContentFolderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -672,8 +674,8 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentImage object * - * @param \Thelia\Model\ContentImage|ObjectCollection $contentImage the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentImage|ObjectCollection $contentImage the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -695,8 +697,8 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentQuery The current query, for fluid interface */ @@ -729,11 +731,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentImageQuery A secondary query class using the current class as primary query */ public function useContentImageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -745,8 +747,8 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentDocument object * - * @param \Thelia\Model\ContentDocument|ObjectCollection $contentDocument the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentDocument|ObjectCollection $contentDocument the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -768,8 +770,8 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentQuery The current query, for fluid interface */ @@ -802,11 +804,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentDocumentQuery A secondary query class using the current class as primary query */ public function useContentDocumentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -818,8 +820,8 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductAssociatedContent object * - * @param \Thelia\Model\ProductAssociatedContent|ObjectCollection $productAssociatedContent the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductAssociatedContent|ObjectCollection $productAssociatedContent the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -841,8 +843,8 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductAssociatedContent relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentQuery The current query, for fluid interface */ @@ -875,11 +877,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductAssociatedContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductAssociatedContentQuery A secondary query class using the current class as primary query */ public function useProductAssociatedContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -891,8 +893,8 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CategoryAssociatedContent object * - * @param \Thelia\Model\CategoryAssociatedContent|ObjectCollection $categoryAssociatedContent the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CategoryAssociatedContent|ObjectCollection $categoryAssociatedContent the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -914,8 +916,8 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CategoryAssociatedContent relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentQuery The current query, for fluid interface */ @@ -948,11 +950,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryAssociatedContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryAssociatedContentQuery A secondary query class using the current class as primary query */ public function useCategoryAssociatedContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -964,8 +966,8 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentI18n object * - * @param \Thelia\Model\ContentI18n|ObjectCollection $contentI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentI18n|ObjectCollection $contentI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -987,8 +989,8 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentQuery The current query, for fluid interface */ @@ -1021,11 +1023,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentI18nQuery A secondary query class using the current class as primary query */ public function useContentI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -1037,8 +1039,8 @@ abstract class ContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentVersion object * - * @param \Thelia\Model\ContentVersion|ObjectCollection $contentVersion the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentVersion|ObjectCollection $contentVersion the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ @@ -1060,8 +1062,8 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentVersion relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentQuery The current query, for fluid interface */ @@ -1094,11 +1096,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentVersionQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentVersionQuery A secondary query class using the current class as primary query */ public function useContentVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1111,7 +1113,7 @@ abstract class ContentQuery extends ModelCriteria * Filter the query by a related Folder object * using the content_folder table as cross reference * - * @param Folder $folder the related object to use as filter + * @param Folder $folder the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface @@ -1127,7 +1129,7 @@ abstract class ContentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContent $content Object to remove from the list of results + * @param ChildContent $content Object to remove from the list of results * * @return ChildContentQuery The current query, for fluid interface */ @@ -1143,8 +1145,8 @@ abstract class ContentQuery extends ModelCriteria /** * Deletes all rows from the content table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1175,13 +1177,13 @@ abstract class ContentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContent or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContent object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContent object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1201,6 +1203,7 @@ abstract class ContentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1219,9 +1222,9 @@ abstract class ContentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1231,9 +1234,9 @@ abstract class ContentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1243,7 +1246,7 @@ abstract class ContentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1253,7 +1256,7 @@ abstract class ContentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1263,7 +1266,7 @@ abstract class ContentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1273,7 +1276,7 @@ abstract class ContentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1285,11 +1288,11 @@ abstract class ContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1304,10 +1307,10 @@ abstract class ContentQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentQuery The current query, for fluid interface + * @return ChildContentQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1324,11 +1327,11 @@ abstract class ContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildContentI18nQuery A secondary query class using the current class as primary query + * @return ChildContentI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1344,7 +1347,7 @@ abstract class ContentQuery extends ModelCriteria * * @return boolean */ - public static function isVersioningEnabled() + static public function isVersioningEnabled() { return self::$isVersioningEnabled; } @@ -1352,7 +1355,7 @@ abstract class ContentQuery extends ModelCriteria /** * Enables versioning */ - public static function enableVersioning() + static public function enableVersioning() { self::$isVersioningEnabled = true; } @@ -1360,7 +1363,7 @@ abstract class ContentQuery extends ModelCriteria /** * Disables versioning */ - public static function disableVersioning() + static public function disableVersioning() { self::$isVersioningEnabled = false; } diff --git a/core/lib/Thelia/Model/Base/ContentVersion.php b/core/lib/Thelia/Model/Base/ContentVersion.php index 072122d47..b42831072 100644 --- a/core/lib/Thelia/Model/Base/ContentVersion.php +++ b/core/lib/Thelia/Model/Base/ContentVersion.php @@ -28,6 +28,7 @@ abstract class ContentVersion implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ContentVersionTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -338,9 +339,9 @@ abstract class ContentVersion implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ContentVersion The current object, for fluid interface */ @@ -390,30 +391,33 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -421,8 +425,8 @@ abstract class ContentVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -441,8 +445,8 @@ abstract class ContentVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -460,10 +464,11 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -471,8 +476,8 @@ abstract class ContentVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -490,18 +495,19 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setId($v) { @@ -518,14 +524,15 @@ abstract class ContentVersion implements ActiveRecordInterface $this->aContent = null; } + return $this; } // setId() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setVisible($v) { @@ -538,14 +545,15 @@ abstract class ContentVersion implements ActiveRecordInterface $this->modifiedColumns[ContentVersionTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setPosition($v) { @@ -558,15 +566,16 @@ abstract class ContentVersion implements ActiveRecordInterface $this->modifiedColumns[ContentVersionTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -578,15 +587,16 @@ abstract class ContentVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -598,14 +608,15 @@ abstract class ContentVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setVersion($v) { @@ -618,15 +629,16 @@ abstract class ContentVersion implements ActiveRecordInterface $this->modifiedColumns[ContentVersionTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -638,14 +650,15 @@ abstract class ContentVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -658,6 +671,7 @@ abstract class ContentVersion implements ActiveRecordInterface $this->modifiedColumns[ContentVersionTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -701,6 +715,7 @@ abstract class ContentVersion implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ContentVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -773,10 +788,10 @@ abstract class ContentVersion implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -812,7 +827,7 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ContentVersion::setDeleted() @@ -855,8 +870,8 @@ abstract class ContentVersion implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -906,8 +921,8 @@ abstract class ContentVersion implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -950,7 +965,7 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1035,7 +1050,7 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1051,12 +1066,12 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1070,7 +1085,7 @@ abstract class ContentVersion implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1112,12 +1127,12 @@ abstract class ContentVersion implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1155,12 +1170,12 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1174,8 +1189,8 @@ abstract class ContentVersion implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1221,8 +1236,8 @@ abstract class ContentVersion implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1256,6 +1271,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->isColumnModified(ContentVersionTableMap::VERSION)) $criteria->add(ContentVersionTableMap::VERSION, $this->version); if ($this->isColumnModified(ContentVersionTableMap::VERSION_CREATED_AT)) $criteria->add(ContentVersionTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(ContentVersionTableMap::VERSION_CREATED_BY)) $criteria->add(ContentVersionTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1293,7 +1309,7 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1308,6 +1324,7 @@ abstract class ContentVersion implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getVersion()); } @@ -1317,9 +1334,9 @@ abstract class ContentVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ContentVersion (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ContentVersion (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1345,8 +1362,8 @@ abstract class ContentVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ContentVersion Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ContentVersion Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1362,8 +1379,8 @@ abstract class ContentVersion implements ActiveRecordInterface /** * Declares an association between this object and a ChildContent object. * - * @param ChildContent $v - * @return \Thelia\Model\ContentVersion The current object (for fluent API support) + * @param ChildContent $v + * @return \Thelia\Model\ContentVersion The current object (for fluent API support) * @throws PropelException */ public function setContent(ChildContent $v = null) @@ -1382,14 +1399,16 @@ abstract class ContentVersion implements ActiveRecordInterface $v->addContentVersion($this); } + return $this; } + /** * Get the associated ChildContent object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContent The associated ChildContent object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContent The associated ChildContent object. * @throws PropelException */ public function getContent(ConnectionInterface $con = null) @@ -1436,7 +1455,7 @@ abstract class ContentVersion implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ContentVersionQuery.php b/core/lib/Thelia/Model/Base/ContentVersionQuery.php index e37406271..6e8481c99 100644 --- a/core/lib/Thelia/Model/Base/ContentVersionQuery.php +++ b/core/lib/Thelia/Model/Base/ContentVersionQuery.php @@ -75,9 +75,9 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ContentVersionQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ContentVersion', $modelAlias = null) { @@ -87,8 +87,8 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Returns a new ChildContentVersionQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildContentVersionQuery */ @@ -148,10 +148,10 @@ abstract class ContentVersionQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildContentVersion A model object, or null if the key is not found + * @return ChildContentVersion A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -179,8 +179,8 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildContentVersion|array|mixed the result, formatted by the current formatter */ @@ -200,8 +200,8 @@ abstract class ContentVersionQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -222,7 +222,7 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -237,7 +237,7 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -268,11 +268,11 @@ abstract class ContentVersionQuery extends ModelCriteria * * @see filterByContent() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -309,11 +309,11 @@ abstract class ContentVersionQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -350,11 +350,11 @@ abstract class ContentVersionQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -391,13 +391,13 @@ abstract class ContentVersionQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -434,13 +434,13 @@ abstract class ContentVersionQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -477,11 +477,11 @@ abstract class ContentVersionQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -518,13 +518,13 @@ abstract class ContentVersionQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -560,9 +560,9 @@ abstract class ContentVersionQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -583,8 +583,8 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Content object * - * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -608,8 +608,8 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Content relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -642,11 +642,11 @@ abstract class ContentVersionQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query */ public function useContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -658,7 +658,7 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildContentVersion $contentVersion Object to remove from the list of results + * @param ChildContentVersion $contentVersion Object to remove from the list of results * * @return ChildContentVersionQuery The current query, for fluid interface */ @@ -676,8 +676,8 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Deletes all rows from the content_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -708,13 +708,13 @@ abstract class ContentVersionQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildContentVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildContentVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildContentVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -734,6 +734,7 @@ abstract class ContentVersionQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ContentVersionTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/Country.php b/core/lib/Thelia/Model/Base/Country.php index 9995bb598..aa2597ceb 100644 --- a/core/lib/Thelia/Model/Base/Country.php +++ b/core/lib/Thelia/Model/Base/Country.php @@ -36,6 +36,7 @@ abstract class Country implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CountryTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -404,9 +405,9 @@ abstract class Country implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Country The current object, for fluid interface */ @@ -456,70 +457,77 @@ abstract class Country implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [area_id] column value. * - * @return int + * @return int */ public function getAreaId() { + return $this->area_id; } /** * Get the [isocode] column value. * - * @return string + * @return string */ public function getIsocode() { + return $this->isocode; } /** * Get the [isoalpha2] column value. * - * @return string + * @return string */ public function getIsoalpha2() { + return $this->isoalpha2; } /** * Get the [isoalpha3] column value. * - * @return string + * @return string */ public function getIsoalpha3() { + return $this->isoalpha3; } /** * Get the [by_default] column value. * - * @return int + * @return int */ public function getByDefault() { + return $this->by_default; } /** * Get the [shop_country] column value. * - * @return boolean + * @return boolean */ public function getShopCountry() { + return $this->shop_country; } @@ -527,8 +535,8 @@ abstract class Country implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -547,8 +555,8 @@ abstract class Country implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -566,8 +574,8 @@ abstract class Country implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setId($v) { @@ -580,14 +588,15 @@ abstract class Country implements ActiveRecordInterface $this->modifiedColumns[CountryTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [area_id] column. * - * @param int $v new value - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setAreaId($v) { @@ -604,14 +613,15 @@ abstract class Country implements ActiveRecordInterface $this->aArea = null; } + return $this; } // setAreaId() /** * Set the value of [isocode] column. * - * @param string $v new value - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setIsocode($v) { @@ -624,14 +634,15 @@ abstract class Country implements ActiveRecordInterface $this->modifiedColumns[CountryTableMap::ISOCODE] = true; } + return $this; } // setIsocode() /** * Set the value of [isoalpha2] column. * - * @param string $v new value - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setIsoalpha2($v) { @@ -644,14 +655,15 @@ abstract class Country implements ActiveRecordInterface $this->modifiedColumns[CountryTableMap::ISOALPHA2] = true; } + return $this; } // setIsoalpha2() /** * Set the value of [isoalpha3] column. * - * @param string $v new value - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setIsoalpha3($v) { @@ -664,14 +676,15 @@ abstract class Country implements ActiveRecordInterface $this->modifiedColumns[CountryTableMap::ISOALPHA3] = true; } + return $this; } // setIsoalpha3() /** * Set the value of [by_default] column. * - * @param int $v new value - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setByDefault($v) { @@ -684,6 +697,7 @@ abstract class Country implements ActiveRecordInterface $this->modifiedColumns[CountryTableMap::BY_DEFAULT] = true; } + return $this; } // setByDefault() @@ -694,8 +708,8 @@ abstract class Country implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setShopCountry($v) { @@ -712,15 +726,16 @@ abstract class Country implements ActiveRecordInterface $this->modifiedColumns[CountryTableMap::SHOP_COUNTRY] = true; } + return $this; } // setShopCountry() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -732,15 +747,16 @@ abstract class Country implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -752,6 +768,7 @@ abstract class Country implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -799,6 +816,7 @@ abstract class Country implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CountryTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -871,10 +889,10 @@ abstract class Country implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -916,7 +934,7 @@ abstract class Country implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Country::setDeleted() @@ -959,8 +977,8 @@ abstract class Country implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1021,8 +1039,8 @@ abstract class Country implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1116,7 +1134,7 @@ abstract class Country implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1218,7 +1236,7 @@ abstract class Country implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1234,12 +1252,12 @@ abstract class Country implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1253,7 +1271,7 @@ abstract class Country implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1298,12 +1316,12 @@ abstract class Country implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1351,12 +1369,12 @@ abstract class Country implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1370,8 +1388,8 @@ abstract class Country implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1420,8 +1438,8 @@ abstract class Country implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1457,6 +1475,7 @@ abstract class Country implements ActiveRecordInterface if ($this->isColumnModified(CountryTableMap::SHOP_COUNTRY)) $criteria->add(CountryTableMap::SHOP_COUNTRY, $this->shop_country); if ($this->isColumnModified(CountryTableMap::CREATED_AT)) $criteria->add(CountryTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CountryTableMap::UPDATED_AT)) $criteria->add(CountryTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1478,7 +1497,7 @@ abstract class Country implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1488,7 +1507,7 @@ abstract class Country implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1502,6 +1521,7 @@ abstract class Country implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1511,9 +1531,9 @@ abstract class Country implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Country (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Country (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1566,8 +1586,8 @@ abstract class Country implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Country Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Country Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1583,8 +1603,8 @@ abstract class Country implements ActiveRecordInterface /** * Declares an association between this object and a ChildArea object. * - * @param ChildArea $v - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param ChildArea $v + * @return \Thelia\Model\Country The current object (for fluent API support) * @throws PropelException */ public function setArea(ChildArea $v = null) @@ -1603,6 +1623,7 @@ abstract class Country implements ActiveRecordInterface $v->addCountry($this); } + return $this; } @@ -1610,8 +1631,8 @@ abstract class Country implements ActiveRecordInterface /** * Get the associated ChildArea object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildArea The associated ChildArea object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildArea The associated ChildArea object. * @throws PropelException */ public function getArea(ConnectionInterface $con = null) @@ -1636,7 +1657,7 @@ abstract class Country implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1681,8 +1702,8 @@ abstract class Country implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1704,8 +1725,8 @@ abstract class Country implements ActiveRecordInterface * If this ChildCountry is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects * @throws PropelException */ @@ -1761,14 +1782,15 @@ abstract class Country implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $taxRuleCountries A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCountry The current object (for fluent API support) + * @param Collection $taxRuleCountries A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCountry The current object (for fluent API support) */ public function setTaxRuleCountries(Collection $taxRuleCountries, ConnectionInterface $con = null) { $taxRuleCountriesToDelete = $this->getTaxRuleCountries(new Criteria(), $con)->diff($taxRuleCountries); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1792,10 +1814,10 @@ abstract class Country implements ActiveRecordInterface /** * Returns the number of related TaxRuleCountry objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related TaxRuleCountry objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related TaxRuleCountry objects. * @throws PropelException */ public function countTaxRuleCountries(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1827,8 +1849,8 @@ abstract class Country implements ActiveRecordInterface * Method called to associate a ChildTaxRuleCountry object to this object * through the ChildTaxRuleCountry foreign key attribute. * - * @param ChildTaxRuleCountry $l ChildTaxRuleCountry - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param ChildTaxRuleCountry $l ChildTaxRuleCountry + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function addTaxRuleCountry(ChildTaxRuleCountry $l) { @@ -1855,7 +1877,7 @@ abstract class Country implements ActiveRecordInterface /** * @param TaxRuleCountry $taxRuleCountry The taxRuleCountry object to remove. - * @return ChildCountry The current object (for fluent API support) + * @return ChildCountry The current object (for fluent API support) */ public function removeTaxRuleCountry($taxRuleCountry) { @@ -1872,6 +1894,7 @@ abstract class Country implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1883,9 +1906,9 @@ abstract class Country implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Country. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects */ public function getTaxRuleCountriesJoinTax($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1896,6 +1919,7 @@ abstract class Country implements ActiveRecordInterface return $this->getTaxRuleCountries($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1907,9 +1931,9 @@ abstract class Country implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Country. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects */ public function getTaxRuleCountriesJoinTaxRule($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1949,8 +1973,8 @@ abstract class Country implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1972,8 +1996,8 @@ abstract class Country implements ActiveRecordInterface * If this ChildCountry is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAddress[] List of ChildAddress objects * @throws PropelException */ @@ -2029,14 +2053,15 @@ abstract class Country implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $addresses A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCountry The current object (for fluent API support) + * @param Collection $addresses A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCountry The current object (for fluent API support) */ public function setAddresses(Collection $addresses, ConnectionInterface $con = null) { $addressesToDelete = $this->getAddresses(new Criteria(), $con)->diff($addresses); + $this->addressesScheduledForDeletion = $addressesToDelete; foreach ($addressesToDelete as $addressRemoved) { @@ -2057,10 +2082,10 @@ abstract class Country implements ActiveRecordInterface /** * Returns the number of related Address objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Address objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Address objects. * @throws PropelException */ public function countAddresses(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2092,8 +2117,8 @@ abstract class Country implements ActiveRecordInterface * Method called to associate a ChildAddress object to this object * through the ChildAddress foreign key attribute. * - * @param ChildAddress $l ChildAddress - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param ChildAddress $l ChildAddress + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function addAddress(ChildAddress $l) { @@ -2119,7 +2144,7 @@ abstract class Country implements ActiveRecordInterface } /** - * @param Address $address The address object to remove. + * @param Address $address The address object to remove. * @return ChildCountry The current object (for fluent API support) */ public function removeAddress($address) @@ -2137,6 +2162,7 @@ abstract class Country implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2148,9 +2174,9 @@ abstract class Country implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Country. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAddress[] List of ChildAddress objects */ public function getAddressesJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2161,6 +2187,7 @@ abstract class Country implements ActiveRecordInterface return $this->getAddresses($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2172,9 +2199,9 @@ abstract class Country implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Country. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAddress[] List of ChildAddress objects */ public function getAddressesJoinCustomerTitle($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2214,8 +2241,8 @@ abstract class Country implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2237,8 +2264,8 @@ abstract class Country implements ActiveRecordInterface * If this ChildCountry is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCountryI18n[] List of ChildCountryI18n objects * @throws PropelException */ @@ -2294,14 +2321,15 @@ abstract class Country implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $countryI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCountry The current object (for fluent API support) + * @param Collection $countryI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCountry The current object (for fluent API support) */ public function setCountryI18ns(Collection $countryI18ns, ConnectionInterface $con = null) { $countryI18nsToDelete = $this->getCountryI18ns(new Criteria(), $con)->diff($countryI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2325,10 +2353,10 @@ abstract class Country implements ActiveRecordInterface /** * Returns the number of related CountryI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CountryI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CountryI18n objects. * @throws PropelException */ public function countCountryI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2360,8 +2388,8 @@ abstract class Country implements ActiveRecordInterface * Method called to associate a ChildCountryI18n object to this object * through the ChildCountryI18n foreign key attribute. * - * @param ChildCountryI18n $l ChildCountryI18n - * @return \Thelia\Model\Country The current object (for fluent API support) + * @param ChildCountryI18n $l ChildCountryI18n + * @return \Thelia\Model\Country The current object (for fluent API support) */ public function addCountryI18n(ChildCountryI18n $l) { @@ -2391,7 +2419,7 @@ abstract class Country implements ActiveRecordInterface } /** - * @param CountryI18n $countryI18n The countryI18n object to remove. + * @param CountryI18n $countryI18n The countryI18n object to remove. * @return ChildCountry The current object (for fluent API support) */ public function removeCountryI18n($countryI18n) @@ -2438,7 +2466,7 @@ abstract class Country implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2485,7 +2513,7 @@ abstract class Country implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCountry The current object (for fluent API support) + * @return ChildCountry The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2499,9 +2527,9 @@ abstract class Country implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildCountry The current object (for fluent API support) + * @return ChildCountry The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2513,7 +2541,7 @@ abstract class Country implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2523,8 +2551,8 @@ abstract class Country implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildCountryI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2557,10 +2585,10 @@ abstract class Country implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildCountry The current object (for fluent API support) + * @return ChildCountry The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2585,7 +2613,7 @@ abstract class Country implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildCountryI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2593,6 +2621,7 @@ abstract class Country implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2603,6 +2632,7 @@ abstract class Country implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2615,6 +2645,7 @@ abstract class Country implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2625,6 +2656,7 @@ abstract class Country implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2637,6 +2669,7 @@ abstract class Country implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -2647,6 +2680,7 @@ abstract class Country implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -2659,6 +2693,7 @@ abstract class Country implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -2669,6 +2704,7 @@ abstract class Country implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -2757,6 +2793,7 @@ abstract class Country implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/CountryI18n.php b/core/lib/Thelia/Model/Base/CountryI18n.php index 27d654190..7088720ab 100644 --- a/core/lib/Thelia/Model/Base/CountryI18n.php +++ b/core/lib/Thelia/Model/Base/CountryI18n.php @@ -26,6 +26,7 @@ abstract class CountryI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CountryI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class CountryI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CountryI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CountryI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CountryI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class CountryI18n implements ActiveRecordInterface $this->aCountry = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\CountryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CountryI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class CountryI18n implements ActiveRecordInterface $this->modifiedColumns[CountryI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\CountryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CountryI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class CountryI18n implements ActiveRecordInterface $this->modifiedColumns[CountryI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\CountryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CountryI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class CountryI18n implements ActiveRecordInterface $this->modifiedColumns[CountryI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\CountryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CountryI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class CountryI18n implements ActiveRecordInterface $this->modifiedColumns[CountryI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\CountryI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CountryI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class CountryI18n implements ActiveRecordInterface $this->modifiedColumns[CountryI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class CountryI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CountryI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class CountryI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CountryI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class CountryI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class CountryI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class CountryI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class CountryI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class CountryI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class CountryI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class CountryI18n implements ActiveRecordInterface if ($this->isColumnModified(CountryI18nTableMap::DESCRIPTION)) $criteria->add(CountryI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(CountryI18nTableMap::CHAPO)) $criteria->add(CountryI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(CountryI18nTableMap::POSTSCRIPTUM)) $criteria->add(CountryI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class CountryI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class CountryI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CountryI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CountryI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class CountryI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CountryI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CountryI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class CountryI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildCountry object. * - * @param ChildCountry $v - * @return \Thelia\Model\CountryI18n The current object (for fluent API support) + * @param ChildCountry $v + * @return \Thelia\Model\CountryI18n The current object (for fluent API support) * @throws PropelException */ public function setCountry(ChildCountry $v = null) @@ -1231,14 +1247,16 @@ abstract class CountryI18n implements ActiveRecordInterface $v->addCountryI18n($this); } + return $this; } + /** * Get the associated ChildCountry object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCountry The associated ChildCountry object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCountry The associated ChildCountry object. * @throws PropelException */ public function getCountry(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class CountryI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CountryI18nQuery.php b/core/lib/Thelia/Model/Base/CountryI18nQuery.php index d91d33a0f..81ea2b508 100644 --- a/core/lib/Thelia/Model/Base/CountryI18nQuery.php +++ b/core/lib/Thelia/Model/Base/CountryI18nQuery.php @@ -67,9 +67,9 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CountryI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CountryI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Returns a new ChildCountryI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCountryI18nQuery */ @@ -140,10 +140,10 @@ abstract class CountryI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCountryI18n A model object, or null if the key is not found + * @return ChildCountryI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCountryI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class CountryI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class CountryI18nQuery extends ModelCriteria * * @see filterByCountry() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class CountryI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class CountryI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class CountryI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class CountryI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class CountryI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Country object * - * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Country relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class CountryI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query */ public function useCountryQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCountryI18n $countryI18n Object to remove from the list of results + * @param ChildCountryI18n $countryI18n Object to remove from the list of results * * @return ChildCountryI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Deletes all rows from the country_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class CountryI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCountryI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCountryI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCountryI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class CountryI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CountryI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/CountryQuery.php b/core/lib/Thelia/Model/Base/CountryQuery.php index 20488968f..270802f07 100644 --- a/core/lib/Thelia/Model/Base/CountryQuery.php +++ b/core/lib/Thelia/Model/Base/CountryQuery.php @@ -92,9 +92,9 @@ abstract class CountryQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CountryQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Country', $modelAlias = null) { @@ -104,8 +104,8 @@ abstract class CountryQuery extends ModelCriteria /** * Returns a new ChildCountryQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCountryQuery */ @@ -134,7 +134,7 @@ abstract class CountryQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCountry|array|mixed the result, formatted by the current formatter @@ -165,10 +165,10 @@ abstract class CountryQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCountry A model object, or null if the key is not found + * @return ChildCountry A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -195,8 +195,8 @@ abstract class CountryQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCountry|array|mixed the result, formatted by the current formatter */ @@ -216,8 +216,8 @@ abstract class CountryQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -238,24 +238,26 @@ abstract class CountryQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCountryQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CountryTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCountryQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CountryTableMap::ID, $keys, Criteria::IN); } @@ -269,11 +271,11 @@ abstract class CountryQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -312,11 +314,11 @@ abstract class CountryQuery extends ModelCriteria * * @see filterByArea() * - * @param mixed $areaId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $areaId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -352,9 +354,9 @@ abstract class CountryQuery extends ModelCriteria * $query->filterByIsocode('%fooValue%'); // WHERE isocode LIKE '%fooValue%' * * - * @param string $isocode The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $isocode The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -381,9 +383,9 @@ abstract class CountryQuery extends ModelCriteria * $query->filterByIsoalpha2('%fooValue%'); // WHERE isoalpha2 LIKE '%fooValue%' * * - * @param string $isoalpha2 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $isoalpha2 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -410,9 +412,9 @@ abstract class CountryQuery extends ModelCriteria * $query->filterByIsoalpha3('%fooValue%'); // WHERE isoalpha3 LIKE '%fooValue%' * * - * @param string $isoalpha3 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $isoalpha3 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -440,11 +442,11 @@ abstract class CountryQuery extends ModelCriteria * $query->filterByByDefault(array('min' => 12)); // WHERE by_default > 12 * * - * @param mixed $byDefault The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $byDefault The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -480,12 +482,12 @@ abstract class CountryQuery extends ModelCriteria * $query->filterByShopCountry('yes'); // WHERE shop_country = true * * - * @param boolean|string $shopCountry The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $shopCountry The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -508,13 +510,13 @@ abstract class CountryQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -551,13 +553,13 @@ abstract class CountryQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -587,8 +589,8 @@ abstract class CountryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Area object * - * @param \Thelia\Model\Area|ObjectCollection $area The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Area|ObjectCollection $area The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -612,8 +614,8 @@ abstract class CountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Area relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCountryQuery The current query, for fluid interface */ @@ -646,11 +648,11 @@ abstract class CountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AreaQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AreaQuery A secondary query class using the current class as primary query */ public function useAreaQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -662,8 +664,8 @@ abstract class CountryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxRuleCountry object * - * @param \Thelia\Model\TaxRuleCountry|ObjectCollection $taxRuleCountry the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxRuleCountry|ObjectCollection $taxRuleCountry the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -685,8 +687,8 @@ abstract class CountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxRuleCountry relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCountryQuery The current query, for fluid interface */ @@ -719,11 +721,11 @@ abstract class CountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxRuleCountryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxRuleCountryQuery A secondary query class using the current class as primary query */ public function useTaxRuleCountryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -735,8 +737,8 @@ abstract class CountryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Address object * - * @param \Thelia\Model\Address|ObjectCollection $address the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Address|ObjectCollection $address the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -758,8 +760,8 @@ abstract class CountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Address relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCountryQuery The current query, for fluid interface */ @@ -792,11 +794,11 @@ abstract class CountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query */ public function useAddressQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -808,8 +810,8 @@ abstract class CountryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CountryI18n object * - * @param \Thelia\Model\CountryI18n|ObjectCollection $countryI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CountryI18n|ObjectCollection $countryI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCountryQuery The current query, for fluid interface */ @@ -831,8 +833,8 @@ abstract class CountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CountryI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCountryQuery The current query, for fluid interface */ @@ -865,11 +867,11 @@ abstract class CountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CountryI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CountryI18nQuery A secondary query class using the current class as primary query */ public function useCountryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -881,7 +883,7 @@ abstract class CountryQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCountry $country Object to remove from the list of results + * @param ChildCountry $country Object to remove from the list of results * * @return ChildCountryQuery The current query, for fluid interface */ @@ -897,8 +899,8 @@ abstract class CountryQuery extends ModelCriteria /** * Deletes all rows from the country table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -929,13 +931,13 @@ abstract class CountryQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCountry or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCountry object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCountry object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -955,6 +957,7 @@ abstract class CountryQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CountryTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -973,9 +976,9 @@ abstract class CountryQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -985,9 +988,9 @@ abstract class CountryQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -997,7 +1000,7 @@ abstract class CountryQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1007,7 +1010,7 @@ abstract class CountryQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1017,7 +1020,7 @@ abstract class CountryQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1027,7 +1030,7 @@ abstract class CountryQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1039,11 +1042,11 @@ abstract class CountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1058,10 +1061,10 @@ abstract class CountryQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCountryQuery The current query, for fluid interface + * @return ChildCountryQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1078,11 +1081,11 @@ abstract class CountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCountryI18nQuery A secondary query class using the current class as primary query + * @return ChildCountryI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/Coupon.php b/core/lib/Thelia/Model/Base/Coupon.php index 0abe46f84..56d271683 100644 --- a/core/lib/Thelia/Model/Base/Coupon.php +++ b/core/lib/Thelia/Model/Base/Coupon.php @@ -33,6 +33,7 @@ abstract class Coupon implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CouponTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -186,6 +187,7 @@ abstract class Coupon implements ActiveRecordInterface // versionable behavior + /** * @var bool */ @@ -425,9 +427,9 @@ abstract class Coupon implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Coupon The current object, for fluid interface */ @@ -477,50 +479,55 @@ abstract class Coupon implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } /** * Get the [type] column value. * - * @return string + * @return string */ public function getType() { + return $this->type; } /** * Get the [serialized_effects] column value. * - * @return string + * @return string */ public function getSerializedEffects() { + return $this->serialized_effects; } /** * Get the [is_enabled] column value. * - * @return boolean + * @return boolean */ public function getIsEnabled() { + return $this->is_enabled; } @@ -528,8 +535,8 @@ abstract class Coupon implements ActiveRecordInterface * Get the [optionally formatted] temporal [expiration_date] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -547,60 +554,66 @@ abstract class Coupon implements ActiveRecordInterface /** * Get the [max_usage] column value. * - * @return int + * @return int */ public function getMaxUsage() { + return $this->max_usage; } /** * Get the [is_cumulative] column value. * - * @return boolean + * @return boolean */ public function getIsCumulative() { + return $this->is_cumulative; } /** * Get the [is_removing_postage] column value. * - * @return boolean + * @return boolean */ public function getIsRemovingPostage() { + return $this->is_removing_postage; } /** * Get the [is_available_on_special_offers] column value. * - * @return boolean + * @return boolean */ public function getIsAvailableOnSpecialOffers() { + return $this->is_available_on_special_offers; } /** * Get the [is_used] column value. * - * @return boolean + * @return boolean */ public function getIsUsed() { + return $this->is_used; } /** * Get the [serialized_conditions] column value. * - * @return string + * @return string */ public function getSerializedConditions() { + return $this->serialized_conditions; } @@ -608,8 +621,8 @@ abstract class Coupon implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -628,8 +641,8 @@ abstract class Coupon implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -647,18 +660,19 @@ abstract class Coupon implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setId($v) { @@ -671,14 +685,15 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setCode($v) { @@ -691,14 +706,15 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::CODE] = true; } + return $this; } // setCode() /** * Set the value of [type] column. * - * @param string $v new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setType($v) { @@ -711,14 +727,15 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::TYPE] = true; } + return $this; } // setType() /** * Set the value of [serialized_effects] column. * - * @param string $v new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setSerializedEffects($v) { @@ -731,6 +748,7 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::SERIALIZED_EFFECTS] = true; } + return $this; } // setSerializedEffects() @@ -741,8 +759,8 @@ abstract class Coupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setIsEnabled($v) { @@ -759,15 +777,16 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::IS_ENABLED] = true; } + return $this; } // setIsEnabled() /** * Sets the value of [expiration_date] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setExpirationDate($v) { @@ -779,14 +798,15 @@ abstract class Coupon implements ActiveRecordInterface } } // if either are not null + return $this; } // setExpirationDate() /** * Set the value of [max_usage] column. * - * @param int $v new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setMaxUsage($v) { @@ -799,6 +819,7 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::MAX_USAGE] = true; } + return $this; } // setMaxUsage() @@ -809,8 +830,8 @@ abstract class Coupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setIsCumulative($v) { @@ -827,6 +848,7 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::IS_CUMULATIVE] = true; } + return $this; } // setIsCumulative() @@ -837,8 +859,8 @@ abstract class Coupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setIsRemovingPostage($v) { @@ -855,6 +877,7 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::IS_REMOVING_POSTAGE] = true; } + return $this; } // setIsRemovingPostage() @@ -865,8 +888,8 @@ abstract class Coupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setIsAvailableOnSpecialOffers($v) { @@ -883,6 +906,7 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS] = true; } + return $this; } // setIsAvailableOnSpecialOffers() @@ -893,8 +917,8 @@ abstract class Coupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setIsUsed($v) { @@ -911,14 +935,15 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::IS_USED] = true; } + return $this; } // setIsUsed() /** * Set the value of [serialized_conditions] column. * - * @param string $v new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setSerializedConditions($v) { @@ -931,15 +956,16 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::SERIALIZED_CONDITIONS] = true; } + return $this; } // setSerializedConditions() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -951,15 +977,16 @@ abstract class Coupon implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -971,14 +998,15 @@ abstract class Coupon implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function setVersion($v) { @@ -991,6 +1019,7 @@ abstract class Coupon implements ActiveRecordInterface $this->modifiedColumns[CouponTableMap::VERSION] = true; } + return $this; } // setVersion() @@ -1034,6 +1063,7 @@ abstract class Coupon implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CouponTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -1124,10 +1154,10 @@ abstract class Coupon implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1166,7 +1196,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Coupon::setDeleted() @@ -1209,8 +1239,8 @@ abstract class Coupon implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1280,8 +1310,8 @@ abstract class Coupon implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1346,7 +1376,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1484,7 +1514,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1500,12 +1530,12 @@ abstract class Coupon implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1519,7 +1549,7 @@ abstract class Coupon implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1582,12 +1612,12 @@ abstract class Coupon implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1635,12 +1665,12 @@ abstract class Coupon implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1654,8 +1684,8 @@ abstract class Coupon implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1722,8 +1752,8 @@ abstract class Coupon implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1771,6 +1801,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->isColumnModified(CouponTableMap::CREATED_AT)) $criteria->add(CouponTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CouponTableMap::UPDATED_AT)) $criteria->add(CouponTableMap::UPDATED_AT, $this->updated_at); if ($this->isColumnModified(CouponTableMap::VERSION)) $criteria->add(CouponTableMap::VERSION, $this->version); + return $criteria; } @@ -1792,7 +1823,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1802,7 +1833,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1816,6 +1847,7 @@ abstract class Coupon implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1825,9 +1857,9 @@ abstract class Coupon implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Coupon (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Coupon (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1880,8 +1912,8 @@ abstract class Coupon implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Coupon Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Coupon Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1894,12 +1926,13 @@ abstract class Coupon implements ActiveRecordInterface return $copyObj; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1941,8 +1974,8 @@ abstract class Coupon implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1964,8 +1997,8 @@ abstract class Coupon implements ActiveRecordInterface * If this ChildCoupon is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCouponI18n[] List of ChildCouponI18n objects * @throws PropelException */ @@ -2021,9 +2054,9 @@ abstract class Coupon implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $couponI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCoupon The current object (for fluent API support) + * @param Collection $couponI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCoupon The current object (for fluent API support) */ public function setCouponI18ns(Collection $couponI18ns, ConnectionInterface $con = null) { @@ -2053,10 +2086,10 @@ abstract class Coupon implements ActiveRecordInterface /** * Returns the number of related CouponI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CouponI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CouponI18n objects. * @throws PropelException */ public function countCouponI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2088,8 +2121,8 @@ abstract class Coupon implements ActiveRecordInterface * Method called to associate a ChildCouponI18n object to this object * through the ChildCouponI18n foreign key attribute. * - * @param ChildCouponI18n $l ChildCouponI18n - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param ChildCouponI18n $l ChildCouponI18n + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function addCouponI18n(ChildCouponI18n $l) { @@ -2119,7 +2152,7 @@ abstract class Coupon implements ActiveRecordInterface } /** - * @param CouponI18n $couponI18n The couponI18n object to remove. + * @param CouponI18n $couponI18n The couponI18n object to remove. * @return ChildCoupon The current object (for fluent API support) */ public function removeCouponI18n($couponI18n) @@ -2166,8 +2199,8 @@ abstract class Coupon implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2189,8 +2222,8 @@ abstract class Coupon implements ActiveRecordInterface * If this ChildCoupon is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCouponVersion[] List of ChildCouponVersion objects * @throws PropelException */ @@ -2246,9 +2279,9 @@ abstract class Coupon implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $couponVersions A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCoupon The current object (for fluent API support) + * @param Collection $couponVersions A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCoupon The current object (for fluent API support) */ public function setCouponVersions(Collection $couponVersions, ConnectionInterface $con = null) { @@ -2278,10 +2311,10 @@ abstract class Coupon implements ActiveRecordInterface /** * Returns the number of related CouponVersion objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CouponVersion objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CouponVersion objects. * @throws PropelException */ public function countCouponVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2313,8 +2346,8 @@ abstract class Coupon implements ActiveRecordInterface * Method called to associate a ChildCouponVersion object to this object * through the ChildCouponVersion foreign key attribute. * - * @param ChildCouponVersion $l ChildCouponVersion - * @return \Thelia\Model\Coupon The current object (for fluent API support) + * @param ChildCouponVersion $l ChildCouponVersion + * @return \Thelia\Model\Coupon The current object (for fluent API support) */ public function addCouponVersion(ChildCouponVersion $l) { @@ -2341,7 +2374,7 @@ abstract class Coupon implements ActiveRecordInterface /** * @param CouponVersion $couponVersion The couponVersion object to remove. - * @return ChildCoupon The current object (for fluent API support) + * @return ChildCoupon The current object (for fluent API support) */ public function removeCouponVersion($couponVersion) { @@ -2393,7 +2426,7 @@ abstract class Coupon implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2433,7 +2466,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCoupon The current object (for fluent API support) + * @return ChildCoupon The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2447,9 +2480,9 @@ abstract class Coupon implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildCoupon The current object (for fluent API support) + * @return ChildCoupon The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2461,7 +2494,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2471,8 +2504,8 @@ abstract class Coupon implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildCouponI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2505,10 +2538,10 @@ abstract class Coupon implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildCoupon The current object (for fluent API support) + * @return ChildCoupon The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2533,7 +2566,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildCouponI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2630,7 +2663,7 @@ abstract class Coupon implements ActiveRecordInterface /** * Checks whether the current state must be recorded as a version * - * @return boolean + * @return boolean */ public function isVersioningNecessary($con = null) { @@ -2652,9 +2685,9 @@ abstract class Coupon implements ActiveRecordInterface /** * Creates a version of the current object and saves it. * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ChildCouponVersion A version object + * @return ChildCouponVersion A version object */ public function addVersion($con = null) { @@ -2685,10 +2718,10 @@ abstract class Coupon implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con The connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con The connection to use * - * @return ChildCoupon The current object (for fluent API support) + * @return ChildCoupon The current object (for fluent API support) */ public function toVersion($versionNumber, $con = null) { @@ -2704,9 +2737,9 @@ abstract class Coupon implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param ChildCouponVersion $version The version object to use - * @param ConnectionInterface $con the connection to use - * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. + * @param ChildCouponVersion $version The version object to use + * @param ConnectionInterface $con the connection to use + * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return ChildCoupon The current object (for fluent API support) */ @@ -2735,9 +2768,9 @@ abstract class Coupon implements ActiveRecordInterface /** * Gets the latest persisted version number for the current object * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return integer + * @return integer */ public function getLastVersionNumber($con = null) { @@ -2755,9 +2788,9 @@ abstract class Coupon implements ActiveRecordInterface /** * Checks whether the current object is the latest one * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return Boolean + * @return Boolean */ public function isLastVersion($con = null) { @@ -2767,10 +2800,10 @@ abstract class Coupon implements ActiveRecordInterface /** * Retrieves a version object for this entity and a version number * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con the connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con the connection to use * - * @return ChildCouponVersion A version object + * @return ChildCouponVersion A version object */ public function getOneVersion($versionNumber, $con = null) { @@ -2783,9 +2816,9 @@ abstract class Coupon implements ActiveRecordInterface /** * Gets all the versions of this object, in incremental order * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ObjectCollection A list of ChildCouponVersion objects + * @return ObjectCollection A list of ChildCouponVersion objects */ public function getAllVersions($con = null) { @@ -2805,12 +2838,12 @@ abstract class Coupon implements ActiveRecordInterface * ); * * - * @param integer $versionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $versionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersion($versionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -2830,13 +2863,13 @@ abstract class Coupon implements ActiveRecordInterface * ); * * - * @param integer $fromVersionNumber - * @param integer $toVersionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $fromVersionNumber + * @param integer $toVersionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersions($fromVersionNumber, $toVersionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -2856,12 +2889,12 @@ abstract class Coupon implements ActiveRecordInterface * ); * * - * @param array $fromVersion An array representing the original version. - * @param array $toVersion An array representing the destination version. - * @param string $keys Main key used for the result diff (versions|columns). - * @param array $ignoredColumns The columns to exclude from the diff. + * @param array $fromVersion An array representing the original version. + * @param array $toVersion An array representing the destination version. + * @param string $keys Main key used for the result diff (versions|columns). + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ protected function computeDiff($fromVersion, $toVersion, $keys = 'columns', $ignoredColumns = array()) { @@ -2896,7 +2929,7 @@ abstract class Coupon implements ActiveRecordInterface /** * retrieve the last $number versions. * - * @param Integer $number the number of record to return. + * @param Integer $number the number of record to return. * @return PropelCollection|array \Thelia\Model\CouponVersion[] List of \Thelia\Model\CouponVersion objects */ public function getLastVersions($number = 10, $criteria = null, $con = null) diff --git a/core/lib/Thelia/Model/Base/CouponI18n.php b/core/lib/Thelia/Model/Base/CouponI18n.php index d8aca165e..957befd0a 100644 --- a/core/lib/Thelia/Model/Base/CouponI18n.php +++ b/core/lib/Thelia/Model/Base/CouponI18n.php @@ -26,6 +26,7 @@ abstract class CouponI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CouponI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -318,9 +319,9 @@ abstract class CouponI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CouponI18n The current object, for fluid interface */ @@ -370,58 +371,63 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [short_description] column value. * - * @return string + * @return string */ public function getShortDescription() { + return $this->short_description; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CouponI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CouponI18n The current object (for fluent API support) */ public function setId($v) { @@ -438,14 +444,15 @@ abstract class CouponI18n implements ActiveRecordInterface $this->aCoupon = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\CouponI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -458,14 +465,15 @@ abstract class CouponI18n implements ActiveRecordInterface $this->modifiedColumns[CouponI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\CouponI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -478,14 +486,15 @@ abstract class CouponI18n implements ActiveRecordInterface $this->modifiedColumns[CouponI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [short_description] column. * - * @param string $v new value - * @return \Thelia\Model\CouponI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponI18n The current object (for fluent API support) */ public function setShortDescription($v) { @@ -498,14 +507,15 @@ abstract class CouponI18n implements ActiveRecordInterface $this->modifiedColumns[CouponI18nTableMap::SHORT_DESCRIPTION] = true; } + return $this; } // setShortDescription() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\CouponI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -518,6 +528,7 @@ abstract class CouponI18n implements ActiveRecordInterface $this->modifiedColumns[CouponI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() @@ -561,6 +572,7 @@ abstract class CouponI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CouponI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -615,10 +627,10 @@ abstract class CouponI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -654,7 +666,7 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CouponI18n::setDeleted() @@ -697,8 +709,8 @@ abstract class CouponI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -748,8 +760,8 @@ abstract class CouponI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -792,7 +804,7 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -859,7 +871,7 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -875,12 +887,12 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -894,7 +906,7 @@ abstract class CouponI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -927,12 +939,12 @@ abstract class CouponI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -967,12 +979,12 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -986,8 +998,8 @@ abstract class CouponI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1024,8 +1036,8 @@ abstract class CouponI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1053,6 +1065,7 @@ abstract class CouponI18n implements ActiveRecordInterface if ($this->isColumnModified(CouponI18nTableMap::TITLE)) $criteria->add(CouponI18nTableMap::TITLE, $this->title); if ($this->isColumnModified(CouponI18nTableMap::SHORT_DESCRIPTION)) $criteria->add(CouponI18nTableMap::SHORT_DESCRIPTION, $this->short_description); if ($this->isColumnModified(CouponI18nTableMap::DESCRIPTION)) $criteria->add(CouponI18nTableMap::DESCRIPTION, $this->description); + return $criteria; } @@ -1090,7 +1103,7 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1105,6 +1118,7 @@ abstract class CouponI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1114,9 +1128,9 @@ abstract class CouponI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CouponI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CouponI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1139,8 +1153,8 @@ abstract class CouponI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CouponI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CouponI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1156,8 +1170,8 @@ abstract class CouponI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildCoupon object. * - * @param ChildCoupon $v - * @return \Thelia\Model\CouponI18n The current object (for fluent API support) + * @param ChildCoupon $v + * @return \Thelia\Model\CouponI18n The current object (for fluent API support) * @throws PropelException */ public function setCoupon(ChildCoupon $v = null) @@ -1176,14 +1190,16 @@ abstract class CouponI18n implements ActiveRecordInterface $v->addCouponI18n($this); } + return $this; } + /** * Get the associated ChildCoupon object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCoupon The associated ChildCoupon object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCoupon The associated ChildCoupon object. * @throws PropelException */ public function getCoupon(ConnectionInterface $con = null) @@ -1227,7 +1243,7 @@ abstract class CouponI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CouponI18nQuery.php b/core/lib/Thelia/Model/Base/CouponI18nQuery.php index cdd6a1584..217796a80 100644 --- a/core/lib/Thelia/Model/Base/CouponI18nQuery.php +++ b/core/lib/Thelia/Model/Base/CouponI18nQuery.php @@ -63,9 +63,9 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CouponI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CouponI18n', $modelAlias = null) { @@ -75,8 +75,8 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Returns a new ChildCouponI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCouponI18nQuery */ @@ -136,10 +136,10 @@ abstract class CouponI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCouponI18n A model object, or null if the key is not found + * @return ChildCouponI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -167,8 +167,8 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCouponI18n|array|mixed the result, formatted by the current formatter */ @@ -188,8 +188,8 @@ abstract class CouponI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -210,7 +210,7 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -225,7 +225,7 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -256,11 +256,11 @@ abstract class CouponI18nQuery extends ModelCriteria * * @see filterByCoupon() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -296,9 +296,9 @@ abstract class CouponI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -325,9 +325,9 @@ abstract class CouponI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -354,9 +354,9 @@ abstract class CouponI18nQuery extends ModelCriteria * $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%' * * - * @param string $shortDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $shortDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -383,9 +383,9 @@ abstract class CouponI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -406,8 +406,8 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Coupon object * - * @param \Thelia\Model\Coupon|ObjectCollection $coupon The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Coupon|ObjectCollection $coupon The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -431,8 +431,8 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Coupon relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -465,11 +465,11 @@ abstract class CouponI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CouponQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CouponQuery A secondary query class using the current class as primary query */ public function useCouponQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -481,7 +481,7 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCouponI18n $couponI18n Object to remove from the list of results + * @param ChildCouponI18n $couponI18n Object to remove from the list of results * * @return ChildCouponI18nQuery The current query, for fluid interface */ @@ -499,8 +499,8 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Deletes all rows from the coupon_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -531,13 +531,13 @@ abstract class CouponI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCouponI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCouponI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCouponI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -557,6 +557,7 @@ abstract class CouponI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CouponI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/CouponQuery.php b/core/lib/Thelia/Model/Base/CouponQuery.php index c20eb9dcb..0967d21e2 100644 --- a/core/lib/Thelia/Model/Base/CouponQuery.php +++ b/core/lib/Thelia/Model/Base/CouponQuery.php @@ -115,9 +115,9 @@ abstract class CouponQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CouponQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Coupon', $modelAlias = null) { @@ -127,8 +127,8 @@ abstract class CouponQuery extends ModelCriteria /** * Returns a new ChildCouponQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCouponQuery */ @@ -157,7 +157,7 @@ abstract class CouponQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCoupon|array|mixed the result, formatted by the current formatter @@ -188,10 +188,10 @@ abstract class CouponQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCoupon A model object, or null if the key is not found + * @return ChildCoupon A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -218,8 +218,8 @@ abstract class CouponQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCoupon|array|mixed the result, formatted by the current formatter */ @@ -239,8 +239,8 @@ abstract class CouponQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -261,24 +261,26 @@ abstract class CouponQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCouponQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CouponTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCouponQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CouponTableMap::ID, $keys, Criteria::IN); } @@ -292,11 +294,11 @@ abstract class CouponQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -361,9 +363,9 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByType('%fooValue%'); // WHERE type LIKE '%fooValue%' * * - * @param string $type The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $type The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -390,9 +392,9 @@ abstract class CouponQuery extends ModelCriteria * $query->filterBySerializedEffects('%fooValue%'); // WHERE serialized_effects LIKE '%fooValue%' * * - * @param string $serializedEffects The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $serializedEffects The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -419,12 +421,12 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByIsEnabled('yes'); // WHERE is_enabled = true * * - * @param boolean|string $isEnabled The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isEnabled The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -447,13 +449,13 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByExpirationDate(array('max' => 'yesterday')); // WHERE expiration_date > '2011-03-13' * * - * @param mixed $expirationDate The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $expirationDate The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -490,11 +492,11 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByMaxUsage(array('min' => 12)); // WHERE max_usage > 12 * * - * @param mixed $maxUsage The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $maxUsage The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -530,12 +532,12 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByIsCumulative('yes'); // WHERE is_cumulative = true * * - * @param boolean|string $isCumulative The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isCumulative The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -557,12 +559,12 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByIsRemovingPostage('yes'); // WHERE is_removing_postage = true * * - * @param boolean|string $isRemovingPostage The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isRemovingPostage The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -584,12 +586,12 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByIsAvailableOnSpecialOffers('yes'); // WHERE is_available_on_special_offers = true * * - * @param boolean|string $isAvailableOnSpecialOffers The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isAvailableOnSpecialOffers The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -611,12 +613,12 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByIsUsed('yes'); // WHERE is_used = true * * - * @param boolean|string $isUsed The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isUsed The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -638,9 +640,9 @@ abstract class CouponQuery extends ModelCriteria * $query->filterBySerializedConditions('%fooValue%'); // WHERE serialized_conditions LIKE '%fooValue%' * * - * @param string $serializedConditions The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $serializedConditions The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -668,13 +670,13 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -711,13 +713,13 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -754,11 +756,11 @@ abstract class CouponQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -788,8 +790,8 @@ abstract class CouponQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CouponI18n object * - * @param \Thelia\Model\CouponI18n|ObjectCollection $couponI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CouponI18n|ObjectCollection $couponI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -811,8 +813,8 @@ abstract class CouponQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CouponI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCouponQuery The current query, for fluid interface */ @@ -845,11 +847,11 @@ abstract class CouponQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CouponI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CouponI18nQuery A secondary query class using the current class as primary query */ public function useCouponI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -861,8 +863,8 @@ abstract class CouponQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CouponVersion object * - * @param \Thelia\Model\CouponVersion|ObjectCollection $couponVersion the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CouponVersion|ObjectCollection $couponVersion the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ @@ -884,8 +886,8 @@ abstract class CouponQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CouponVersion relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCouponQuery The current query, for fluid interface */ @@ -918,11 +920,11 @@ abstract class CouponQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CouponVersionQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CouponVersionQuery A secondary query class using the current class as primary query */ public function useCouponVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -934,7 +936,7 @@ abstract class CouponQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCoupon $coupon Object to remove from the list of results + * @param ChildCoupon $coupon Object to remove from the list of results * * @return ChildCouponQuery The current query, for fluid interface */ @@ -950,8 +952,8 @@ abstract class CouponQuery extends ModelCriteria /** * Deletes all rows from the coupon table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -982,13 +984,13 @@ abstract class CouponQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCoupon or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCoupon object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCoupon object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1008,6 +1010,7 @@ abstract class CouponQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CouponTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1026,9 +1029,9 @@ abstract class CouponQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1038,9 +1041,9 @@ abstract class CouponQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1050,7 +1053,7 @@ abstract class CouponQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1060,7 +1063,7 @@ abstract class CouponQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1070,7 +1073,7 @@ abstract class CouponQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1080,7 +1083,7 @@ abstract class CouponQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1092,11 +1095,11 @@ abstract class CouponQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1111,10 +1114,10 @@ abstract class CouponQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCouponQuery The current query, for fluid interface + * @return ChildCouponQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1131,11 +1134,11 @@ abstract class CouponQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCouponI18nQuery A secondary query class using the current class as primary query + * @return ChildCouponI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1151,7 +1154,7 @@ abstract class CouponQuery extends ModelCriteria * * @return boolean */ - public static function isVersioningEnabled() + static public function isVersioningEnabled() { return self::$isVersioningEnabled; } @@ -1159,7 +1162,7 @@ abstract class CouponQuery extends ModelCriteria /** * Enables versioning */ - public static function enableVersioning() + static public function enableVersioning() { self::$isVersioningEnabled = true; } @@ -1167,7 +1170,7 @@ abstract class CouponQuery extends ModelCriteria /** * Disables versioning */ - public static function disableVersioning() + static public function disableVersioning() { self::$isVersioningEnabled = false; } diff --git a/core/lib/Thelia/Model/Base/CouponVersion.php b/core/lib/Thelia/Model/Base/CouponVersion.php index 1ccca7d52..b890f3a2e 100644 --- a/core/lib/Thelia/Model/Base/CouponVersion.php +++ b/core/lib/Thelia/Model/Base/CouponVersion.php @@ -28,6 +28,7 @@ abstract class CouponVersion implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CouponVersionTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -380,9 +381,9 @@ abstract class CouponVersion implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CouponVersion The current object, for fluid interface */ @@ -432,50 +433,55 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } /** * Get the [type] column value. * - * @return string + * @return string */ public function getType() { + return $this->type; } /** * Get the [serialized_effects] column value. * - * @return string + * @return string */ public function getSerializedEffects() { + return $this->serialized_effects; } /** * Get the [is_enabled] column value. * - * @return boolean + * @return boolean */ public function getIsEnabled() { + return $this->is_enabled; } @@ -483,8 +489,8 @@ abstract class CouponVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [expiration_date] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -502,60 +508,66 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Get the [max_usage] column value. * - * @return int + * @return int */ public function getMaxUsage() { + return $this->max_usage; } /** * Get the [is_cumulative] column value. * - * @return boolean + * @return boolean */ public function getIsCumulative() { + return $this->is_cumulative; } /** * Get the [is_removing_postage] column value. * - * @return boolean + * @return boolean */ public function getIsRemovingPostage() { + return $this->is_removing_postage; } /** * Get the [is_available_on_special_offers] column value. * - * @return boolean + * @return boolean */ public function getIsAvailableOnSpecialOffers() { + return $this->is_available_on_special_offers; } /** * Get the [is_used] column value. * - * @return boolean + * @return boolean */ public function getIsUsed() { + return $this->is_used; } /** * Get the [serialized_conditions] column value. * - * @return string + * @return string */ public function getSerializedConditions() { + return $this->serialized_conditions; } @@ -563,8 +575,8 @@ abstract class CouponVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -583,8 +595,8 @@ abstract class CouponVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -602,18 +614,19 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setId($v) { @@ -630,14 +643,15 @@ abstract class CouponVersion implements ActiveRecordInterface $this->aCoupon = null; } + return $this; } // setId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setCode($v) { @@ -650,14 +664,15 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::CODE] = true; } + return $this; } // setCode() /** * Set the value of [type] column. * - * @param string $v new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setType($v) { @@ -670,14 +685,15 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::TYPE] = true; } + return $this; } // setType() /** * Set the value of [serialized_effects] column. * - * @param string $v new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setSerializedEffects($v) { @@ -690,6 +706,7 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::SERIALIZED_EFFECTS] = true; } + return $this; } // setSerializedEffects() @@ -700,8 +717,8 @@ abstract class CouponVersion implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setIsEnabled($v) { @@ -718,15 +735,16 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::IS_ENABLED] = true; } + return $this; } // setIsEnabled() /** * Sets the value of [expiration_date] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setExpirationDate($v) { @@ -738,14 +756,15 @@ abstract class CouponVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setExpirationDate() /** * Set the value of [max_usage] column. * - * @param int $v new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setMaxUsage($v) { @@ -758,6 +777,7 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::MAX_USAGE] = true; } + return $this; } // setMaxUsage() @@ -768,8 +788,8 @@ abstract class CouponVersion implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setIsCumulative($v) { @@ -786,6 +806,7 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::IS_CUMULATIVE] = true; } + return $this; } // setIsCumulative() @@ -796,8 +817,8 @@ abstract class CouponVersion implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setIsRemovingPostage($v) { @@ -814,6 +835,7 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::IS_REMOVING_POSTAGE] = true; } + return $this; } // setIsRemovingPostage() @@ -824,8 +846,8 @@ abstract class CouponVersion implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setIsAvailableOnSpecialOffers($v) { @@ -842,6 +864,7 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS] = true; } + return $this; } // setIsAvailableOnSpecialOffers() @@ -852,8 +875,8 @@ abstract class CouponVersion implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setIsUsed($v) { @@ -870,14 +893,15 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::IS_USED] = true; } + return $this; } // setIsUsed() /** * Set the value of [serialized_conditions] column. * - * @param string $v new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setSerializedConditions($v) { @@ -890,15 +914,16 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::SERIALIZED_CONDITIONS] = true; } + return $this; } // setSerializedConditions() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -910,15 +935,16 @@ abstract class CouponVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -930,14 +956,15 @@ abstract class CouponVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) */ public function setVersion($v) { @@ -950,6 +977,7 @@ abstract class CouponVersion implements ActiveRecordInterface $this->modifiedColumns[CouponVersionTableMap::VERSION] = true; } + return $this; } // setVersion() @@ -993,6 +1021,7 @@ abstract class CouponVersion implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CouponVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -1086,10 +1115,10 @@ abstract class CouponVersion implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1125,7 +1154,7 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CouponVersion::setDeleted() @@ -1168,8 +1197,8 @@ abstract class CouponVersion implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1219,8 +1248,8 @@ abstract class CouponVersion implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1263,7 +1292,7 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1390,7 +1419,7 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1406,12 +1435,12 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1425,7 +1454,7 @@ abstract class CouponVersion implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1488,12 +1517,12 @@ abstract class CouponVersion implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1538,12 +1567,12 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1557,8 +1586,8 @@ abstract class CouponVersion implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1625,8 +1654,8 @@ abstract class CouponVersion implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1674,6 +1703,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->isColumnModified(CouponVersionTableMap::CREATED_AT)) $criteria->add(CouponVersionTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CouponVersionTableMap::UPDATED_AT)) $criteria->add(CouponVersionTableMap::UPDATED_AT, $this->updated_at); if ($this->isColumnModified(CouponVersionTableMap::VERSION)) $criteria->add(CouponVersionTableMap::VERSION, $this->version); + return $criteria; } @@ -1711,7 +1741,7 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1726,6 +1756,7 @@ abstract class CouponVersion implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getVersion()); } @@ -1735,9 +1766,9 @@ abstract class CouponVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CouponVersion (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CouponVersion (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1770,8 +1801,8 @@ abstract class CouponVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CouponVersion Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CouponVersion Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1787,8 +1818,8 @@ abstract class CouponVersion implements ActiveRecordInterface /** * Declares an association between this object and a ChildCoupon object. * - * @param ChildCoupon $v - * @return \Thelia\Model\CouponVersion The current object (for fluent API support) + * @param ChildCoupon $v + * @return \Thelia\Model\CouponVersion The current object (for fluent API support) * @throws PropelException */ public function setCoupon(ChildCoupon $v = null) @@ -1807,14 +1838,16 @@ abstract class CouponVersion implements ActiveRecordInterface $v->addCouponVersion($this); } + return $this; } + /** * Get the associated ChildCoupon object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCoupon The associated ChildCoupon object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCoupon The associated ChildCoupon object. * @throws PropelException */ public function getCoupon(ConnectionInterface $con = null) @@ -1868,7 +1901,7 @@ abstract class CouponVersion implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CouponVersionQuery.php b/core/lib/Thelia/Model/Base/CouponVersionQuery.php index 2dfcba29c..aee6708d8 100644 --- a/core/lib/Thelia/Model/Base/CouponVersionQuery.php +++ b/core/lib/Thelia/Model/Base/CouponVersionQuery.php @@ -103,9 +103,9 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CouponVersionQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CouponVersion', $modelAlias = null) { @@ -115,8 +115,8 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Returns a new ChildCouponVersionQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCouponVersionQuery */ @@ -176,10 +176,10 @@ abstract class CouponVersionQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCouponVersion A model object, or null if the key is not found + * @return ChildCouponVersion A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -207,8 +207,8 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCouponVersion|array|mixed the result, formatted by the current formatter */ @@ -228,8 +228,8 @@ abstract class CouponVersionQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -250,7 +250,7 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -265,7 +265,7 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -296,11 +296,11 @@ abstract class CouponVersionQuery extends ModelCriteria * * @see filterByCoupon() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -336,9 +336,9 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -365,9 +365,9 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByType('%fooValue%'); // WHERE type LIKE '%fooValue%' * * - * @param string $type The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $type The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -394,9 +394,9 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterBySerializedEffects('%fooValue%'); // WHERE serialized_effects LIKE '%fooValue%' * * - * @param string $serializedEffects The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $serializedEffects The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -423,12 +423,12 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByIsEnabled('yes'); // WHERE is_enabled = true * * - * @param boolean|string $isEnabled The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isEnabled The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -451,13 +451,13 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByExpirationDate(array('max' => 'yesterday')); // WHERE expiration_date > '2011-03-13' * * - * @param mixed $expirationDate The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $expirationDate The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -494,11 +494,11 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByMaxUsage(array('min' => 12)); // WHERE max_usage > 12 * * - * @param mixed $maxUsage The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $maxUsage The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -534,12 +534,12 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByIsCumulative('yes'); // WHERE is_cumulative = true * * - * @param boolean|string $isCumulative The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isCumulative The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -561,12 +561,12 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByIsRemovingPostage('yes'); // WHERE is_removing_postage = true * * - * @param boolean|string $isRemovingPostage The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isRemovingPostage The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -588,12 +588,12 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByIsAvailableOnSpecialOffers('yes'); // WHERE is_available_on_special_offers = true * * - * @param boolean|string $isAvailableOnSpecialOffers The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isAvailableOnSpecialOffers The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -615,12 +615,12 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByIsUsed('yes'); // WHERE is_used = true * * - * @param boolean|string $isUsed The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isUsed The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -642,9 +642,9 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterBySerializedConditions('%fooValue%'); // WHERE serialized_conditions LIKE '%fooValue%' * * - * @param string $serializedConditions The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $serializedConditions The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -672,13 +672,13 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -715,13 +715,13 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -758,11 +758,11 @@ abstract class CouponVersionQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -792,8 +792,8 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Coupon object * - * @param \Thelia\Model\Coupon|ObjectCollection $coupon The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Coupon|ObjectCollection $coupon The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -817,8 +817,8 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Coupon relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -851,11 +851,11 @@ abstract class CouponVersionQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CouponQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CouponQuery A secondary query class using the current class as primary query */ public function useCouponQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -867,7 +867,7 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCouponVersion $couponVersion Object to remove from the list of results + * @param ChildCouponVersion $couponVersion Object to remove from the list of results * * @return ChildCouponVersionQuery The current query, for fluid interface */ @@ -885,8 +885,8 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Deletes all rows from the coupon_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -917,13 +917,13 @@ abstract class CouponVersionQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCouponVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCouponVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCouponVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -943,6 +943,7 @@ abstract class CouponVersionQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CouponVersionTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/Currency.php b/core/lib/Thelia/Model/Base/Currency.php index 65694dc1a..b88ed9800 100644 --- a/core/lib/Thelia/Model/Base/Currency.php +++ b/core/lib/Thelia/Model/Base/Currency.php @@ -36,6 +36,7 @@ abstract class Currency implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CurrencyTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -389,9 +390,9 @@ abstract class Currency implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Currency The current object, for fluid interface */ @@ -441,60 +442,66 @@ abstract class Currency implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } /** * Get the [symbol] column value. * - * @return string + * @return string */ public function getSymbol() { + return $this->symbol; } /** * Get the [rate] column value. * - * @return double + * @return double */ public function getRate() { + return $this->rate; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } /** * Get the [by_default] column value. * - * @return int + * @return int */ public function getByDefault() { + return $this->by_default; } @@ -502,8 +509,8 @@ abstract class Currency implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -522,8 +529,8 @@ abstract class Currency implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -541,8 +548,8 @@ abstract class Currency implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setId($v) { @@ -555,14 +562,15 @@ abstract class Currency implements ActiveRecordInterface $this->modifiedColumns[CurrencyTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setCode($v) { @@ -575,14 +583,15 @@ abstract class Currency implements ActiveRecordInterface $this->modifiedColumns[CurrencyTableMap::CODE] = true; } + return $this; } // setCode() /** * Set the value of [symbol] column. * - * @param string $v new value - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setSymbol($v) { @@ -595,14 +604,15 @@ abstract class Currency implements ActiveRecordInterface $this->modifiedColumns[CurrencyTableMap::SYMBOL] = true; } + return $this; } // setSymbol() /** * Set the value of [rate] column. * - * @param double $v new value - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setRate($v) { @@ -615,14 +625,15 @@ abstract class Currency implements ActiveRecordInterface $this->modifiedColumns[CurrencyTableMap::RATE] = true; } + return $this; } // setRate() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setPosition($v) { @@ -635,14 +646,15 @@ abstract class Currency implements ActiveRecordInterface $this->modifiedColumns[CurrencyTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Set the value of [by_default] column. * - * @param int $v new value - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setByDefault($v) { @@ -655,15 +667,16 @@ abstract class Currency implements ActiveRecordInterface $this->modifiedColumns[CurrencyTableMap::BY_DEFAULT] = true; } + return $this; } // setByDefault() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -675,15 +688,16 @@ abstract class Currency implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -695,6 +709,7 @@ abstract class Currency implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -801,10 +816,10 @@ abstract class Currency implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -847,7 +862,7 @@ abstract class Currency implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Currency::setDeleted() @@ -890,8 +905,8 @@ abstract class Currency implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -952,8 +967,8 @@ abstract class Currency implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1052,7 +1067,7 @@ abstract class Currency implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1148,7 +1163,7 @@ abstract class Currency implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1164,12 +1179,12 @@ abstract class Currency implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1183,7 +1198,7 @@ abstract class Currency implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1225,12 +1240,12 @@ abstract class Currency implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1277,12 +1292,12 @@ abstract class Currency implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1296,8 +1311,8 @@ abstract class Currency implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1343,8 +1358,8 @@ abstract class Currency implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1378,6 +1393,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->isColumnModified(CurrencyTableMap::BY_DEFAULT)) $criteria->add(CurrencyTableMap::BY_DEFAULT, $this->by_default); if ($this->isColumnModified(CurrencyTableMap::CREATED_AT)) $criteria->add(CurrencyTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CurrencyTableMap::UPDATED_AT)) $criteria->add(CurrencyTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1399,7 +1415,7 @@ abstract class Currency implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1409,7 +1425,7 @@ abstract class Currency implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1423,6 +1439,7 @@ abstract class Currency implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1432,9 +1449,9 @@ abstract class Currency implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Currency (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Currency (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1492,8 +1509,8 @@ abstract class Currency implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Currency Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Currency Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1512,7 +1529,7 @@ abstract class Currency implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1560,8 +1577,8 @@ abstract class Currency implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1583,8 +1600,8 @@ abstract class Currency implements ActiveRecordInterface * If this ChildCurrency is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -1640,14 +1657,15 @@ abstract class Currency implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orders A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCurrency The current object (for fluent API support) + * @param Collection $orders A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCurrency The current object (for fluent API support) */ public function setOrders(Collection $orders, ConnectionInterface $con = null) { $ordersToDelete = $this->getOrders(new Criteria(), $con)->diff($orders); + $this->ordersScheduledForDeletion = $ordersToDelete; foreach ($ordersToDelete as $orderRemoved) { @@ -1668,10 +1686,10 @@ abstract class Currency implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1703,8 +1721,8 @@ abstract class Currency implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function addOrder(ChildOrder $l) { @@ -1730,7 +1748,7 @@ abstract class Currency implements ActiveRecordInterface } /** - * @param Order $order The order object to remove. + * @param Order $order The order object to remove. * @return ChildCurrency The current object (for fluent API support) */ public function removeOrder($order) @@ -1748,6 +1766,7 @@ abstract class Currency implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1759,9 +1778,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1772,6 +1791,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1783,9 +1803,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1796,6 +1816,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1807,9 +1828,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1820,6 +1841,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1831,9 +1853,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1844,6 +1866,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1855,9 +1878,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1868,6 +1891,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1879,9 +1903,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1892,6 +1916,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1903,9 +1928,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1945,8 +1970,8 @@ abstract class Currency implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1968,8 +1993,8 @@ abstract class Currency implements ActiveRecordInterface * If this ChildCurrency is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCart[] List of ChildCart objects * @throws PropelException */ @@ -2025,14 +2050,15 @@ abstract class Currency implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $carts A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCurrency The current object (for fluent API support) + * @param Collection $carts A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCurrency The current object (for fluent API support) */ public function setCarts(Collection $carts, ConnectionInterface $con = null) { $cartsToDelete = $this->getCarts(new Criteria(), $con)->diff($carts); + $this->cartsScheduledForDeletion = $cartsToDelete; foreach ($cartsToDelete as $cartRemoved) { @@ -2053,10 +2079,10 @@ abstract class Currency implements ActiveRecordInterface /** * Returns the number of related Cart objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Cart objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Cart objects. * @throws PropelException */ public function countCarts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2088,8 +2114,8 @@ abstract class Currency implements ActiveRecordInterface * Method called to associate a ChildCart object to this object * through the ChildCart foreign key attribute. * - * @param ChildCart $l ChildCart - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param ChildCart $l ChildCart + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function addCart(ChildCart $l) { @@ -2115,7 +2141,7 @@ abstract class Currency implements ActiveRecordInterface } /** - * @param Cart $cart The cart object to remove. + * @param Cart $cart The cart object to remove. * @return ChildCurrency The current object (for fluent API support) */ public function removeCart($cart) @@ -2133,6 +2159,7 @@ abstract class Currency implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2144,9 +2171,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2157,6 +2184,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getCarts($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2168,9 +2196,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsJoinAddressRelatedByAddressDeliveryId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2181,6 +2209,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getCarts($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2192,9 +2221,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsJoinAddressRelatedByAddressInvoiceId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2234,8 +2263,8 @@ abstract class Currency implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2257,8 +2286,8 @@ abstract class Currency implements ActiveRecordInterface * If this ChildCurrency is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductPrice[] List of ChildProductPrice objects * @throws PropelException */ @@ -2314,14 +2343,15 @@ abstract class Currency implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productPrices A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCurrency The current object (for fluent API support) + * @param Collection $productPrices A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCurrency The current object (for fluent API support) */ public function setProductPrices(Collection $productPrices, ConnectionInterface $con = null) { $productPricesToDelete = $this->getProductPrices(new Criteria(), $con)->diff($productPrices); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2345,10 +2375,10 @@ abstract class Currency implements ActiveRecordInterface /** * Returns the number of related ProductPrice objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductPrice objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductPrice objects. * @throws PropelException */ public function countProductPrices(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2380,8 +2410,8 @@ abstract class Currency implements ActiveRecordInterface * Method called to associate a ChildProductPrice object to this object * through the ChildProductPrice foreign key attribute. * - * @param ChildProductPrice $l ChildProductPrice - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param ChildProductPrice $l ChildProductPrice + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function addProductPrice(ChildProductPrice $l) { @@ -2407,7 +2437,7 @@ abstract class Currency implements ActiveRecordInterface } /** - * @param ProductPrice $productPrice The productPrice object to remove. + * @param ProductPrice $productPrice The productPrice object to remove. * @return ChildCurrency The current object (for fluent API support) */ public function removeProductPrice($productPrice) @@ -2425,6 +2455,7 @@ abstract class Currency implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2436,9 +2467,9 @@ abstract class Currency implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Currency. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProductPrice[] List of ChildProductPrice objects */ public function getProductPricesJoinProductSaleElements($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2478,8 +2509,8 @@ abstract class Currency implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2501,8 +2532,8 @@ abstract class Currency implements ActiveRecordInterface * If this ChildCurrency is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCurrencyI18n[] List of ChildCurrencyI18n objects * @throws PropelException */ @@ -2558,14 +2589,15 @@ abstract class Currency implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $currencyI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCurrency The current object (for fluent API support) + * @param Collection $currencyI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCurrency The current object (for fluent API support) */ public function setCurrencyI18ns(Collection $currencyI18ns, ConnectionInterface $con = null) { $currencyI18nsToDelete = $this->getCurrencyI18ns(new Criteria(), $con)->diff($currencyI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2589,10 +2621,10 @@ abstract class Currency implements ActiveRecordInterface /** * Returns the number of related CurrencyI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CurrencyI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CurrencyI18n objects. * @throws PropelException */ public function countCurrencyI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2624,8 +2656,8 @@ abstract class Currency implements ActiveRecordInterface * Method called to associate a ChildCurrencyI18n object to this object * through the ChildCurrencyI18n foreign key attribute. * - * @param ChildCurrencyI18n $l ChildCurrencyI18n - * @return \Thelia\Model\Currency The current object (for fluent API support) + * @param ChildCurrencyI18n $l ChildCurrencyI18n + * @return \Thelia\Model\Currency The current object (for fluent API support) */ public function addCurrencyI18n(ChildCurrencyI18n $l) { @@ -2655,7 +2687,7 @@ abstract class Currency implements ActiveRecordInterface } /** - * @param CurrencyI18n $currencyI18n The currencyI18n object to remove. + * @param CurrencyI18n $currencyI18n The currencyI18n object to remove. * @return ChildCurrency The current object (for fluent API support) */ public function removeCurrencyI18n($currencyI18n) @@ -2700,7 +2732,7 @@ abstract class Currency implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2752,7 +2784,7 @@ abstract class Currency implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCurrency The current object (for fluent API support) + * @return ChildCurrency The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2766,9 +2798,9 @@ abstract class Currency implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildCurrency The current object (for fluent API support) + * @return ChildCurrency The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2780,7 +2812,7 @@ abstract class Currency implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2790,8 +2822,8 @@ abstract class Currency implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildCurrencyI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2824,10 +2856,10 @@ abstract class Currency implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildCurrency The current object (for fluent API support) + * @return ChildCurrency The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2852,7 +2884,7 @@ abstract class Currency implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildCurrencyI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2860,6 +2892,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [name] column value. * @@ -2870,6 +2903,7 @@ abstract class Currency implements ActiveRecordInterface return $this->getCurrentTranslation()->getName(); } + /** * Set the value of [name] column. * @@ -2958,6 +2992,7 @@ abstract class Currency implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/CurrencyI18n.php b/core/lib/Thelia/Model/Base/CurrencyI18n.php index 3d5e8dab8..9bde742ca 100644 --- a/core/lib/Thelia/Model/Base/CurrencyI18n.php +++ b/core/lib/Thelia/Model/Base/CurrencyI18n.php @@ -26,6 +26,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CurrencyI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -306,9 +307,9 @@ abstract class CurrencyI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CurrencyI18n The current object, for fluid interface */ @@ -358,38 +359,41 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [name] column value. * - * @return string + * @return string */ public function getName() { + return $this->name; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) */ public function setId($v) { @@ -406,14 +410,15 @@ abstract class CurrencyI18n implements ActiveRecordInterface $this->aCurrency = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -426,14 +431,15 @@ abstract class CurrencyI18n implements ActiveRecordInterface $this->modifiedColumns[CurrencyI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [name] column. * - * @param string $v new value - * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) */ public function setName($v) { @@ -446,6 +452,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface $this->modifiedColumns[CurrencyI18nTableMap::NAME] = true; } + return $this; } // setName() @@ -489,6 +496,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CurrencyI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -537,10 +545,10 @@ abstract class CurrencyI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -576,7 +584,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CurrencyI18n::setDeleted() @@ -619,8 +627,8 @@ abstract class CurrencyI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -670,8 +678,8 @@ abstract class CurrencyI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -714,7 +722,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -769,7 +777,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -785,12 +793,12 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -804,7 +812,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -831,12 +839,12 @@ abstract class CurrencyI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -869,12 +877,12 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -888,8 +896,8 @@ abstract class CurrencyI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -920,8 +928,8 @@ abstract class CurrencyI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -945,6 +953,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface if ($this->isColumnModified(CurrencyI18nTableMap::ID)) $criteria->add(CurrencyI18nTableMap::ID, $this->id); if ($this->isColumnModified(CurrencyI18nTableMap::LOCALE)) $criteria->add(CurrencyI18nTableMap::LOCALE, $this->locale); if ($this->isColumnModified(CurrencyI18nTableMap::NAME)) $criteria->add(CurrencyI18nTableMap::NAME, $this->name); + return $criteria; } @@ -982,7 +991,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -997,6 +1006,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1006,9 +1016,9 @@ abstract class CurrencyI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CurrencyI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CurrencyI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1029,8 +1039,8 @@ abstract class CurrencyI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CurrencyI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CurrencyI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1046,8 +1056,8 @@ abstract class CurrencyI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildCurrency object. * - * @param ChildCurrency $v - * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) + * @param ChildCurrency $v + * @return \Thelia\Model\CurrencyI18n The current object (for fluent API support) * @throws PropelException */ public function setCurrency(ChildCurrency $v = null) @@ -1066,14 +1076,16 @@ abstract class CurrencyI18n implements ActiveRecordInterface $v->addCurrencyI18n($this); } + return $this; } + /** * Get the associated ChildCurrency object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCurrency The associated ChildCurrency object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCurrency The associated ChildCurrency object. * @throws PropelException */ public function getCurrency(ConnectionInterface $con = null) @@ -1115,7 +1127,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CurrencyI18nQuery.php b/core/lib/Thelia/Model/Base/CurrencyI18nQuery.php index 5ac946523..65019d642 100644 --- a/core/lib/Thelia/Model/Base/CurrencyI18nQuery.php +++ b/core/lib/Thelia/Model/Base/CurrencyI18nQuery.php @@ -55,9 +55,9 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CurrencyI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CurrencyI18n', $modelAlias = null) { @@ -67,8 +67,8 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Returns a new ChildCurrencyI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCurrencyI18nQuery */ @@ -128,10 +128,10 @@ abstract class CurrencyI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCurrencyI18n A model object, or null if the key is not found + * @return ChildCurrencyI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -159,8 +159,8 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCurrencyI18n|array|mixed the result, formatted by the current formatter */ @@ -180,8 +180,8 @@ abstract class CurrencyI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -202,7 +202,7 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -217,7 +217,7 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -248,11 +248,11 @@ abstract class CurrencyI18nQuery extends ModelCriteria * * @see filterByCurrency() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -288,9 +288,9 @@ abstract class CurrencyI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -317,9 +317,9 @@ abstract class CurrencyI18nQuery extends ModelCriteria * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%' * * - * @param string $name The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $name The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -340,8 +340,8 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Currency object * - * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -365,8 +365,8 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Currency relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -399,11 +399,11 @@ abstract class CurrencyI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query */ public function useCurrencyQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -415,7 +415,7 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCurrencyI18n $currencyI18n Object to remove from the list of results + * @param ChildCurrencyI18n $currencyI18n Object to remove from the list of results * * @return ChildCurrencyI18nQuery The current query, for fluid interface */ @@ -433,8 +433,8 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Deletes all rows from the currency_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -465,13 +465,13 @@ abstract class CurrencyI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCurrencyI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCurrencyI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCurrencyI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -491,6 +491,7 @@ abstract class CurrencyI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CurrencyI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/CurrencyQuery.php b/core/lib/Thelia/Model/Base/CurrencyQuery.php index 9719106ac..c6382efba 100644 --- a/core/lib/Thelia/Model/Base/CurrencyQuery.php +++ b/core/lib/Thelia/Model/Base/CurrencyQuery.php @@ -88,9 +88,9 @@ abstract class CurrencyQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CurrencyQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Currency', $modelAlias = null) { @@ -100,8 +100,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Returns a new ChildCurrencyQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCurrencyQuery */ @@ -130,7 +130,7 @@ abstract class CurrencyQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCurrency|array|mixed the result, formatted by the current formatter @@ -161,10 +161,10 @@ abstract class CurrencyQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCurrency A model object, or null if the key is not found + * @return ChildCurrency A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -191,8 +191,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCurrency|array|mixed the result, formatted by the current formatter */ @@ -212,8 +212,8 @@ abstract class CurrencyQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -234,24 +234,26 @@ abstract class CurrencyQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCurrencyQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CurrencyTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCurrencyQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CurrencyTableMap::ID, $keys, Criteria::IN); } @@ -265,11 +267,11 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -305,9 +307,9 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -334,9 +336,9 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterBySymbol('%fooValue%'); // WHERE symbol LIKE '%fooValue%' * * - * @param string $symbol The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $symbol The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -364,11 +366,11 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterByRate(array('min' => 12)); // WHERE rate > 12 * * - * @param mixed $rate The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $rate The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -405,11 +407,11 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -446,11 +448,11 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterByByDefault(array('min' => 12)); // WHERE by_default > 12 * * - * @param mixed $byDefault The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $byDefault The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -487,13 +489,13 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -530,13 +532,13 @@ abstract class CurrencyQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -566,8 +568,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -589,8 +591,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Order relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -623,11 +625,11 @@ abstract class CurrencyQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -639,8 +641,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Cart object * - * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -662,8 +664,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Cart relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -696,11 +698,11 @@ abstract class CurrencyQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query */ public function useCartQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -712,8 +714,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductPrice object * - * @param \Thelia\Model\ProductPrice|ObjectCollection $productPrice the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductPrice|ObjectCollection $productPrice the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -735,8 +737,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductPrice relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -769,11 +771,11 @@ abstract class CurrencyQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductPriceQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductPriceQuery A secondary query class using the current class as primary query */ public function useProductPriceQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -785,8 +787,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CurrencyI18n object * - * @param \Thelia\Model\CurrencyI18n|ObjectCollection $currencyI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CurrencyI18n|ObjectCollection $currencyI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -808,8 +810,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CurrencyI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -842,11 +844,11 @@ abstract class CurrencyQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CurrencyI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CurrencyI18nQuery A secondary query class using the current class as primary query */ public function useCurrencyI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -858,7 +860,7 @@ abstract class CurrencyQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCurrency $currency Object to remove from the list of results + * @param ChildCurrency $currency Object to remove from the list of results * * @return ChildCurrencyQuery The current query, for fluid interface */ @@ -874,8 +876,8 @@ abstract class CurrencyQuery extends ModelCriteria /** * Deletes all rows from the currency table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -906,13 +908,13 @@ abstract class CurrencyQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCurrency or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCurrency object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCurrency object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -932,6 +934,7 @@ abstract class CurrencyQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CurrencyTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -950,9 +953,9 @@ abstract class CurrencyQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -962,9 +965,9 @@ abstract class CurrencyQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -974,7 +977,7 @@ abstract class CurrencyQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -984,7 +987,7 @@ abstract class CurrencyQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -994,7 +997,7 @@ abstract class CurrencyQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1004,7 +1007,7 @@ abstract class CurrencyQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1016,11 +1019,11 @@ abstract class CurrencyQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1035,10 +1038,10 @@ abstract class CurrencyQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCurrencyQuery The current query, for fluid interface + * @return ChildCurrencyQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1055,11 +1058,11 @@ abstract class CurrencyQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCurrencyI18nQuery A secondary query class using the current class as primary query + * @return ChildCurrencyI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/Customer.php b/core/lib/Thelia/Model/Base/Customer.php index 1c22f6622..e0450b746 100644 --- a/core/lib/Thelia/Model/Base/Customer.php +++ b/core/lib/Thelia/Model/Base/Customer.php @@ -36,6 +36,7 @@ abstract class Customer implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CustomerTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -416,9 +417,9 @@ abstract class Customer implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Customer The current object, for fluid interface */ @@ -468,140 +469,154 @@ abstract class Customer implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [ref] column value. * - * @return string + * @return string */ public function getRef() { + return $this->ref; } /** * Get the [title_id] column value. * - * @return int + * @return int */ public function getTitleId() { + return $this->title_id; } /** * Get the [firstname] column value. * - * @return string + * @return string */ public function getFirstname() { + return $this->firstname; } /** * Get the [lastname] column value. * - * @return string + * @return string */ public function getLastname() { + return $this->lastname; } /** * Get the [email] column value. * - * @return string + * @return string */ public function getEmail() { + return $this->email; } /** * Get the [password] column value. * - * @return string + * @return string */ public function getPassword() { + return $this->password; } /** * Get the [algo] column value. * - * @return string + * @return string */ public function getAlgo() { + return $this->algo; } /** * Get the [reseller] column value. * - * @return int + * @return int */ public function getReseller() { + return $this->reseller; } /** * Get the [lang] column value. * - * @return string + * @return string */ public function getLang() { + return $this->lang; } /** * Get the [sponsor] column value. * - * @return string + * @return string */ public function getSponsor() { + return $this->sponsor; } /** * Get the [discount] column value. * - * @return double + * @return double */ public function getDiscount() { + return $this->discount; } /** * Get the [remember_me_token] column value. * - * @return string + * @return string */ public function getRememberMeToken() { + return $this->remember_me_token; } /** * Get the [remember_me_serial] column value. * - * @return string + * @return string */ public function getRememberMeSerial() { + return $this->remember_me_serial; } @@ -609,8 +624,8 @@ abstract class Customer implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -629,8 +644,8 @@ abstract class Customer implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -648,8 +663,8 @@ abstract class Customer implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setId($v) { @@ -662,14 +677,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [ref] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setRef($v) { @@ -682,14 +698,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::REF] = true; } + return $this; } // setRef() /** * Set the value of [title_id] column. * - * @param int $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setTitleId($v) { @@ -706,14 +723,15 @@ abstract class Customer implements ActiveRecordInterface $this->aCustomerTitle = null; } + return $this; } // setTitleId() /** * Set the value of [firstname] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setFirstname($v) { @@ -726,14 +744,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::FIRSTNAME] = true; } + return $this; } // setFirstname() /** * Set the value of [lastname] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setLastname($v) { @@ -746,14 +765,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::LASTNAME] = true; } + return $this; } // setLastname() /** * Set the value of [email] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setEmail($v) { @@ -766,14 +786,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::EMAIL] = true; } + return $this; } // setEmail() /** * Set the value of [password] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setPassword($v) { @@ -786,14 +807,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::PASSWORD] = true; } + return $this; } // setPassword() /** * Set the value of [algo] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setAlgo($v) { @@ -806,14 +828,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::ALGO] = true; } + return $this; } // setAlgo() /** * Set the value of [reseller] column. * - * @param int $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setReseller($v) { @@ -826,14 +849,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::RESELLER] = true; } + return $this; } // setReseller() /** * Set the value of [lang] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setLang($v) { @@ -846,14 +870,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::LANG] = true; } + return $this; } // setLang() /** * Set the value of [sponsor] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setSponsor($v) { @@ -866,14 +891,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::SPONSOR] = true; } + return $this; } // setSponsor() /** * Set the value of [discount] column. * - * @param double $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setDiscount($v) { @@ -886,14 +912,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::DISCOUNT] = true; } + return $this; } // setDiscount() /** * Set the value of [remember_me_token] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setRememberMeToken($v) { @@ -906,14 +933,15 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::REMEMBER_ME_TOKEN] = true; } + return $this; } // setRememberMeToken() /** * Set the value of [remember_me_serial] column. * - * @param string $v new value - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setRememberMeSerial($v) { @@ -926,15 +954,16 @@ abstract class Customer implements ActiveRecordInterface $this->modifiedColumns[CustomerTableMap::REMEMBER_ME_SERIAL] = true; } + return $this; } // setRememberMeSerial() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -946,15 +975,16 @@ abstract class Customer implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -966,6 +996,7 @@ abstract class Customer implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -1099,10 +1130,10 @@ abstract class Customer implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1144,7 +1175,7 @@ abstract class Customer implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Customer::setDeleted() @@ -1187,8 +1218,8 @@ abstract class Customer implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1249,8 +1280,8 @@ abstract class Customer implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1344,7 +1375,7 @@ abstract class Customer implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1488,7 +1519,7 @@ abstract class Customer implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1504,12 +1535,12 @@ abstract class Customer implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1523,7 +1554,7 @@ abstract class Customer implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1589,12 +1620,12 @@ abstract class Customer implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1649,12 +1680,12 @@ abstract class Customer implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1668,8 +1699,8 @@ abstract class Customer implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1739,8 +1770,8 @@ abstract class Customer implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1790,6 +1821,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->isColumnModified(CustomerTableMap::REMEMBER_ME_SERIAL)) $criteria->add(CustomerTableMap::REMEMBER_ME_SERIAL, $this->remember_me_serial); if ($this->isColumnModified(CustomerTableMap::CREATED_AT)) $criteria->add(CustomerTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CustomerTableMap::UPDATED_AT)) $criteria->add(CustomerTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1811,7 +1843,7 @@ abstract class Customer implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1821,7 +1853,7 @@ abstract class Customer implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1835,6 +1867,7 @@ abstract class Customer implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1844,9 +1877,9 @@ abstract class Customer implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Customer (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Customer (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1906,8 +1939,8 @@ abstract class Customer implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Customer Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Customer Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1923,8 +1956,8 @@ abstract class Customer implements ActiveRecordInterface /** * Declares an association between this object and a ChildCustomerTitle object. * - * @param ChildCustomerTitle $v - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param ChildCustomerTitle $v + * @return \Thelia\Model\Customer The current object (for fluent API support) * @throws PropelException */ public function setCustomerTitle(ChildCustomerTitle $v = null) @@ -1943,14 +1976,16 @@ abstract class Customer implements ActiveRecordInterface $v->addCustomer($this); } + return $this; } + /** * Get the associated ChildCustomerTitle object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCustomerTitle The associated ChildCustomerTitle object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomerTitle The associated ChildCustomerTitle object. * @throws PropelException */ public function getCustomerTitle(ConnectionInterface $con = null) @@ -1969,12 +2004,13 @@ abstract class Customer implements ActiveRecordInterface return $this->aCustomerTitle; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -2019,8 +2055,8 @@ abstract class Customer implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2042,8 +2078,8 @@ abstract class Customer implements ActiveRecordInterface * If this ChildCustomer is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAddress[] List of ChildAddress objects * @throws PropelException */ @@ -2099,9 +2135,9 @@ abstract class Customer implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $addresses A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCustomer The current object (for fluent API support) + * @param Collection $addresses A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCustomer The current object (for fluent API support) */ public function setAddresses(Collection $addresses, ConnectionInterface $con = null) { @@ -2128,10 +2164,10 @@ abstract class Customer implements ActiveRecordInterface /** * Returns the number of related Address objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Address objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Address objects. * @throws PropelException */ public function countAddresses(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2163,8 +2199,8 @@ abstract class Customer implements ActiveRecordInterface * Method called to associate a ChildAddress object to this object * through the ChildAddress foreign key attribute. * - * @param ChildAddress $l ChildAddress - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param ChildAddress $l ChildAddress + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function addAddress(ChildAddress $l) { @@ -2190,7 +2226,7 @@ abstract class Customer implements ActiveRecordInterface } /** - * @param Address $address The address object to remove. + * @param Address $address The address object to remove. * @return ChildCustomer The current object (for fluent API support) */ public function removeAddress($address) @@ -2220,9 +2256,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAddress[] List of ChildAddress objects */ public function getAddressesJoinCustomerTitle($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2245,9 +2281,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAddress[] List of ChildAddress objects */ public function getAddressesJoinCountry($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2287,8 +2323,8 @@ abstract class Customer implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2310,8 +2346,8 @@ abstract class Customer implements ActiveRecordInterface * If this ChildCustomer is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -2367,9 +2403,9 @@ abstract class Customer implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orders A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCustomer The current object (for fluent API support) + * @param Collection $orders A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCustomer The current object (for fluent API support) */ public function setOrders(Collection $orders, ConnectionInterface $con = null) { @@ -2396,10 +2432,10 @@ abstract class Customer implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2431,8 +2467,8 @@ abstract class Customer implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function addOrder(ChildOrder $l) { @@ -2458,7 +2494,7 @@ abstract class Customer implements ActiveRecordInterface } /** - * @param Order $order The order object to remove. + * @param Order $order The order object to remove. * @return ChildCustomer The current object (for fluent API support) */ public function removeOrder($order) @@ -2488,9 +2524,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2513,9 +2549,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2538,9 +2574,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2563,9 +2599,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2588,9 +2624,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2613,9 +2649,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2638,9 +2674,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2680,8 +2716,8 @@ abstract class Customer implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2703,8 +2739,8 @@ abstract class Customer implements ActiveRecordInterface * If this ChildCustomer is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCart[] List of ChildCart objects * @throws PropelException */ @@ -2760,9 +2796,9 @@ abstract class Customer implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $carts A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCustomer The current object (for fluent API support) + * @param Collection $carts A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCustomer The current object (for fluent API support) */ public function setCarts(Collection $carts, ConnectionInterface $con = null) { @@ -2789,10 +2825,10 @@ abstract class Customer implements ActiveRecordInterface /** * Returns the number of related Cart objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Cart objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Cart objects. * @throws PropelException */ public function countCarts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2824,8 +2860,8 @@ abstract class Customer implements ActiveRecordInterface * Method called to associate a ChildCart object to this object * through the ChildCart foreign key attribute. * - * @param ChildCart $l ChildCart - * @return \Thelia\Model\Customer The current object (for fluent API support) + * @param ChildCart $l ChildCart + * @return \Thelia\Model\Customer The current object (for fluent API support) */ public function addCart(ChildCart $l) { @@ -2851,7 +2887,7 @@ abstract class Customer implements ActiveRecordInterface } /** - * @param Cart $cart The cart object to remove. + * @param Cart $cart The cart object to remove. * @return ChildCustomer The current object (for fluent API support) */ public function removeCart($cart) @@ -2881,9 +2917,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsJoinAddressRelatedByAddressDeliveryId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2906,9 +2942,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsJoinAddressRelatedByAddressInvoiceId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2931,9 +2967,9 @@ abstract class Customer implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Customer. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCart[] List of ChildCart objects */ public function getCartsJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2979,7 +3015,7 @@ abstract class Customer implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -3022,7 +3058,7 @@ abstract class Customer implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCustomer The current object (for fluent API support) + * @return ChildCustomer The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/CustomerQuery.php b/core/lib/Thelia/Model/Base/CustomerQuery.php index c1608bac6..28ccb557b 100644 --- a/core/lib/Thelia/Model/Base/CustomerQuery.php +++ b/core/lib/Thelia/Model/Base/CustomerQuery.php @@ -119,9 +119,9 @@ abstract class CustomerQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CustomerQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Customer', $modelAlias = null) { @@ -131,8 +131,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Returns a new ChildCustomerQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCustomerQuery */ @@ -161,7 +161,7 @@ abstract class CustomerQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCustomer|array|mixed the result, formatted by the current formatter @@ -192,10 +192,10 @@ abstract class CustomerQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCustomer A model object, or null if the key is not found + * @return ChildCustomer A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -222,8 +222,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCustomer|array|mixed the result, formatted by the current formatter */ @@ -243,8 +243,8 @@ abstract class CustomerQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -265,24 +265,26 @@ abstract class CustomerQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCustomerQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CustomerTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCustomerQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CustomerTableMap::ID, $keys, Criteria::IN); } @@ -296,11 +298,11 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -336,9 +338,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%' * * - * @param string $ref The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $ref The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -368,11 +370,11 @@ abstract class CustomerQuery extends ModelCriteria * * @see filterByCustomerTitle() * - * @param mixed $titleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $titleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -408,9 +410,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%' * * - * @param string $firstname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $firstname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -437,9 +439,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%' * * - * @param string $lastname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $lastname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -466,9 +468,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByEmail('%fooValue%'); // WHERE email LIKE '%fooValue%' * * - * @param string $email The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $email The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -495,9 +497,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByPassword('%fooValue%'); // WHERE password LIKE '%fooValue%' * * - * @param string $password The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $password The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -524,9 +526,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByAlgo('%fooValue%'); // WHERE algo LIKE '%fooValue%' * * - * @param string $algo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $algo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -554,11 +556,11 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByReseller(array('min' => 12)); // WHERE reseller > 12 * * - * @param mixed $reseller The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $reseller The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -594,9 +596,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%' * * - * @param string $lang The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $lang The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -623,9 +625,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterBySponsor('%fooValue%'); // WHERE sponsor LIKE '%fooValue%' * * - * @param string $sponsor The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $sponsor The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -653,11 +655,11 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByDiscount(array('min' => 12)); // WHERE discount > 12 * * - * @param mixed $discount The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $discount The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -693,9 +695,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByRememberMeToken('%fooValue%'); // WHERE remember_me_token LIKE '%fooValue%' * * - * @param string $rememberMeToken The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $rememberMeToken The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -722,9 +724,9 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByRememberMeSerial('%fooValue%'); // WHERE remember_me_serial LIKE '%fooValue%' * * - * @param string $rememberMeSerial The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $rememberMeSerial The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -752,13 +754,13 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -795,13 +797,13 @@ abstract class CustomerQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -832,7 +834,7 @@ abstract class CustomerQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\CustomerTitle object * * @param \Thelia\Model\CustomerTitle|ObjectCollection $customerTitle The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -856,8 +858,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CustomerTitle relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -890,11 +892,11 @@ abstract class CustomerQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query */ public function useCustomerTitleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -906,8 +908,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Address object * - * @param \Thelia\Model\Address|ObjectCollection $address the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Address|ObjectCollection $address the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -929,8 +931,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Address relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -963,11 +965,11 @@ abstract class CustomerQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query */ public function useAddressQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -979,8 +981,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -1002,8 +1004,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Order relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -1036,11 +1038,11 @@ abstract class CustomerQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1052,8 +1054,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Cart object * - * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Cart|ObjectCollection $cart the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -1075,8 +1077,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Cart relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -1109,11 +1111,11 @@ abstract class CustomerQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query */ public function useCartQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1125,7 +1127,7 @@ abstract class CustomerQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCustomer $customer Object to remove from the list of results + * @param ChildCustomer $customer Object to remove from the list of results * * @return ChildCustomerQuery The current query, for fluid interface */ @@ -1141,8 +1143,8 @@ abstract class CustomerQuery extends ModelCriteria /** * Deletes all rows from the customer table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1173,13 +1175,13 @@ abstract class CustomerQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCustomer or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCustomer object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCustomer object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1199,6 +1201,7 @@ abstract class CustomerQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CustomerTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1217,9 +1220,9 @@ abstract class CustomerQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCustomerQuery The current query, for fluid interface + * @return ChildCustomerQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1229,9 +1232,9 @@ abstract class CustomerQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCustomerQuery The current query, for fluid interface + * @return ChildCustomerQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1241,7 +1244,7 @@ abstract class CustomerQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCustomerQuery The current query, for fluid interface + * @return ChildCustomerQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1251,7 +1254,7 @@ abstract class CustomerQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCustomerQuery The current query, for fluid interface + * @return ChildCustomerQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1261,7 +1264,7 @@ abstract class CustomerQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCustomerQuery The current query, for fluid interface + * @return ChildCustomerQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1271,7 +1274,7 @@ abstract class CustomerQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCustomerQuery The current query, for fluid interface + * @return ChildCustomerQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/CustomerTitle.php b/core/lib/Thelia/Model/Base/CustomerTitle.php index e8fac0779..3d474c298 100644 --- a/core/lib/Thelia/Model/Base/CustomerTitle.php +++ b/core/lib/Thelia/Model/Base/CustomerTitle.php @@ -34,6 +34,7 @@ abstract class CustomerTitle implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CustomerTitleTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -371,9 +372,9 @@ abstract class CustomerTitle implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CustomerTitle The current object, for fluid interface */ @@ -423,30 +424,33 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [by_default] column value. * - * @return int + * @return int */ public function getByDefault() { + return $this->by_default; } /** * Get the [position] column value. * - * @return string + * @return string */ public function getPosition() { + return $this->position; } @@ -454,8 +458,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +478,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -493,8 +497,8 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function setId($v) { @@ -507,14 +511,15 @@ abstract class CustomerTitle implements ActiveRecordInterface $this->modifiedColumns[CustomerTitleTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [by_default] column. * - * @param int $v new value - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function setByDefault($v) { @@ -527,14 +532,15 @@ abstract class CustomerTitle implements ActiveRecordInterface $this->modifiedColumns[CustomerTitleTableMap::BY_DEFAULT] = true; } + return $this; } // setByDefault() /** * Set the value of [position] column. * - * @param string $v new value - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function setPosition($v) { @@ -547,15 +553,16 @@ abstract class CustomerTitle implements ActiveRecordInterface $this->modifiedColumns[CustomerTitleTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -567,15 +574,16 @@ abstract class CustomerTitle implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -587,6 +595,7 @@ abstract class CustomerTitle implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -630,6 +639,7 @@ abstract class CustomerTitle implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CustomerTitleTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -687,10 +697,10 @@ abstract class CustomerTitle implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -731,7 +741,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CustomerTitle::setDeleted() @@ -774,8 +784,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -836,8 +846,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -919,7 +929,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -997,7 +1007,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1013,12 +1023,12 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1032,7 +1042,7 @@ abstract class CustomerTitle implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1065,12 +1075,12 @@ abstract class CustomerTitle implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1111,12 +1121,12 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1130,8 +1140,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1168,8 +1178,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1197,6 +1207,7 @@ abstract class CustomerTitle implements ActiveRecordInterface if ($this->isColumnModified(CustomerTitleTableMap::POSITION)) $criteria->add(CustomerTitleTableMap::POSITION, $this->position); if ($this->isColumnModified(CustomerTitleTableMap::CREATED_AT)) $criteria->add(CustomerTitleTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CustomerTitleTableMap::UPDATED_AT)) $criteria->add(CustomerTitleTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1218,7 +1229,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1228,7 +1239,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1242,6 +1253,7 @@ abstract class CustomerTitle implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1251,9 +1263,9 @@ abstract class CustomerTitle implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CustomerTitle (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CustomerTitle (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1302,8 +1314,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CustomerTitle Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CustomerTitle Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1322,7 +1334,7 @@ abstract class CustomerTitle implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1367,8 +1379,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1390,8 +1402,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * If this ChildCustomerTitle is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCustomer[] List of ChildCustomer objects * @throws PropelException */ @@ -1447,14 +1459,15 @@ abstract class CustomerTitle implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $customers A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCustomerTitle The current object (for fluent API support) + * @param Collection $customers A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCustomerTitle The current object (for fluent API support) */ public function setCustomers(Collection $customers, ConnectionInterface $con = null) { $customersToDelete = $this->getCustomers(new Criteria(), $con)->diff($customers); + $this->customersScheduledForDeletion = $customersToDelete; foreach ($customersToDelete as $customerRemoved) { @@ -1475,10 +1488,10 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Returns the number of related Customer objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Customer objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Customer objects. * @throws PropelException */ public function countCustomers(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1510,8 +1523,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * Method called to associate a ChildCustomer object to this object * through the ChildCustomer foreign key attribute. * - * @param ChildCustomer $l ChildCustomer - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param ChildCustomer $l ChildCustomer + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function addCustomer(ChildCustomer $l) { @@ -1537,7 +1550,7 @@ abstract class CustomerTitle implements ActiveRecordInterface } /** - * @param Customer $customer The customer object to remove. + * @param Customer $customer The customer object to remove. * @return ChildCustomerTitle The current object (for fluent API support) */ public function removeCustomer($customer) @@ -1584,8 +1597,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1607,8 +1620,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * If this ChildCustomerTitle is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAddress[] List of ChildAddress objects * @throws PropelException */ @@ -1664,14 +1677,15 @@ abstract class CustomerTitle implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $addresses A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCustomerTitle The current object (for fluent API support) + * @param Collection $addresses A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCustomerTitle The current object (for fluent API support) */ public function setAddresses(Collection $addresses, ConnectionInterface $con = null) { $addressesToDelete = $this->getAddresses(new Criteria(), $con)->diff($addresses); + $this->addressesScheduledForDeletion = $addressesToDelete; foreach ($addressesToDelete as $addressRemoved) { @@ -1692,10 +1706,10 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Returns the number of related Address objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Address objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Address objects. * @throws PropelException */ public function countAddresses(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1727,8 +1741,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * Method called to associate a ChildAddress object to this object * through the ChildAddress foreign key attribute. * - * @param ChildAddress $l ChildAddress - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param ChildAddress $l ChildAddress + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function addAddress(ChildAddress $l) { @@ -1754,7 +1768,7 @@ abstract class CustomerTitle implements ActiveRecordInterface } /** - * @param Address $address The address object to remove. + * @param Address $address The address object to remove. * @return ChildCustomerTitle The current object (for fluent API support) */ public function removeAddress($address) @@ -1772,6 +1786,7 @@ abstract class CustomerTitle implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1783,9 +1798,9 @@ abstract class CustomerTitle implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in CustomerTitle. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAddress[] List of ChildAddress objects */ public function getAddressesJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1796,6 +1811,7 @@ abstract class CustomerTitle implements ActiveRecordInterface return $this->getAddresses($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1807,9 +1823,9 @@ abstract class CustomerTitle implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in CustomerTitle. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAddress[] List of ChildAddress objects */ public function getAddressesJoinCountry($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1849,8 +1865,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1872,8 +1888,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * If this ChildCustomerTitle is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCustomerTitleI18n[] List of ChildCustomerTitleI18n objects * @throws PropelException */ @@ -1929,14 +1945,15 @@ abstract class CustomerTitle implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $customerTitleI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildCustomerTitle The current object (for fluent API support) + * @param Collection $customerTitleI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCustomerTitle The current object (for fluent API support) */ public function setCustomerTitleI18ns(Collection $customerTitleI18ns, ConnectionInterface $con = null) { $customerTitleI18nsToDelete = $this->getCustomerTitleI18ns(new Criteria(), $con)->diff($customerTitleI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1960,10 +1977,10 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Returns the number of related CustomerTitleI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CustomerTitleI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CustomerTitleI18n objects. * @throws PropelException */ public function countCustomerTitleI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1995,8 +2012,8 @@ abstract class CustomerTitle implements ActiveRecordInterface * Method called to associate a ChildCustomerTitleI18n object to this object * through the ChildCustomerTitleI18n foreign key attribute. * - * @param ChildCustomerTitleI18n $l ChildCustomerTitleI18n - * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) + * @param ChildCustomerTitleI18n $l ChildCustomerTitleI18n + * @return \Thelia\Model\CustomerTitle The current object (for fluent API support) */ public function addCustomerTitleI18n(ChildCustomerTitleI18n $l) { @@ -2026,7 +2043,7 @@ abstract class CustomerTitle implements ActiveRecordInterface } /** - * @param CustomerTitleI18n $customerTitleI18n The customerTitleI18n object to remove. + * @param CustomerTitleI18n $customerTitleI18n The customerTitleI18n object to remove. * @return ChildCustomerTitle The current object (for fluent API support) */ public function removeCustomerTitleI18n($customerTitleI18n) @@ -2069,7 +2086,7 @@ abstract class CustomerTitle implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2115,7 +2132,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildCustomerTitle The current object (for fluent API support) + * @return ChildCustomerTitle The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2129,9 +2146,9 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildCustomerTitle The current object (for fluent API support) + * @return ChildCustomerTitle The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2143,7 +2160,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2153,8 +2170,8 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildCustomerTitleI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2187,10 +2204,10 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildCustomerTitle The current object (for fluent API support) + * @return ChildCustomerTitle The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2215,7 +2232,7 @@ abstract class CustomerTitle implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildCustomerTitleI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2223,6 +2240,7 @@ abstract class CustomerTitle implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [short] column value. * @@ -2233,6 +2251,7 @@ abstract class CustomerTitle implements ActiveRecordInterface return $this->getCurrentTranslation()->getShort(); } + /** * Set the value of [short] column. * @@ -2245,6 +2264,7 @@ abstract class CustomerTitle implements ActiveRecordInterface return $this; } + /** * Get the [long] column value. * @@ -2255,6 +2275,7 @@ abstract class CustomerTitle implements ActiveRecordInterface return $this->getCurrentTranslation()->getLong(); } + /** * Set the value of [long] column. * @@ -2343,6 +2364,7 @@ abstract class CustomerTitle implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/CustomerTitleI18n.php b/core/lib/Thelia/Model/Base/CustomerTitleI18n.php index 6234775cc..a0aafcba9 100644 --- a/core/lib/Thelia/Model/Base/CustomerTitleI18n.php +++ b/core/lib/Thelia/Model/Base/CustomerTitleI18n.php @@ -26,6 +26,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\CustomerTitleI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -312,9 +313,9 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return CustomerTitleI18n The current object, for fluid interface */ @@ -364,48 +365,52 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [short] column value. * - * @return string + * @return string */ public function getShort() { + return $this->short; } /** * Get the [long] column value. * - * @return string + * @return string */ public function getLong() { + return $this->long; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) */ public function setId($v) { @@ -422,14 +427,15 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface $this->aCustomerTitle = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -442,14 +448,15 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface $this->modifiedColumns[CustomerTitleI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [short] column. * - * @param string $v new value - * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) */ public function setShort($v) { @@ -462,14 +469,15 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface $this->modifiedColumns[CustomerTitleI18nTableMap::SHORT] = true; } + return $this; } // setShort() /** * Set the value of [long] column. * - * @param string $v new value - * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) */ public function setLong($v) { @@ -482,6 +490,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface $this->modifiedColumns[CustomerTitleI18nTableMap::LONG] = true; } + return $this; } // setLong() @@ -525,6 +534,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CustomerTitleI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -576,10 +586,10 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -615,7 +625,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see CustomerTitleI18n::setDeleted() @@ -658,8 +668,8 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -709,8 +719,8 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -753,7 +763,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -814,7 +824,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -830,12 +840,12 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -849,7 +859,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -879,12 +889,12 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -918,12 +928,12 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -937,8 +947,8 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -972,8 +982,8 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -999,6 +1009,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface if ($this->isColumnModified(CustomerTitleI18nTableMap::LOCALE)) $criteria->add(CustomerTitleI18nTableMap::LOCALE, $this->locale); if ($this->isColumnModified(CustomerTitleI18nTableMap::SHORT)) $criteria->add(CustomerTitleI18nTableMap::SHORT, $this->short); if ($this->isColumnModified(CustomerTitleI18nTableMap::LONG)) $criteria->add(CustomerTitleI18nTableMap::LONG, $this->long); + return $criteria; } @@ -1036,7 +1047,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1051,6 +1062,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1060,9 +1072,9 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\CustomerTitleI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\CustomerTitleI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1084,8 +1096,8 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\CustomerTitleI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\CustomerTitleI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1101,8 +1113,8 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildCustomerTitle object. * - * @param ChildCustomerTitle $v - * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) + * @param ChildCustomerTitle $v + * @return \Thelia\Model\CustomerTitleI18n The current object (for fluent API support) * @throws PropelException */ public function setCustomerTitle(ChildCustomerTitle $v = null) @@ -1121,14 +1133,16 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface $v->addCustomerTitleI18n($this); } + return $this; } + /** * Get the associated ChildCustomerTitle object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCustomerTitle The associated ChildCustomerTitle object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomerTitle The associated ChildCustomerTitle object. * @throws PropelException */ public function getCustomerTitle(ConnectionInterface $con = null) @@ -1171,7 +1185,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/CustomerTitleI18nQuery.php b/core/lib/Thelia/Model/Base/CustomerTitleI18nQuery.php index da6ee383d..446d44b1f 100644 --- a/core/lib/Thelia/Model/Base/CustomerTitleI18nQuery.php +++ b/core/lib/Thelia/Model/Base/CustomerTitleI18nQuery.php @@ -59,9 +59,9 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CustomerTitleI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CustomerTitleI18n', $modelAlias = null) { @@ -71,8 +71,8 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Returns a new ChildCustomerTitleI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCustomerTitleI18nQuery */ @@ -132,10 +132,10 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCustomerTitleI18n A model object, or null if the key is not found + * @return ChildCustomerTitleI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -163,8 +163,8 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCustomerTitleI18n|array|mixed the result, formatted by the current formatter */ @@ -184,8 +184,8 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -206,7 +206,7 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -221,7 +221,7 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -252,11 +252,11 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * * @see filterByCustomerTitle() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -292,9 +292,9 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -321,9 +321,9 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * $query->filterByShort('%fooValue%'); // WHERE short LIKE '%fooValue%' * * - * @param string $short The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $short The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -350,9 +350,9 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * $query->filterByLong('%fooValue%'); // WHERE long LIKE '%fooValue%' * * - * @param string $long The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $long The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -374,7 +374,7 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\CustomerTitle object * * @param \Thelia\Model\CustomerTitle|ObjectCollection $customerTitle The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -398,8 +398,8 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CustomerTitle relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -432,11 +432,11 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query */ public function useCustomerTitleQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -448,7 +448,7 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCustomerTitleI18n $customerTitleI18n Object to remove from the list of results + * @param ChildCustomerTitleI18n $customerTitleI18n Object to remove from the list of results * * @return ChildCustomerTitleI18nQuery The current query, for fluid interface */ @@ -466,8 +466,8 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Deletes all rows from the customer_title_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -498,13 +498,13 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCustomerTitleI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCustomerTitleI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCustomerTitleI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -524,6 +524,7 @@ abstract class CustomerTitleI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CustomerTitleI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/CustomerTitleQuery.php b/core/lib/Thelia/Model/Base/CustomerTitleQuery.php index 93ac36a03..62fa27684 100644 --- a/core/lib/Thelia/Model/Base/CustomerTitleQuery.php +++ b/core/lib/Thelia/Model/Base/CustomerTitleQuery.php @@ -72,9 +72,9 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\CustomerTitleQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\CustomerTitle', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Returns a new ChildCustomerTitleQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildCustomerTitleQuery */ @@ -114,7 +114,7 @@ abstract class CustomerTitleQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildCustomerTitle|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class CustomerTitleQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildCustomerTitle A model object, or null if the key is not found + * @return ChildCustomerTitle A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildCustomerTitle|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class CustomerTitleQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(CustomerTitleTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(CustomerTitleTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class CustomerTitleQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -290,11 +292,11 @@ abstract class CustomerTitleQuery extends ModelCriteria * $query->filterByByDefault(array('min' => 12)); // WHERE by_default > 12 * * - * @param mixed $byDefault The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $byDefault The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -330,9 +332,9 @@ abstract class CustomerTitleQuery extends ModelCriteria * $query->filterByPosition('%fooValue%'); // WHERE position LIKE '%fooValue%' * * - * @param string $position The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $position The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -360,13 +362,13 @@ abstract class CustomerTitleQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class CustomerTitleQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -439,8 +441,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Customer object * - * @param \Thelia\Model\Customer|ObjectCollection $customer the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Customer|ObjectCollection $customer the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -462,8 +464,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Customer relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -496,11 +498,11 @@ abstract class CustomerTitleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query */ public function useCustomerQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -512,8 +514,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Address object * - * @param \Thelia\Model\Address|ObjectCollection $address the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Address|ObjectCollection $address the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -535,8 +537,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Address relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -569,11 +571,11 @@ abstract class CustomerTitleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AddressQuery A secondary query class using the current class as primary query */ public function useAddressQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -585,8 +587,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CustomerTitleI18n object * - * @param \Thelia\Model\CustomerTitleI18n|ObjectCollection $customerTitleI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CustomerTitleI18n|ObjectCollection $customerTitleI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -608,8 +610,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CustomerTitleI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -642,11 +644,11 @@ abstract class CustomerTitleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerTitleI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerTitleI18nQuery A secondary query class using the current class as primary query */ public function useCustomerTitleI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -658,7 +660,7 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildCustomerTitle $customerTitle Object to remove from the list of results + * @param ChildCustomerTitle $customerTitle Object to remove from the list of results * * @return ChildCustomerTitleQuery The current query, for fluid interface */ @@ -674,8 +676,8 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Deletes all rows from the customer_title table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -706,13 +708,13 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildCustomerTitle or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildCustomerTitle object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildCustomerTitle object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -732,6 +734,7 @@ abstract class CustomerTitleQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + CustomerTitleTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -750,9 +753,9 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -762,9 +765,9 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -774,7 +777,7 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -784,7 +787,7 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -794,7 +797,7 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -804,7 +807,7 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -816,11 +819,11 @@ abstract class CustomerTitleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -835,10 +838,10 @@ abstract class CustomerTitleQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCustomerTitleQuery The current query, for fluid interface + * @return ChildCustomerTitleQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -855,11 +858,11 @@ abstract class CustomerTitleQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildCustomerTitleI18nQuery A secondary query class using the current class as primary query + * @return ChildCustomerTitleI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/Feature.php b/core/lib/Thelia/Model/Base/Feature.php index 1fd61eb13..c44ab606e 100644 --- a/core/lib/Thelia/Model/Base/Feature.php +++ b/core/lib/Thelia/Model/Base/Feature.php @@ -38,6 +38,7 @@ abstract class Feature implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FeatureTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -398,9 +399,9 @@ abstract class Feature implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Feature The current object, for fluid interface */ @@ -450,30 +451,33 @@ abstract class Feature implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -481,8 +485,8 @@ abstract class Feature implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -501,8 +505,8 @@ abstract class Feature implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -520,8 +524,8 @@ abstract class Feature implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function setId($v) { @@ -534,14 +538,15 @@ abstract class Feature implements ActiveRecordInterface $this->modifiedColumns[FeatureTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function setVisible($v) { @@ -554,14 +559,15 @@ abstract class Feature implements ActiveRecordInterface $this->modifiedColumns[FeatureTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function setPosition($v) { @@ -574,15 +580,16 @@ abstract class Feature implements ActiveRecordInterface $this->modifiedColumns[FeatureTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -594,15 +601,16 @@ abstract class Feature implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -614,6 +622,7 @@ abstract class Feature implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -657,6 +666,7 @@ abstract class Feature implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FeatureTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -714,10 +724,10 @@ abstract class Feature implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -761,7 +771,7 @@ abstract class Feature implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Feature::setDeleted() @@ -804,8 +814,8 @@ abstract class Feature implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -866,8 +876,8 @@ abstract class Feature implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -993,7 +1003,7 @@ abstract class Feature implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1071,7 +1081,7 @@ abstract class Feature implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1087,12 +1097,12 @@ abstract class Feature implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1106,7 +1116,7 @@ abstract class Feature implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1139,12 +1149,12 @@ abstract class Feature implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1188,12 +1198,12 @@ abstract class Feature implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1207,8 +1217,8 @@ abstract class Feature implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1245,8 +1255,8 @@ abstract class Feature implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1274,6 +1284,7 @@ abstract class Feature implements ActiveRecordInterface if ($this->isColumnModified(FeatureTableMap::POSITION)) $criteria->add(FeatureTableMap::POSITION, $this->position); if ($this->isColumnModified(FeatureTableMap::CREATED_AT)) $criteria->add(FeatureTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(FeatureTableMap::UPDATED_AT)) $criteria->add(FeatureTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1295,7 +1306,7 @@ abstract class Feature implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1305,7 +1316,7 @@ abstract class Feature implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1319,6 +1330,7 @@ abstract class Feature implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1328,9 +1340,9 @@ abstract class Feature implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Feature (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Feature (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1385,8 +1397,8 @@ abstract class Feature implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Feature Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Feature Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1399,12 +1411,13 @@ abstract class Feature implements ActiveRecordInterface return $copyObj; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1452,8 +1465,8 @@ abstract class Feature implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1475,8 +1488,8 @@ abstract class Feature implements ActiveRecordInterface * If this ChildFeature is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureAv[] List of ChildFeatureAv objects * @throws PropelException */ @@ -1532,9 +1545,9 @@ abstract class Feature implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureAvs A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFeature The current object (for fluent API support) + * @param Collection $featureAvs A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFeature The current object (for fluent API support) */ public function setFeatureAvs(Collection $featureAvs, ConnectionInterface $con = null) { @@ -1561,10 +1574,10 @@ abstract class Feature implements ActiveRecordInterface /** * Returns the number of related FeatureAv objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureAv objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureAv objects. * @throws PropelException */ public function countFeatureAvs(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1596,8 +1609,8 @@ abstract class Feature implements ActiveRecordInterface * Method called to associate a ChildFeatureAv object to this object * through the ChildFeatureAv foreign key attribute. * - * @param ChildFeatureAv $l ChildFeatureAv - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param ChildFeatureAv $l ChildFeatureAv + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function addFeatureAv(ChildFeatureAv $l) { @@ -1623,7 +1636,7 @@ abstract class Feature implements ActiveRecordInterface } /** - * @param FeatureAv $featureAv The featureAv object to remove. + * @param FeatureAv $featureAv The featureAv object to remove. * @return ChildFeature The current object (for fluent API support) */ public function removeFeatureAv($featureAv) @@ -1670,8 +1683,8 @@ abstract class Feature implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1693,8 +1706,8 @@ abstract class Feature implements ActiveRecordInterface * If this ChildFeature is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects * @throws PropelException */ @@ -1750,9 +1763,9 @@ abstract class Feature implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureProducts A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFeature The current object (for fluent API support) + * @param Collection $featureProducts A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFeature The current object (for fluent API support) */ public function setFeatureProducts(Collection $featureProducts, ConnectionInterface $con = null) { @@ -1779,10 +1792,10 @@ abstract class Feature implements ActiveRecordInterface /** * Returns the number of related FeatureProduct objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureProduct objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureProduct objects. * @throws PropelException */ public function countFeatureProducts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1814,8 +1827,8 @@ abstract class Feature implements ActiveRecordInterface * Method called to associate a ChildFeatureProduct object to this object * through the ChildFeatureProduct foreign key attribute. * - * @param ChildFeatureProduct $l ChildFeatureProduct - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param ChildFeatureProduct $l ChildFeatureProduct + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function addFeatureProduct(ChildFeatureProduct $l) { @@ -1842,7 +1855,7 @@ abstract class Feature implements ActiveRecordInterface /** * @param FeatureProduct $featureProduct The featureProduct object to remove. - * @return ChildFeature The current object (for fluent API support) + * @return ChildFeature The current object (for fluent API support) */ public function removeFeatureProduct($featureProduct) { @@ -1871,9 +1884,9 @@ abstract class Feature implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Feature. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects */ public function getFeatureProductsJoinProduct($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1896,9 +1909,9 @@ abstract class Feature implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Feature. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects */ public function getFeatureProductsJoinFeatureAv($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1938,8 +1951,8 @@ abstract class Feature implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1961,8 +1974,8 @@ abstract class Feature implements ActiveRecordInterface * If this ChildFeature is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureTemplate[] List of ChildFeatureTemplate objects * @throws PropelException */ @@ -2018,9 +2031,9 @@ abstract class Feature implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureTemplates A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFeature The current object (for fluent API support) + * @param Collection $featureTemplates A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFeature The current object (for fluent API support) */ public function setFeatureTemplates(Collection $featureTemplates, ConnectionInterface $con = null) { @@ -2047,10 +2060,10 @@ abstract class Feature implements ActiveRecordInterface /** * Returns the number of related FeatureTemplate objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureTemplate objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureTemplate objects. * @throws PropelException */ public function countFeatureTemplates(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2082,8 +2095,8 @@ abstract class Feature implements ActiveRecordInterface * Method called to associate a ChildFeatureTemplate object to this object * through the ChildFeatureTemplate foreign key attribute. * - * @param ChildFeatureTemplate $l ChildFeatureTemplate - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param ChildFeatureTemplate $l ChildFeatureTemplate + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function addFeatureTemplate(ChildFeatureTemplate $l) { @@ -2110,7 +2123,7 @@ abstract class Feature implements ActiveRecordInterface /** * @param FeatureTemplate $featureTemplate The featureTemplate object to remove. - * @return ChildFeature The current object (for fluent API support) + * @return ChildFeature The current object (for fluent API support) */ public function removeFeatureTemplate($featureTemplate) { @@ -2139,9 +2152,9 @@ abstract class Feature implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Feature. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureTemplate[] List of ChildFeatureTemplate objects */ public function getFeatureTemplatesJoinTemplate($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2181,8 +2194,8 @@ abstract class Feature implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2204,8 +2217,8 @@ abstract class Feature implements ActiveRecordInterface * If this ChildFeature is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureI18n[] List of ChildFeatureI18n objects * @throws PropelException */ @@ -2261,9 +2274,9 @@ abstract class Feature implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFeature The current object (for fluent API support) + * @param Collection $featureI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFeature The current object (for fluent API support) */ public function setFeatureI18ns(Collection $featureI18ns, ConnectionInterface $con = null) { @@ -2293,10 +2306,10 @@ abstract class Feature implements ActiveRecordInterface /** * Returns the number of related FeatureI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureI18n objects. * @throws PropelException */ public function countFeatureI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2328,8 +2341,8 @@ abstract class Feature implements ActiveRecordInterface * Method called to associate a ChildFeatureI18n object to this object * through the ChildFeatureI18n foreign key attribute. * - * @param ChildFeatureI18n $l ChildFeatureI18n - * @return \Thelia\Model\Feature The current object (for fluent API support) + * @param ChildFeatureI18n $l ChildFeatureI18n + * @return \Thelia\Model\Feature The current object (for fluent API support) */ public function addFeatureI18n(ChildFeatureI18n $l) { @@ -2359,7 +2372,7 @@ abstract class Feature implements ActiveRecordInterface } /** - * @param FeatureI18n $featureI18n The featureI18n object to remove. + * @param FeatureI18n $featureI18n The featureI18n object to remove. * @return ChildFeature The current object (for fluent API support) */ public function removeFeatureI18n($featureI18n) @@ -2417,8 +2430,8 @@ abstract class Feature implements ActiveRecordInterface * If this ChildFeature is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildTemplate[] List of ChildTemplate objects */ @@ -2448,9 +2461,9 @@ abstract class Feature implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $templates A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFeature The current object (for fluent API support) + * @param Collection $templates A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFeature The current object (for fluent API support) */ public function setTemplates(Collection $templates, ConnectionInterface $con = null) { @@ -2474,9 +2487,9 @@ abstract class Feature implements ActiveRecordInterface * Gets the number of ChildTemplate objects related by a many-to-many relationship * to the current object by way of the feature_template cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildTemplate objects */ @@ -2505,7 +2518,7 @@ abstract class Feature implements ActiveRecordInterface * through the feature_template cross reference table. * * @param ChildTemplate $template The ChildFeatureTemplate object to relate - * @return ChildFeature The current object (for fluent API support) + * @return ChildFeature The current object (for fluent API support) */ public function addTemplate(ChildTemplate $template) { @@ -2522,7 +2535,7 @@ abstract class Feature implements ActiveRecordInterface } /** - * @param Template $template The template object to add. + * @param Template $template The template object to add. */ protected function doAddTemplate($template) { @@ -2541,8 +2554,8 @@ abstract class Feature implements ActiveRecordInterface * Remove a ChildTemplate object to this object * through the feature_template cross reference table. * - * @param ChildTemplate $template The ChildFeatureTemplate object to relate - * @return ChildFeature The current object (for fluent API support) + * @param ChildTemplate $template The ChildFeatureTemplate object to relate + * @return ChildFeature The current object (for fluent API support) */ public function removeTemplate(ChildTemplate $template) { @@ -2585,7 +2598,7 @@ abstract class Feature implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2643,7 +2656,7 @@ abstract class Feature implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildFeature The current object (for fluent API support) + * @return ChildFeature The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2657,9 +2670,9 @@ abstract class Feature implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildFeature The current object (for fluent API support) + * @return ChildFeature The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2671,7 +2684,7 @@ abstract class Feature implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2681,8 +2694,8 @@ abstract class Feature implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildFeatureI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2715,10 +2728,10 @@ abstract class Feature implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildFeature The current object (for fluent API support) + * @return ChildFeature The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2743,7 +2756,7 @@ abstract class Feature implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildFeatureI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/FeatureAv.php b/core/lib/Thelia/Model/Base/FeatureAv.php index ee78a8786..97fd6af1b 100644 --- a/core/lib/Thelia/Model/Base/FeatureAv.php +++ b/core/lib/Thelia/Model/Base/FeatureAv.php @@ -34,6 +34,7 @@ abstract class FeatureAv implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FeatureAvTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -350,9 +351,9 @@ abstract class FeatureAv implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FeatureAv The current object, for fluid interface */ @@ -402,30 +403,33 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [feature_id] column value. * - * @return int + * @return int */ public function getFeatureId() { + return $this->feature_id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -433,8 +437,8 @@ abstract class FeatureAv implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -453,8 +457,8 @@ abstract class FeatureAv implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -472,8 +476,8 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) */ public function setId($v) { @@ -486,14 +490,15 @@ abstract class FeatureAv implements ActiveRecordInterface $this->modifiedColumns[FeatureAvTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [feature_id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) */ public function setFeatureId($v) { @@ -510,14 +515,15 @@ abstract class FeatureAv implements ActiveRecordInterface $this->aFeature = null; } + return $this; } // setFeatureId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) */ public function setPosition($v) { @@ -530,15 +536,16 @@ abstract class FeatureAv implements ActiveRecordInterface $this->modifiedColumns[FeatureAvTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -550,15 +557,16 @@ abstract class FeatureAv implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -570,6 +578,7 @@ abstract class FeatureAv implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -670,10 +679,10 @@ abstract class FeatureAv implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -713,7 +722,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FeatureAv::setDeleted() @@ -756,8 +765,8 @@ abstract class FeatureAv implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -818,8 +827,8 @@ abstract class FeatureAv implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -896,7 +905,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -974,7 +983,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -990,12 +999,12 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1009,7 +1018,7 @@ abstract class FeatureAv implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1042,12 +1051,12 @@ abstract class FeatureAv implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1088,12 +1097,12 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1107,8 +1116,8 @@ abstract class FeatureAv implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1145,8 +1154,8 @@ abstract class FeatureAv implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1174,6 +1183,7 @@ abstract class FeatureAv implements ActiveRecordInterface if ($this->isColumnModified(FeatureAvTableMap::POSITION)) $criteria->add(FeatureAvTableMap::POSITION, $this->position); if ($this->isColumnModified(FeatureAvTableMap::CREATED_AT)) $criteria->add(FeatureAvTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(FeatureAvTableMap::UPDATED_AT)) $criteria->add(FeatureAvTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1195,7 +1205,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1205,7 +1215,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1219,6 +1229,7 @@ abstract class FeatureAv implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1228,9 +1239,9 @@ abstract class FeatureAv implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FeatureAv (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FeatureAv (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1273,8 +1284,8 @@ abstract class FeatureAv implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FeatureAv Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FeatureAv Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1290,8 +1301,8 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Declares an association between this object and a ChildFeature object. * - * @param ChildFeature $v - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param ChildFeature $v + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) * @throws PropelException */ public function setFeature(ChildFeature $v = null) @@ -1310,6 +1321,7 @@ abstract class FeatureAv implements ActiveRecordInterface $v->addFeatureAv($this); } + return $this; } @@ -1317,8 +1329,8 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Get the associated ChildFeature object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFeature The associated ChildFeature object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFeature The associated ChildFeature object. * @throws PropelException */ public function getFeature(ConnectionInterface $con = null) @@ -1343,7 +1355,7 @@ abstract class FeatureAv implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1385,8 +1397,8 @@ abstract class FeatureAv implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1408,8 +1420,8 @@ abstract class FeatureAv implements ActiveRecordInterface * If this ChildFeatureAv is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects * @throws PropelException */ @@ -1465,14 +1477,15 @@ abstract class FeatureAv implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureProducts A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFeatureAv The current object (for fluent API support) + * @param Collection $featureProducts A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFeatureAv The current object (for fluent API support) */ public function setFeatureProducts(Collection $featureProducts, ConnectionInterface $con = null) { $featureProductsToDelete = $this->getFeatureProducts(new Criteria(), $con)->diff($featureProducts); + $this->featureProductsScheduledForDeletion = $featureProductsToDelete; foreach ($featureProductsToDelete as $featureProductRemoved) { @@ -1493,10 +1506,10 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Returns the number of related FeatureProduct objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureProduct objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureProduct objects. * @throws PropelException */ public function countFeatureProducts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1528,8 +1541,8 @@ abstract class FeatureAv implements ActiveRecordInterface * Method called to associate a ChildFeatureProduct object to this object * through the ChildFeatureProduct foreign key attribute. * - * @param ChildFeatureProduct $l ChildFeatureProduct - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param ChildFeatureProduct $l ChildFeatureProduct + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) */ public function addFeatureProduct(ChildFeatureProduct $l) { @@ -1573,6 +1586,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1584,9 +1598,9 @@ abstract class FeatureAv implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in FeatureAv. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects */ public function getFeatureProductsJoinProduct($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1597,6 +1611,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this->getFeatureProducts($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1608,9 +1623,9 @@ abstract class FeatureAv implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in FeatureAv. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects */ public function getFeatureProductsJoinFeature($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1650,8 +1665,8 @@ abstract class FeatureAv implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1673,8 +1688,8 @@ abstract class FeatureAv implements ActiveRecordInterface * If this ChildFeatureAv is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureAvI18n[] List of ChildFeatureAvI18n objects * @throws PropelException */ @@ -1730,14 +1745,15 @@ abstract class FeatureAv implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureAvI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFeatureAv The current object (for fluent API support) + * @param Collection $featureAvI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFeatureAv The current object (for fluent API support) */ public function setFeatureAvI18ns(Collection $featureAvI18ns, ConnectionInterface $con = null) { $featureAvI18nsToDelete = $this->getFeatureAvI18ns(new Criteria(), $con)->diff($featureAvI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1761,10 +1777,10 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Returns the number of related FeatureAvI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureAvI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureAvI18n objects. * @throws PropelException */ public function countFeatureAvI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1796,8 +1812,8 @@ abstract class FeatureAv implements ActiveRecordInterface * Method called to associate a ChildFeatureAvI18n object to this object * through the ChildFeatureAvI18n foreign key attribute. * - * @param ChildFeatureAvI18n $l ChildFeatureAvI18n - * @return \Thelia\Model\FeatureAv The current object (for fluent API support) + * @param ChildFeatureAvI18n $l ChildFeatureAvI18n + * @return \Thelia\Model\FeatureAv The current object (for fluent API support) */ public function addFeatureAvI18n(ChildFeatureAvI18n $l) { @@ -1827,7 +1843,7 @@ abstract class FeatureAv implements ActiveRecordInterface } /** - * @param FeatureAvI18n $featureAvI18n The featureAvI18n object to remove. + * @param FeatureAvI18n $featureAvI18n The featureAvI18n object to remove. * @return ChildFeatureAv The current object (for fluent API support) */ public function removeFeatureAvI18n($featureAvI18n) @@ -1869,7 +1885,7 @@ abstract class FeatureAv implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1910,7 +1926,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildFeatureAv The current object (for fluent API support) + * @return ChildFeatureAv The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1924,9 +1940,9 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildFeatureAv The current object (for fluent API support) + * @return ChildFeatureAv The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1938,7 +1954,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1948,8 +1964,8 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildFeatureAvI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1982,10 +1998,10 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildFeatureAv The current object (for fluent API support) + * @return ChildFeatureAv The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2010,7 +2026,7 @@ abstract class FeatureAv implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildFeatureAvI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2018,6 +2034,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2028,6 +2045,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2040,6 +2058,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2050,6 +2069,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2062,6 +2082,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -2072,6 +2093,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -2084,6 +2106,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -2094,6 +2117,7 @@ abstract class FeatureAv implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -2182,6 +2206,7 @@ abstract class FeatureAv implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/FeatureAvI18n.php b/core/lib/Thelia/Model/Base/FeatureAvI18n.php index 497a8b108..8b3d2c93c 100644 --- a/core/lib/Thelia/Model/Base/FeatureAvI18n.php +++ b/core/lib/Thelia/Model/Base/FeatureAvI18n.php @@ -26,6 +26,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FeatureAvI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FeatureAvI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class FeatureAvI18n implements ActiveRecordInterface $this->aFeatureAv = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class FeatureAvI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureAvI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class FeatureAvI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureAvI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class FeatureAvI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureAvI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class FeatureAvI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureAvI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureAvI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FeatureAvI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FeatureAvI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface if ($this->isColumnModified(FeatureAvI18nTableMap::DESCRIPTION)) $criteria->add(FeatureAvI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(FeatureAvI18nTableMap::CHAPO)) $criteria->add(FeatureAvI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(FeatureAvI18nTableMap::POSTSCRIPTUM)) $criteria->add(FeatureAvI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FeatureAvI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FeatureAvI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FeatureAvI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FeatureAvI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class FeatureAvI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildFeatureAv object. * - * @param ChildFeatureAv $v - * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) + * @param ChildFeatureAv $v + * @return \Thelia\Model\FeatureAvI18n The current object (for fluent API support) * @throws PropelException */ public function setFeatureAv(ChildFeatureAv $v = null) @@ -1231,14 +1247,16 @@ abstract class FeatureAvI18n implements ActiveRecordInterface $v->addFeatureAvI18n($this); } + return $this; } + /** * Get the associated ChildFeatureAv object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFeatureAv The associated ChildFeatureAv object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFeatureAv The associated ChildFeatureAv object. * @throws PropelException */ public function getFeatureAv(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/FeatureAvI18nQuery.php b/core/lib/Thelia/Model/Base/FeatureAvI18nQuery.php index 208d7dc49..88bb52aa5 100644 --- a/core/lib/Thelia/Model/Base/FeatureAvI18nQuery.php +++ b/core/lib/Thelia/Model/Base/FeatureAvI18nQuery.php @@ -67,9 +67,9 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FeatureAvI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FeatureAvI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Returns a new ChildFeatureAvI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFeatureAvI18nQuery */ @@ -140,10 +140,10 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFeatureAvI18n A model object, or null if the key is not found + * @return ChildFeatureAvI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFeatureAvI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * * @see filterByFeatureAv() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureAv object * - * @param \Thelia\Model\FeatureAv|ObjectCollection $featureAv The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureAv|ObjectCollection $featureAv The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureAv relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class FeatureAvI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureAvQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureAvQuery A secondary query class using the current class as primary query */ public function useFeatureAvQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFeatureAvI18n $featureAvI18n Object to remove from the list of results + * @param ChildFeatureAvI18n $featureAvI18n Object to remove from the list of results * * @return ChildFeatureAvI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Deletes all rows from the feature_av_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class FeatureAvI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFeatureAvI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFeatureAvI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFeatureAvI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class FeatureAvI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FeatureAvI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/FeatureAvQuery.php b/core/lib/Thelia/Model/Base/FeatureAvQuery.php index 7de437661..3d8d81a4b 100644 --- a/core/lib/Thelia/Model/Base/FeatureAvQuery.php +++ b/core/lib/Thelia/Model/Base/FeatureAvQuery.php @@ -72,9 +72,9 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FeatureAvQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FeatureAv', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Returns a new ChildFeatureAvQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFeatureAvQuery */ @@ -114,7 +114,7 @@ abstract class FeatureAvQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildFeatureAv|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class FeatureAvQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFeatureAv A model object, or null if the key is not found + * @return ChildFeatureAv A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFeatureAv|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class FeatureAvQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFeatureAvQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(FeatureAvTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFeatureAvQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(FeatureAvTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class FeatureAvQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class FeatureAvQuery extends ModelCriteria * * @see filterByFeature() * - * @param mixed $featureId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $featureId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -333,11 +335,11 @@ abstract class FeatureAvQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -374,13 +376,13 @@ abstract class FeatureAvQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -417,13 +419,13 @@ abstract class FeatureAvQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -453,8 +455,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Feature object * - * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -478,8 +480,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Feature relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -512,11 +514,11 @@ abstract class FeatureAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query */ public function useFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -528,8 +530,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureProduct object * - * @param \Thelia\Model\FeatureProduct|ObjectCollection $featureProduct the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureProduct|ObjectCollection $featureProduct the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -551,8 +553,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureProduct relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -585,11 +587,11 @@ abstract class FeatureAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureProductQuery A secondary query class using the current class as primary query */ public function useFeatureProductQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -601,8 +603,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureAvI18n object * - * @param \Thelia\Model\FeatureAvI18n|ObjectCollection $featureAvI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureAvI18n|ObjectCollection $featureAvI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -624,8 +626,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureAvI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -658,11 +660,11 @@ abstract class FeatureAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureAvI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureAvI18nQuery A secondary query class using the current class as primary query */ public function useFeatureAvI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -674,7 +676,7 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFeatureAv $featureAv Object to remove from the list of results + * @param ChildFeatureAv $featureAv Object to remove from the list of results * * @return ChildFeatureAvQuery The current query, for fluid interface */ @@ -690,8 +692,8 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Deletes all rows from the feature_av table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -722,13 +724,13 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFeatureAv or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFeatureAv object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFeatureAv object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -748,6 +750,7 @@ abstract class FeatureAvQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FeatureAvTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -766,9 +769,9 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -778,9 +781,9 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -790,7 +793,7 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -800,7 +803,7 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -810,7 +813,7 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -820,7 +823,7 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -832,11 +835,11 @@ abstract class FeatureAvQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -851,10 +854,10 @@ abstract class FeatureAvQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFeatureAvQuery The current query, for fluid interface + * @return ChildFeatureAvQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -871,11 +874,11 @@ abstract class FeatureAvQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFeatureAvI18nQuery A secondary query class using the current class as primary query + * @return ChildFeatureAvI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/FeatureI18n.php b/core/lib/Thelia/Model/Base/FeatureI18n.php index d8766b261..1a9bbc244 100644 --- a/core/lib/Thelia/Model/Base/FeatureI18n.php +++ b/core/lib/Thelia/Model/Base/FeatureI18n.php @@ -26,6 +26,7 @@ abstract class FeatureI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FeatureI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class FeatureI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FeatureI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class FeatureI18n implements ActiveRecordInterface $this->aFeature = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class FeatureI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class FeatureI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class FeatureI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class FeatureI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class FeatureI18n implements ActiveRecordInterface $this->modifiedColumns[FeatureI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class FeatureI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FeatureI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class FeatureI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FeatureI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class FeatureI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class FeatureI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class FeatureI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class FeatureI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class FeatureI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class FeatureI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class FeatureI18n implements ActiveRecordInterface if ($this->isColumnModified(FeatureI18nTableMap::DESCRIPTION)) $criteria->add(FeatureI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(FeatureI18nTableMap::CHAPO)) $criteria->add(FeatureI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(FeatureI18nTableMap::POSTSCRIPTUM)) $criteria->add(FeatureI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class FeatureI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class FeatureI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FeatureI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FeatureI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class FeatureI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FeatureI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FeatureI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class FeatureI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildFeature object. * - * @param ChildFeature $v - * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) + * @param ChildFeature $v + * @return \Thelia\Model\FeatureI18n The current object (for fluent API support) * @throws PropelException */ public function setFeature(ChildFeature $v = null) @@ -1231,14 +1247,16 @@ abstract class FeatureI18n implements ActiveRecordInterface $v->addFeatureI18n($this); } + return $this; } + /** * Get the associated ChildFeature object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFeature The associated ChildFeature object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFeature The associated ChildFeature object. * @throws PropelException */ public function getFeature(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class FeatureI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/FeatureI18nQuery.php b/core/lib/Thelia/Model/Base/FeatureI18nQuery.php index 05bdb9f77..33c171127 100644 --- a/core/lib/Thelia/Model/Base/FeatureI18nQuery.php +++ b/core/lib/Thelia/Model/Base/FeatureI18nQuery.php @@ -67,9 +67,9 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FeatureI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FeatureI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Returns a new ChildFeatureI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFeatureI18nQuery */ @@ -140,10 +140,10 @@ abstract class FeatureI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFeatureI18n A model object, or null if the key is not found + * @return ChildFeatureI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFeatureI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class FeatureI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class FeatureI18nQuery extends ModelCriteria * * @see filterByFeature() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class FeatureI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class FeatureI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class FeatureI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class FeatureI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class FeatureI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Feature object * - * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Feature relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class FeatureI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query */ public function useFeatureQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFeatureI18n $featureI18n Object to remove from the list of results + * @param ChildFeatureI18n $featureI18n Object to remove from the list of results * * @return ChildFeatureI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Deletes all rows from the feature_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class FeatureI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFeatureI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFeatureI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFeatureI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class FeatureI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FeatureI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/FeatureProduct.php b/core/lib/Thelia/Model/Base/FeatureProduct.php index 2f2fdc939..c7b08e763 100644 --- a/core/lib/Thelia/Model/Base/FeatureProduct.php +++ b/core/lib/Thelia/Model/Base/FeatureProduct.php @@ -33,6 +33,7 @@ abstract class FeatureProduct implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FeatureProductTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -339,9 +340,9 @@ abstract class FeatureProduct implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FeatureProduct The current object, for fluid interface */ @@ -391,60 +392,66 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [feature_id] column value. * - * @return int + * @return int */ public function getFeatureId() { + return $this->feature_id; } /** * Get the [feature_av_id] column value. * - * @return int + * @return int */ public function getFeatureAvId() { + return $this->feature_av_id; } /** * Get the [free_text_value] column value. * - * @return string + * @return string */ public function getFreeTextValue() { + return $this->free_text_value; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -452,8 +459,8 @@ abstract class FeatureProduct implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -472,8 +479,8 @@ abstract class FeatureProduct implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -491,8 +498,8 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setId($v) { @@ -505,14 +512,15 @@ abstract class FeatureProduct implements ActiveRecordInterface $this->modifiedColumns[FeatureProductTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setProductId($v) { @@ -529,14 +537,15 @@ abstract class FeatureProduct implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setProductId() /** * Set the value of [feature_id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setFeatureId($v) { @@ -553,14 +562,15 @@ abstract class FeatureProduct implements ActiveRecordInterface $this->aFeature = null; } + return $this; } // setFeatureId() /** * Set the value of [feature_av_id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setFeatureAvId($v) { @@ -577,14 +587,15 @@ abstract class FeatureProduct implements ActiveRecordInterface $this->aFeatureAv = null; } + return $this; } // setFeatureAvId() /** * Set the value of [free_text_value] column. * - * @param string $v new value - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setFreeTextValue($v) { @@ -597,14 +608,15 @@ abstract class FeatureProduct implements ActiveRecordInterface $this->modifiedColumns[FeatureProductTableMap::FREE_TEXT_VALUE] = true; } + return $this; } // setFreeTextValue() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setPosition($v) { @@ -617,15 +629,16 @@ abstract class FeatureProduct implements ActiveRecordInterface $this->modifiedColumns[FeatureProductTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -637,15 +650,16 @@ abstract class FeatureProduct implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -657,6 +671,7 @@ abstract class FeatureProduct implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -772,10 +787,10 @@ abstract class FeatureProduct implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -813,7 +828,7 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FeatureProduct::setDeleted() @@ -856,8 +871,8 @@ abstract class FeatureProduct implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -918,8 +933,8 @@ abstract class FeatureProduct implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -976,7 +991,7 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1072,7 +1087,7 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1088,12 +1103,12 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1107,7 +1122,7 @@ abstract class FeatureProduct implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1149,12 +1164,12 @@ abstract class FeatureProduct implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1198,12 +1213,12 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1217,8 +1232,8 @@ abstract class FeatureProduct implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1264,8 +1279,8 @@ abstract class FeatureProduct implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1299,6 +1314,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->isColumnModified(FeatureProductTableMap::POSITION)) $criteria->add(FeatureProductTableMap::POSITION, $this->position); if ($this->isColumnModified(FeatureProductTableMap::CREATED_AT)) $criteria->add(FeatureProductTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(FeatureProductTableMap::UPDATED_AT)) $criteria->add(FeatureProductTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1320,7 +1336,7 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1330,7 +1346,7 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1344,6 +1360,7 @@ abstract class FeatureProduct implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1353,9 +1370,9 @@ abstract class FeatureProduct implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FeatureProduct (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FeatureProduct (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1381,8 +1398,8 @@ abstract class FeatureProduct implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FeatureProduct Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FeatureProduct Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1398,8 +1415,8 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1418,6 +1435,7 @@ abstract class FeatureProduct implements ActiveRecordInterface $v->addFeatureProduct($this); } + return $this; } @@ -1425,8 +1443,8 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1448,8 +1466,8 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Declares an association between this object and a ChildFeature object. * - * @param ChildFeature $v - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param ChildFeature $v + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) * @throws PropelException */ public function setFeature(ChildFeature $v = null) @@ -1468,6 +1486,7 @@ abstract class FeatureProduct implements ActiveRecordInterface $v->addFeatureProduct($this); } + return $this; } @@ -1475,8 +1494,8 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Get the associated ChildFeature object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFeature The associated ChildFeature object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFeature The associated ChildFeature object. * @throws PropelException */ public function getFeature(ConnectionInterface $con = null) @@ -1498,8 +1517,8 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Declares an association between this object and a ChildFeatureAv object. * - * @param ChildFeatureAv $v - * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) + * @param ChildFeatureAv $v + * @return \Thelia\Model\FeatureProduct The current object (for fluent API support) * @throws PropelException */ public function setFeatureAv(ChildFeatureAv $v = null) @@ -1518,6 +1537,7 @@ abstract class FeatureProduct implements ActiveRecordInterface $v->addFeatureProduct($this); } + return $this; } @@ -1525,8 +1545,8 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Get the associated ChildFeatureAv object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFeatureAv The associated ChildFeatureAv object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFeatureAv The associated ChildFeatureAv object. * @throws PropelException */ public function getFeatureAv(ConnectionInterface $con = null) @@ -1572,7 +1592,7 @@ abstract class FeatureProduct implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1599,7 +1619,7 @@ abstract class FeatureProduct implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildFeatureProduct The current object (for fluent API support) + * @return ChildFeatureProduct The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/FeatureProductQuery.php b/core/lib/Thelia/Model/Base/FeatureProductQuery.php index d3ab67800..b1d46a12f 100644 --- a/core/lib/Thelia/Model/Base/FeatureProductQuery.php +++ b/core/lib/Thelia/Model/Base/FeatureProductQuery.php @@ -83,9 +83,9 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FeatureProductQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FeatureProduct', $modelAlias = null) { @@ -95,8 +95,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Returns a new ChildFeatureProductQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFeatureProductQuery */ @@ -125,7 +125,7 @@ abstract class FeatureProductQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildFeatureProduct|array|mixed the result, formatted by the current formatter @@ -156,10 +156,10 @@ abstract class FeatureProductQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFeatureProduct A model object, or null if the key is not found + * @return ChildFeatureProduct A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -186,8 +186,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFeatureProduct|array|mixed the result, formatted by the current formatter */ @@ -207,8 +207,8 @@ abstract class FeatureProductQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -229,24 +229,26 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFeatureProductQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(FeatureProductTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFeatureProductQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(FeatureProductTableMap::ID, $keys, Criteria::IN); } @@ -260,11 +262,11 @@ abstract class FeatureProductQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -303,11 +305,11 @@ abstract class FeatureProductQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -346,11 +348,11 @@ abstract class FeatureProductQuery extends ModelCriteria * * @see filterByFeature() * - * @param mixed $featureId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $featureId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -389,11 +391,11 @@ abstract class FeatureProductQuery extends ModelCriteria * * @see filterByFeatureAv() * - * @param mixed $featureAvId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $featureAvId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -429,9 +431,9 @@ abstract class FeatureProductQuery extends ModelCriteria * $query->filterByFreeTextValue('%fooValue%'); // WHERE free_text_value LIKE '%fooValue%' * * - * @param string $freeTextValue The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $freeTextValue The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -459,11 +461,11 @@ abstract class FeatureProductQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -500,13 +502,13 @@ abstract class FeatureProductQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -543,13 +545,13 @@ abstract class FeatureProductQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -579,8 +581,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -604,8 +606,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -638,11 +640,11 @@ abstract class FeatureProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -654,8 +656,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Feature object * - * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -679,8 +681,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Feature relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -713,11 +715,11 @@ abstract class FeatureProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query */ public function useFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -729,8 +731,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureAv object * - * @param \Thelia\Model\FeatureAv|ObjectCollection $featureAv The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureAv|ObjectCollection $featureAv The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -754,8 +756,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureAv relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -788,11 +790,11 @@ abstract class FeatureProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureAvQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureAvQuery A secondary query class using the current class as primary query */ public function useFeatureAvQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -804,7 +806,7 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFeatureProduct $featureProduct Object to remove from the list of results + * @param ChildFeatureProduct $featureProduct Object to remove from the list of results * * @return ChildFeatureProductQuery The current query, for fluid interface */ @@ -820,8 +822,8 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Deletes all rows from the feature_product table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -852,13 +854,13 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFeatureProduct or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFeatureProduct object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFeatureProduct object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -878,6 +880,7 @@ abstract class FeatureProductQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FeatureProductTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -896,9 +899,9 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildFeatureProductQuery The current query, for fluid interface + * @return ChildFeatureProductQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -908,9 +911,9 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildFeatureProductQuery The current query, for fluid interface + * @return ChildFeatureProductQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -920,7 +923,7 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildFeatureProductQuery The current query, for fluid interface + * @return ChildFeatureProductQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -930,7 +933,7 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildFeatureProductQuery The current query, for fluid interface + * @return ChildFeatureProductQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -940,7 +943,7 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildFeatureProductQuery The current query, for fluid interface + * @return ChildFeatureProductQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -950,7 +953,7 @@ abstract class FeatureProductQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildFeatureProductQuery The current query, for fluid interface + * @return ChildFeatureProductQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/FeatureQuery.php b/core/lib/Thelia/Model/Base/FeatureQuery.php index f11c189f6..d6e20ea15 100644 --- a/core/lib/Thelia/Model/Base/FeatureQuery.php +++ b/core/lib/Thelia/Model/Base/FeatureQuery.php @@ -76,9 +76,9 @@ abstract class FeatureQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FeatureQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Feature', $modelAlias = null) { @@ -88,8 +88,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Returns a new ChildFeatureQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFeatureQuery */ @@ -118,7 +118,7 @@ abstract class FeatureQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildFeature|array|mixed the result, formatted by the current formatter @@ -149,10 +149,10 @@ abstract class FeatureQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFeature A model object, or null if the key is not found + * @return ChildFeature A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -179,8 +179,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFeature|array|mixed the result, formatted by the current formatter */ @@ -200,8 +200,8 @@ abstract class FeatureQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -222,24 +222,26 @@ abstract class FeatureQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFeatureQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(FeatureTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFeatureQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(FeatureTableMap::ID, $keys, Criteria::IN); } @@ -253,11 +255,11 @@ abstract class FeatureQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -294,11 +296,11 @@ abstract class FeatureQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -335,11 +337,11 @@ abstract class FeatureQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -376,13 +378,13 @@ abstract class FeatureQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -419,13 +421,13 @@ abstract class FeatureQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -456,7 +458,7 @@ abstract class FeatureQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\FeatureAv object * * @param \Thelia\Model\FeatureAv|ObjectCollection $featureAv the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -478,8 +480,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureAv relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -512,11 +514,11 @@ abstract class FeatureQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureAvQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureAvQuery A secondary query class using the current class as primary query */ public function useFeatureAvQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -528,8 +530,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureProduct object * - * @param \Thelia\Model\FeatureProduct|ObjectCollection $featureProduct the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureProduct|ObjectCollection $featureProduct the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -551,8 +553,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureProduct relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -585,11 +587,11 @@ abstract class FeatureQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureProductQuery A secondary query class using the current class as primary query */ public function useFeatureProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -601,8 +603,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureTemplate object * - * @param \Thelia\Model\FeatureTemplate|ObjectCollection $featureTemplate the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureTemplate|ObjectCollection $featureTemplate the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -624,8 +626,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureTemplate relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -658,11 +660,11 @@ abstract class FeatureQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureTemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureTemplateQuery A secondary query class using the current class as primary query */ public function useFeatureTemplateQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -674,8 +676,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureI18n object * - * @param \Thelia\Model\FeatureI18n|ObjectCollection $featureI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureI18n|ObjectCollection $featureI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -697,8 +699,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -731,11 +733,11 @@ abstract class FeatureQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureI18nQuery A secondary query class using the current class as primary query */ public function useFeatureI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -748,8 +750,8 @@ abstract class FeatureQuery extends ModelCriteria * Filter the query by a related Template object * using the feature_template table as cross reference * - * @param Template $template the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Template $template the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -764,7 +766,7 @@ abstract class FeatureQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFeature $feature Object to remove from the list of results + * @param ChildFeature $feature Object to remove from the list of results * * @return ChildFeatureQuery The current query, for fluid interface */ @@ -780,8 +782,8 @@ abstract class FeatureQuery extends ModelCriteria /** * Deletes all rows from the feature table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -812,13 +814,13 @@ abstract class FeatureQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFeature or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFeature object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFeature object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -838,6 +840,7 @@ abstract class FeatureQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FeatureTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -856,9 +859,9 @@ abstract class FeatureQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -868,9 +871,9 @@ abstract class FeatureQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -880,7 +883,7 @@ abstract class FeatureQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -890,7 +893,7 @@ abstract class FeatureQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -900,7 +903,7 @@ abstract class FeatureQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -910,7 +913,7 @@ abstract class FeatureQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -922,11 +925,11 @@ abstract class FeatureQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -941,10 +944,10 @@ abstract class FeatureQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFeatureQuery The current query, for fluid interface + * @return ChildFeatureQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -961,11 +964,11 @@ abstract class FeatureQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFeatureI18nQuery A secondary query class using the current class as primary query + * @return ChildFeatureI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/FeatureTemplate.php b/core/lib/Thelia/Model/Base/FeatureTemplate.php index 340629131..b837cb3b3 100644 --- a/core/lib/Thelia/Model/Base/FeatureTemplate.php +++ b/core/lib/Thelia/Model/Base/FeatureTemplate.php @@ -31,6 +31,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FeatureTemplateTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -320,9 +321,9 @@ abstract class FeatureTemplate implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FeatureTemplate The current object, for fluid interface */ @@ -372,40 +373,44 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [feature_id] column value. * - * @return int + * @return int */ public function getFeatureId() { + return $this->feature_id; } /** * Get the [template_id] column value. * - * @return int + * @return int */ public function getTemplateId() { + return $this->template_id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -413,8 +418,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -433,8 +438,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -452,8 +457,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) */ public function setId($v) { @@ -466,14 +471,15 @@ abstract class FeatureTemplate implements ActiveRecordInterface $this->modifiedColumns[FeatureTemplateTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [feature_id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) */ public function setFeatureId($v) { @@ -490,14 +496,15 @@ abstract class FeatureTemplate implements ActiveRecordInterface $this->aFeature = null; } + return $this; } // setFeatureId() /** * Set the value of [template_id] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) */ public function setTemplateId($v) { @@ -514,14 +521,15 @@ abstract class FeatureTemplate implements ActiveRecordInterface $this->aTemplate = null; } + return $this; } // setTemplateId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) */ public function setPosition($v) { @@ -534,15 +542,16 @@ abstract class FeatureTemplate implements ActiveRecordInterface $this->modifiedColumns[FeatureTemplateTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -554,15 +563,16 @@ abstract class FeatureTemplate implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -574,6 +584,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -680,10 +691,10 @@ abstract class FeatureTemplate implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -720,7 +731,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FeatureTemplate::setDeleted() @@ -763,8 +774,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -825,8 +836,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -876,7 +887,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -960,7 +971,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -976,12 +987,12 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -995,7 +1006,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1031,12 +1042,12 @@ abstract class FeatureTemplate implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1075,12 +1086,12 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1094,8 +1105,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1135,8 +1146,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1166,6 +1177,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface if ($this->isColumnModified(FeatureTemplateTableMap::POSITION)) $criteria->add(FeatureTemplateTableMap::POSITION, $this->position); if ($this->isColumnModified(FeatureTemplateTableMap::CREATED_AT)) $criteria->add(FeatureTemplateTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(FeatureTemplateTableMap::UPDATED_AT)) $criteria->add(FeatureTemplateTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1187,7 +1199,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1197,7 +1209,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1211,6 +1223,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1220,9 +1233,9 @@ abstract class FeatureTemplate implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FeatureTemplate (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FeatureTemplate (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1246,8 +1259,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FeatureTemplate Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FeatureTemplate Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1263,8 +1276,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Declares an association between this object and a ChildFeature object. * - * @param ChildFeature $v - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param ChildFeature $v + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) * @throws PropelException */ public function setFeature(ChildFeature $v = null) @@ -1283,6 +1296,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface $v->addFeatureTemplate($this); } + return $this; } @@ -1290,8 +1304,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Get the associated ChildFeature object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFeature The associated ChildFeature object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFeature The associated ChildFeature object. * @throws PropelException */ public function getFeature(ConnectionInterface $con = null) @@ -1313,8 +1327,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Declares an association between this object and a ChildTemplate object. * - * @param ChildTemplate $v - * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) + * @param ChildTemplate $v + * @return \Thelia\Model\FeatureTemplate The current object (for fluent API support) * @throws PropelException */ public function setTemplate(ChildTemplate $v = null) @@ -1333,6 +1347,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface $v->addFeatureTemplate($this); } + return $this; } @@ -1340,8 +1355,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Get the associated ChildTemplate object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTemplate The associated ChildTemplate object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTemplate The associated ChildTemplate object. * @throws PropelException */ public function getTemplate(ConnectionInterface $con = null) @@ -1385,7 +1400,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1411,7 +1426,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildFeatureTemplate The current object (for fluent API support) + * @return ChildFeatureTemplate The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/FeatureTemplateQuery.php b/core/lib/Thelia/Model/Base/FeatureTemplateQuery.php index 077515ee6..8b4f0893e 100644 --- a/core/lib/Thelia/Model/Base/FeatureTemplateQuery.php +++ b/core/lib/Thelia/Model/Base/FeatureTemplateQuery.php @@ -71,9 +71,9 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FeatureTemplateQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FeatureTemplate', $modelAlias = null) { @@ -83,8 +83,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Returns a new ChildFeatureTemplateQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFeatureTemplateQuery */ @@ -113,7 +113,7 @@ abstract class FeatureTemplateQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildFeatureTemplate|array|mixed the result, formatted by the current formatter @@ -144,10 +144,10 @@ abstract class FeatureTemplateQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFeatureTemplate A model object, or null if the key is not found + * @return ChildFeatureTemplate A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -174,8 +174,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFeatureTemplate|array|mixed the result, formatted by the current formatter */ @@ -195,8 +195,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -217,24 +217,26 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(FeatureTemplateTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(FeatureTemplateTableMap::ID, $keys, Criteria::IN); } @@ -248,11 +250,11 @@ abstract class FeatureTemplateQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -291,11 +293,11 @@ abstract class FeatureTemplateQuery extends ModelCriteria * * @see filterByFeature() * - * @param mixed $featureId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $featureId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -334,11 +336,11 @@ abstract class FeatureTemplateQuery extends ModelCriteria * * @see filterByTemplate() * - * @param mixed $templateId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $templateId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -375,11 +377,11 @@ abstract class FeatureTemplateQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -416,13 +418,13 @@ abstract class FeatureTemplateQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -459,13 +461,13 @@ abstract class FeatureTemplateQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -495,8 +497,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Feature object * - * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Feature|ObjectCollection $feature The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -520,8 +522,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Feature relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -554,11 +556,11 @@ abstract class FeatureTemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureQuery A secondary query class using the current class as primary query */ public function useFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -570,8 +572,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Template object * - * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -595,8 +597,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Template relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -629,11 +631,11 @@ abstract class FeatureTemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query */ public function useTemplateQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -645,7 +647,7 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFeatureTemplate $featureTemplate Object to remove from the list of results + * @param ChildFeatureTemplate $featureTemplate Object to remove from the list of results * * @return ChildFeatureTemplateQuery The current query, for fluid interface */ @@ -661,8 +663,8 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Deletes all rows from the feature_template table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -693,13 +695,13 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFeatureTemplate or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFeatureTemplate object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFeatureTemplate object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -719,6 +721,7 @@ abstract class FeatureTemplateQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FeatureTemplateTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -737,9 +740,9 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildFeatureTemplateQuery The current query, for fluid interface + * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -749,9 +752,9 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildFeatureTemplateQuery The current query, for fluid interface + * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -761,7 +764,7 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildFeatureTemplateQuery The current query, for fluid interface + * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -771,7 +774,7 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildFeatureTemplateQuery The current query, for fluid interface + * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -781,7 +784,7 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildFeatureTemplateQuery The current query, for fluid interface + * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -791,7 +794,7 @@ abstract class FeatureTemplateQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildFeatureTemplateQuery The current query, for fluid interface + * @return ChildFeatureTemplateQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Folder.php b/core/lib/Thelia/Model/Base/Folder.php index 97ced8ee5..c0529ebb6 100644 --- a/core/lib/Thelia/Model/Base/Folder.php +++ b/core/lib/Thelia/Model/Base/Folder.php @@ -41,6 +41,7 @@ abstract class Folder implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FolderTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -181,6 +182,7 @@ abstract class Folder implements ActiveRecordInterface // versionable behavior + /** * @var bool */ @@ -444,9 +446,9 @@ abstract class Folder implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Folder The current object, for fluid interface */ @@ -496,40 +498,44 @@ abstract class Folder implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [parent] column value. * - * @return int + * @return int */ public function getParent() { + return $this->parent; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -537,8 +543,8 @@ abstract class Folder implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -557,8 +563,8 @@ abstract class Folder implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -576,10 +582,11 @@ abstract class Folder implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -587,8 +594,8 @@ abstract class Folder implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -606,18 +613,19 @@ abstract class Folder implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setId($v) { @@ -630,14 +638,15 @@ abstract class Folder implements ActiveRecordInterface $this->modifiedColumns[FolderTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [parent] column. * - * @param int $v new value - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setParent($v) { @@ -650,14 +659,15 @@ abstract class Folder implements ActiveRecordInterface $this->modifiedColumns[FolderTableMap::PARENT] = true; } + return $this; } // setParent() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setVisible($v) { @@ -670,14 +680,15 @@ abstract class Folder implements ActiveRecordInterface $this->modifiedColumns[FolderTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setPosition($v) { @@ -690,15 +701,16 @@ abstract class Folder implements ActiveRecordInterface $this->modifiedColumns[FolderTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -710,15 +722,16 @@ abstract class Folder implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -730,14 +743,15 @@ abstract class Folder implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setVersion($v) { @@ -750,15 +764,16 @@ abstract class Folder implements ActiveRecordInterface $this->modifiedColumns[FolderTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -770,14 +785,15 @@ abstract class Folder implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -790,6 +806,7 @@ abstract class Folder implements ActiveRecordInterface $this->modifiedColumns[FolderTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -833,6 +850,7 @@ abstract class Folder implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FolderTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -905,10 +923,10 @@ abstract class Folder implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -954,7 +972,7 @@ abstract class Folder implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Folder::setDeleted() @@ -997,8 +1015,8 @@ abstract class Folder implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1071,8 +1089,8 @@ abstract class Folder implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1215,7 +1233,7 @@ abstract class Folder implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1317,7 +1335,7 @@ abstract class Folder implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1333,12 +1351,12 @@ abstract class Folder implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1352,7 +1370,7 @@ abstract class Folder implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1397,12 +1415,12 @@ abstract class Folder implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1453,12 +1471,12 @@ abstract class Folder implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1472,8 +1490,8 @@ abstract class Folder implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1522,8 +1540,8 @@ abstract class Folder implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1559,6 +1577,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->isColumnModified(FolderTableMap::VERSION)) $criteria->add(FolderTableMap::VERSION, $this->version); if ($this->isColumnModified(FolderTableMap::VERSION_CREATED_AT)) $criteria->add(FolderTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(FolderTableMap::VERSION_CREATED_BY)) $criteria->add(FolderTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1580,7 +1599,7 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1590,7 +1609,7 @@ abstract class Folder implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1604,6 +1623,7 @@ abstract class Folder implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1613,9 +1633,9 @@ abstract class Folder implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Folder (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Folder (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1680,8 +1700,8 @@ abstract class Folder implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Folder Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Folder Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1700,7 +1720,7 @@ abstract class Folder implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1751,8 +1771,8 @@ abstract class Folder implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1774,8 +1794,8 @@ abstract class Folder implements ActiveRecordInterface * If this ChildFolder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildContentFolder[] List of ChildContentFolder objects * @throws PropelException */ @@ -1831,14 +1851,15 @@ abstract class Folder implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contentFolders A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolder The current object (for fluent API support) + * @param Collection $contentFolders A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolder The current object (for fluent API support) */ public function setContentFolders(Collection $contentFolders, ConnectionInterface $con = null) { $contentFoldersToDelete = $this->getContentFolders(new Criteria(), $con)->diff($contentFolders); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1862,10 +1883,10 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the number of related ContentFolder objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ContentFolder objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ContentFolder objects. * @throws PropelException */ public function countContentFolders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1897,8 +1918,8 @@ abstract class Folder implements ActiveRecordInterface * Method called to associate a ChildContentFolder object to this object * through the ChildContentFolder foreign key attribute. * - * @param ChildContentFolder $l ChildContentFolder - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param ChildContentFolder $l ChildContentFolder + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function addContentFolder(ChildContentFolder $l) { @@ -1925,7 +1946,7 @@ abstract class Folder implements ActiveRecordInterface /** * @param ContentFolder $contentFolder The contentFolder object to remove. - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function removeContentFolder($contentFolder) { @@ -1942,6 +1963,7 @@ abstract class Folder implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1953,9 +1975,9 @@ abstract class Folder implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Folder. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildContentFolder[] List of ChildContentFolder objects */ public function getContentFoldersJoinContent($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1995,8 +2017,8 @@ abstract class Folder implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2018,8 +2040,8 @@ abstract class Folder implements ActiveRecordInterface * If this ChildFolder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFolderImage[] List of ChildFolderImage objects * @throws PropelException */ @@ -2075,14 +2097,15 @@ abstract class Folder implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $folderImages A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolder The current object (for fluent API support) + * @param Collection $folderImages A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolder The current object (for fluent API support) */ public function setFolderImages(Collection $folderImages, ConnectionInterface $con = null) { $folderImagesToDelete = $this->getFolderImages(new Criteria(), $con)->diff($folderImages); + $this->folderImagesScheduledForDeletion = $folderImagesToDelete; foreach ($folderImagesToDelete as $folderImageRemoved) { @@ -2103,10 +2126,10 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the number of related FolderImage objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FolderImage objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FolderImage objects. * @throws PropelException */ public function countFolderImages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2138,8 +2161,8 @@ abstract class Folder implements ActiveRecordInterface * Method called to associate a ChildFolderImage object to this object * through the ChildFolderImage foreign key attribute. * - * @param ChildFolderImage $l ChildFolderImage - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param ChildFolderImage $l ChildFolderImage + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function addFolderImage(ChildFolderImage $l) { @@ -2212,8 +2235,8 @@ abstract class Folder implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2235,8 +2258,8 @@ abstract class Folder implements ActiveRecordInterface * If this ChildFolder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFolderDocument[] List of ChildFolderDocument objects * @throws PropelException */ @@ -2292,14 +2315,15 @@ abstract class Folder implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $folderDocuments A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolder The current object (for fluent API support) + * @param Collection $folderDocuments A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolder The current object (for fluent API support) */ public function setFolderDocuments(Collection $folderDocuments, ConnectionInterface $con = null) { $folderDocumentsToDelete = $this->getFolderDocuments(new Criteria(), $con)->diff($folderDocuments); + $this->folderDocumentsScheduledForDeletion = $folderDocumentsToDelete; foreach ($folderDocumentsToDelete as $folderDocumentRemoved) { @@ -2320,10 +2344,10 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the number of related FolderDocument objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FolderDocument objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FolderDocument objects. * @throws PropelException */ public function countFolderDocuments(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2355,8 +2379,8 @@ abstract class Folder implements ActiveRecordInterface * Method called to associate a ChildFolderDocument object to this object * through the ChildFolderDocument foreign key attribute. * - * @param ChildFolderDocument $l ChildFolderDocument - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param ChildFolderDocument $l ChildFolderDocument + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function addFolderDocument(ChildFolderDocument $l) { @@ -2383,7 +2407,7 @@ abstract class Folder implements ActiveRecordInterface /** * @param FolderDocument $folderDocument The folderDocument object to remove. - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function removeFolderDocument($folderDocument) { @@ -2429,8 +2453,8 @@ abstract class Folder implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2452,8 +2476,8 @@ abstract class Folder implements ActiveRecordInterface * If this ChildFolder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFolderI18n[] List of ChildFolderI18n objects * @throws PropelException */ @@ -2509,14 +2533,15 @@ abstract class Folder implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $folderI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolder The current object (for fluent API support) + * @param Collection $folderI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolder The current object (for fluent API support) */ public function setFolderI18ns(Collection $folderI18ns, ConnectionInterface $con = null) { $folderI18nsToDelete = $this->getFolderI18ns(new Criteria(), $con)->diff($folderI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2540,10 +2565,10 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the number of related FolderI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FolderI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FolderI18n objects. * @throws PropelException */ public function countFolderI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2575,8 +2600,8 @@ abstract class Folder implements ActiveRecordInterface * Method called to associate a ChildFolderI18n object to this object * through the ChildFolderI18n foreign key attribute. * - * @param ChildFolderI18n $l ChildFolderI18n - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param ChildFolderI18n $l ChildFolderI18n + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function addFolderI18n(ChildFolderI18n $l) { @@ -2606,7 +2631,7 @@ abstract class Folder implements ActiveRecordInterface } /** - * @param FolderI18n $folderI18n The folderI18n object to remove. + * @param FolderI18n $folderI18n The folderI18n object to remove. * @return ChildFolder The current object (for fluent API support) */ public function removeFolderI18n($folderI18n) @@ -2653,8 +2678,8 @@ abstract class Folder implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2676,8 +2701,8 @@ abstract class Folder implements ActiveRecordInterface * If this ChildFolder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFolderVersion[] List of ChildFolderVersion objects * @throws PropelException */ @@ -2733,14 +2758,15 @@ abstract class Folder implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $folderVersions A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolder The current object (for fluent API support) + * @param Collection $folderVersions A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolder The current object (for fluent API support) */ public function setFolderVersions(Collection $folderVersions, ConnectionInterface $con = null) { $folderVersionsToDelete = $this->getFolderVersions(new Criteria(), $con)->diff($folderVersions); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2764,10 +2790,10 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the number of related FolderVersion objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FolderVersion objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FolderVersion objects. * @throws PropelException */ public function countFolderVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2799,8 +2825,8 @@ abstract class Folder implements ActiveRecordInterface * Method called to associate a ChildFolderVersion object to this object * through the ChildFolderVersion foreign key attribute. * - * @param ChildFolderVersion $l ChildFolderVersion - * @return \Thelia\Model\Folder The current object (for fluent API support) + * @param ChildFolderVersion $l ChildFolderVersion + * @return \Thelia\Model\Folder The current object (for fluent API support) */ public function addFolderVersion(ChildFolderVersion $l) { @@ -2827,7 +2853,7 @@ abstract class Folder implements ActiveRecordInterface /** * @param FolderVersion $folderVersion The folderVersion object to remove. - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function removeFolderVersion($folderVersion) { @@ -2884,8 +2910,8 @@ abstract class Folder implements ActiveRecordInterface * If this ChildFolder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildContent[] List of ChildContent objects */ @@ -2915,9 +2941,9 @@ abstract class Folder implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $contents A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolder The current object (for fluent API support) + * @param Collection $contents A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolder The current object (for fluent API support) */ public function setContents(Collection $contents, ConnectionInterface $con = null) { @@ -2941,9 +2967,9 @@ abstract class Folder implements ActiveRecordInterface * Gets the number of ChildContent objects related by a many-to-many relationship * to the current object by way of the content_folder cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildContent objects */ @@ -2972,7 +2998,7 @@ abstract class Folder implements ActiveRecordInterface * through the content_folder cross reference table. * * @param ChildContent $content The ChildContentFolder object to relate - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function addContent(ChildContent $content) { @@ -2989,7 +3015,7 @@ abstract class Folder implements ActiveRecordInterface } /** - * @param Content $content The content object to add. + * @param Content $content The content object to add. */ protected function doAddContent($content) { @@ -3008,8 +3034,8 @@ abstract class Folder implements ActiveRecordInterface * Remove a ChildContent object to this object * through the content_folder cross reference table. * - * @param ChildContent $content The ChildContentFolder object to relate - * @return ChildFolder The current object (for fluent API support) + * @param ChildContent $content The ChildContentFolder object to relate + * @return ChildFolder The current object (for fluent API support) */ public function removeContent(ChildContent $content) { @@ -3056,7 +3082,7 @@ abstract class Folder implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -3120,7 +3146,7 @@ abstract class Folder implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -3134,9 +3160,9 @@ abstract class Folder implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -3148,7 +3174,7 @@ abstract class Folder implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -3158,8 +3184,8 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildFolderI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -3192,10 +3218,10 @@ abstract class Folder implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -3220,7 +3246,7 @@ abstract class Folder implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildFolderI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -3228,6 +3254,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -3238,6 +3265,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -3250,6 +3278,7 @@ abstract class Folder implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -3260,6 +3289,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -3272,6 +3302,7 @@ abstract class Folder implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -3282,6 +3313,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -3294,6 +3326,7 @@ abstract class Folder implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -3304,6 +3337,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -3316,6 +3350,7 @@ abstract class Folder implements ActiveRecordInterface return $this; } + /** * Get the [meta_title] column value. * @@ -3326,6 +3361,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaTitle(); } + /** * Set the value of [meta_title] column. * @@ -3338,6 +3374,7 @@ abstract class Folder implements ActiveRecordInterface return $this; } + /** * Get the [meta_description] column value. * @@ -3348,6 +3385,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaDescription(); } + /** * Set the value of [meta_description] column. * @@ -3360,6 +3398,7 @@ abstract class Folder implements ActiveRecordInterface return $this; } + /** * Get the [meta_keywords] column value. * @@ -3370,6 +3409,7 @@ abstract class Folder implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaKeywords(); } + /** * Set the value of [meta_keywords] column. * @@ -3399,7 +3439,7 @@ abstract class Folder implements ActiveRecordInterface /** * Checks whether the current state must be recorded as a version * - * @return boolean + * @return boolean */ public function isVersioningNecessary($con = null) { @@ -3421,9 +3461,9 @@ abstract class Folder implements ActiveRecordInterface /** * Creates a version of the current object and saves it. * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ChildFolderVersion A version object + * @return ChildFolderVersion A version object */ public function addVersion($con = null) { @@ -3448,10 +3488,10 @@ abstract class Folder implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con The connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con The connection to use * - * @return ChildFolder The current object (for fluent API support) + * @return ChildFolder The current object (for fluent API support) */ public function toVersion($versionNumber, $con = null) { @@ -3467,9 +3507,9 @@ abstract class Folder implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param ChildFolderVersion $version The version object to use - * @param ConnectionInterface $con the connection to use - * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. + * @param ChildFolderVersion $version The version object to use + * @param ConnectionInterface $con the connection to use + * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return ChildFolder The current object (for fluent API support) */ @@ -3492,9 +3532,9 @@ abstract class Folder implements ActiveRecordInterface /** * Gets the latest persisted version number for the current object * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return integer + * @return integer */ public function getLastVersionNumber($con = null) { @@ -3512,9 +3552,9 @@ abstract class Folder implements ActiveRecordInterface /** * Checks whether the current object is the latest one * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return Boolean + * @return Boolean */ public function isLastVersion($con = null) { @@ -3524,10 +3564,10 @@ abstract class Folder implements ActiveRecordInterface /** * Retrieves a version object for this entity and a version number * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con the connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con the connection to use * - * @return ChildFolderVersion A version object + * @return ChildFolderVersion A version object */ public function getOneVersion($versionNumber, $con = null) { @@ -3540,9 +3580,9 @@ abstract class Folder implements ActiveRecordInterface /** * Gets all the versions of this object, in incremental order * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ObjectCollection A list of ChildFolderVersion objects + * @return ObjectCollection A list of ChildFolderVersion objects */ public function getAllVersions($con = null) { @@ -3562,12 +3602,12 @@ abstract class Folder implements ActiveRecordInterface * ); * * - * @param integer $versionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $versionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersion($versionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -3587,13 +3627,13 @@ abstract class Folder implements ActiveRecordInterface * ); * * - * @param integer $fromVersionNumber - * @param integer $toVersionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $fromVersionNumber + * @param integer $toVersionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersions($fromVersionNumber, $toVersionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -3613,12 +3653,12 @@ abstract class Folder implements ActiveRecordInterface * ); * * - * @param array $fromVersion An array representing the original version. - * @param array $toVersion An array representing the destination version. - * @param string $keys Main key used for the result diff (versions|columns). - * @param array $ignoredColumns The columns to exclude from the diff. + * @param array $fromVersion An array representing the original version. + * @param array $toVersion An array representing the destination version. + * @param string $keys Main key used for the result diff (versions|columns). + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ protected function computeDiff($fromVersion, $toVersion, $keys = 'columns', $ignoredColumns = array()) { @@ -3655,7 +3695,7 @@ abstract class Folder implements ActiveRecordInterface /** * retrieve the last $number versions. * - * @param Integer $number the number of record to return. + * @param Integer $number the number of record to return. * @return PropelCollection|array \Thelia\Model\FolderVersion[] List of \Thelia\Model\FolderVersion objects */ public function getLastVersions($number = 10, $criteria = null, $con = null) @@ -3742,6 +3782,7 @@ abstract class Folder implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/FolderDocument.php b/core/lib/Thelia/Model/Base/FolderDocument.php index 5b1b9029b..3abd5e1c6 100644 --- a/core/lib/Thelia/Model/Base/FolderDocument.php +++ b/core/lib/Thelia/Model/Base/FolderDocument.php @@ -32,6 +32,7 @@ abstract class FolderDocument implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FolderDocumentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class FolderDocument implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FolderDocument The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [folder_id] column value. * - * @return int + * @return int */ public function getFolderId() { + return $this->folder_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class FolderDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class FolderDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class FolderDocument implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [folder_id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) */ public function setFolderId($v) { @@ -512,14 +518,15 @@ abstract class FolderDocument implements ActiveRecordInterface $this->aFolder = null; } + return $this; } // setFolderId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class FolderDocument implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class FolderDocument implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class FolderDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class FolderDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class FolderDocument implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FolderDocument::setDeleted() @@ -779,8 +790,8 @@ abstract class FolderDocument implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class FolderDocument implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class FolderDocument implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class FolderDocument implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class FolderDocument implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class FolderDocument implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class FolderDocument implements ActiveRecordInterface if ($this->isColumnModified(FolderDocumentTableMap::POSITION)) $criteria->add(FolderDocumentTableMap::POSITION, $this->position); if ($this->isColumnModified(FolderDocumentTableMap::CREATED_AT)) $criteria->add(FolderDocumentTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(FolderDocumentTableMap::UPDATED_AT)) $criteria->add(FolderDocumentTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class FolderDocument implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class FolderDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FolderDocument (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FolderDocument (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class FolderDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FolderDocument Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FolderDocument Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Declares an association between this object and a ChildFolder object. * - * @param ChildFolder $v - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param ChildFolder $v + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) * @throws PropelException */ public function setFolder(ChildFolder $v = null) @@ -1323,14 +1336,16 @@ abstract class FolderDocument implements ActiveRecordInterface $v->addFolderDocument($this); } + return $this; } + /** * Get the associated ChildFolder object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFolder The associated ChildFolder object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFolder The associated ChildFolder object. * @throws PropelException */ public function getFolder(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class FolderDocument implements ActiveRecordInterface return $this->aFolder; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class FolderDocument implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class FolderDocument implements ActiveRecordInterface * If this ChildFolderDocument is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFolderDocumentI18n[] List of ChildFolderDocumentI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class FolderDocument implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $folderDocumentI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolderDocument The current object (for fluent API support) + * @param Collection $folderDocumentI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolderDocument The current object (for fluent API support) */ public function setFolderDocumentI18ns(Collection $folderDocumentI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Returns the number of related FolderDocumentI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FolderDocumentI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FolderDocumentI18n objects. * @throws PropelException */ public function countFolderDocumentI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class FolderDocument implements ActiveRecordInterface * Method called to associate a ChildFolderDocumentI18n object to this object * through the ChildFolderDocumentI18n foreign key attribute. * - * @param ChildFolderDocumentI18n $l ChildFolderDocumentI18n - * @return \Thelia\Model\FolderDocument The current object (for fluent API support) + * @param ChildFolderDocumentI18n $l ChildFolderDocumentI18n + * @return \Thelia\Model\FolderDocument The current object (for fluent API support) */ public function addFolderDocumentI18n(ChildFolderDocumentI18n $l) { @@ -1571,7 +1587,7 @@ abstract class FolderDocument implements ActiveRecordInterface } /** - * @param FolderDocumentI18n $folderDocumentI18n The folderDocumentI18n object to remove. + * @param FolderDocumentI18n $folderDocumentI18n The folderDocumentI18n object to remove. * @return ChildFolderDocument The current object (for fluent API support) */ public function removeFolderDocumentI18n($folderDocumentI18n) @@ -1614,7 +1630,7 @@ abstract class FolderDocument implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildFolderDocument The current object (for fluent API support) + * @return ChildFolderDocument The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildFolderDocument The current object (for fluent API support) + * @return ChildFolderDocument The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildFolderDocumentI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildFolderDocument The current object (for fluent API support) + * @return ChildFolderDocument The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class FolderDocument implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildFolderDocumentI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/FolderDocumentI18n.php b/core/lib/Thelia/Model/Base/FolderDocumentI18n.php index b18ce4163..57373f362 100644 --- a/core/lib/Thelia/Model/Base/FolderDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/FolderDocumentI18n.php @@ -26,6 +26,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FolderDocumentI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FolderDocumentI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface $this->aFolderDocument = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[FolderDocumentI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FolderDocumentI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FolderDocumentI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface if ($this->isColumnModified(FolderDocumentI18nTableMap::DESCRIPTION)) $criteria->add(FolderDocumentI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(FolderDocumentI18nTableMap::CHAPO)) $criteria->add(FolderDocumentI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(FolderDocumentI18nTableMap::POSTSCRIPTUM)) $criteria->add(FolderDocumentI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FolderDocumentI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FolderDocumentI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FolderDocumentI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FolderDocumentI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildFolderDocument object. * - * @param ChildFolderDocument $v - * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) + * @param ChildFolderDocument $v + * @return \Thelia\Model\FolderDocumentI18n The current object (for fluent API support) * @throws PropelException */ public function setFolderDocument(ChildFolderDocument $v = null) @@ -1231,14 +1247,16 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface $v->addFolderDocumentI18n($this); } + return $this; } + /** * Get the associated ChildFolderDocument object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFolderDocument The associated ChildFolderDocument object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFolderDocument The associated ChildFolderDocument object. * @throws PropelException */ public function getFolderDocument(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/FolderDocumentI18nQuery.php b/core/lib/Thelia/Model/Base/FolderDocumentI18nQuery.php index 5be9dcb5b..f053ac652 100644 --- a/core/lib/Thelia/Model/Base/FolderDocumentI18nQuery.php +++ b/core/lib/Thelia/Model/Base/FolderDocumentI18nQuery.php @@ -67,9 +67,9 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FolderDocumentI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FolderDocumentI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Returns a new ChildFolderDocumentI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFolderDocumentI18nQuery */ @@ -140,10 +140,10 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFolderDocumentI18n A model object, or null if the key is not found + * @return ChildFolderDocumentI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFolderDocumentI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * * @see filterByFolderDocument() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\FolderDocument object * * @param \Thelia\Model\FolderDocument|ObjectCollection $folderDocument The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderDocumentQuery A secondary query class using the current class as primary query */ public function useFolderDocumentQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFolderDocumentI18n $folderDocumentI18n Object to remove from the list of results + * @param ChildFolderDocumentI18n $folderDocumentI18n Object to remove from the list of results * * @return ChildFolderDocumentI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Deletes all rows from the folder_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFolderDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFolderDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFolderDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class FolderDocumentI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FolderDocumentI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/FolderDocumentQuery.php b/core/lib/Thelia/Model/Base/FolderDocumentQuery.php index 404330192..c438576a6 100644 --- a/core/lib/Thelia/Model/Base/FolderDocumentQuery.php +++ b/core/lib/Thelia/Model/Base/FolderDocumentQuery.php @@ -72,9 +72,9 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FolderDocumentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FolderDocument', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Returns a new ChildFolderDocumentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFolderDocumentQuery */ @@ -114,7 +114,7 @@ abstract class FolderDocumentQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildFolderDocument|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class FolderDocumentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFolderDocument A model object, or null if the key is not found + * @return ChildFolderDocument A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFolderDocument|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class FolderDocumentQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(FolderDocumentTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(FolderDocumentTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class FolderDocumentQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class FolderDocumentQuery extends ModelCriteria * * @see filterByFolder() * - * @param mixed $folderId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $folderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class FolderDocumentQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class FolderDocumentQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class FolderDocumentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class FolderDocumentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Folder object * - * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Folder relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class FolderDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query */ public function useFolderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FolderDocumentI18n object * - * @param \Thelia\Model\FolderDocumentI18n|ObjectCollection $folderDocumentI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FolderDocumentI18n|ObjectCollection $folderDocumentI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderDocumentI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class FolderDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderDocumentI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderDocumentI18nQuery A secondary query class using the current class as primary query */ public function useFolderDocumentI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFolderDocument $folderDocument Object to remove from the list of results + * @param ChildFolderDocument $folderDocument Object to remove from the list of results * * @return ChildFolderDocumentQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Deletes all rows from the folder_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFolderDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFolderDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFolderDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class FolderDocumentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FolderDocumentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class FolderDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class FolderDocumentQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderDocumentQuery The current query, for fluid interface + * @return ChildFolderDocumentQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class FolderDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderDocumentI18nQuery A secondary query class using the current class as primary query + * @return ChildFolderDocumentI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/FolderI18n.php b/core/lib/Thelia/Model/Base/FolderI18n.php index be1df2654..116d2b17c 100644 --- a/core/lib/Thelia/Model/Base/FolderI18n.php +++ b/core/lib/Thelia/Model/Base/FolderI18n.php @@ -26,6 +26,7 @@ abstract class FolderI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FolderI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class FolderI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FolderI18n The current object, for fluid interface */ @@ -394,98 +395,107 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Get the [meta_title] column value. * - * @return string + * @return string */ public function getMetaTitle() { + return $this->meta_title; } /** * Get the [meta_description] column value. * - * @return string + * @return string */ public function getMetaDescription() { + return $this->meta_description; } /** * Get the [meta_keywords] column value. * - * @return string + * @return string */ public function getMetaKeywords() { + return $this->meta_keywords; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setId($v) { @@ -502,14 +512,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->aFolder = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -522,14 +533,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -542,14 +554,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -562,14 +575,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -582,14 +596,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -602,14 +617,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() /** * Set the value of [meta_title] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setMetaTitle($v) { @@ -622,14 +638,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::META_TITLE] = true; } + return $this; } // setMetaTitle() /** * Set the value of [meta_description] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setMetaDescription($v) { @@ -642,14 +659,15 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::META_DESCRIPTION] = true; } + return $this; } // setMetaDescription() /** * Set the value of [meta_keywords] column. * - * @param string $v new value - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) */ public function setMetaKeywords($v) { @@ -662,6 +680,7 @@ abstract class FolderI18n implements ActiveRecordInterface $this->modifiedColumns[FolderI18nTableMap::META_KEYWORDS] = true; } + return $this; } // setMetaKeywords() @@ -705,6 +724,7 @@ abstract class FolderI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FolderI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -771,10 +791,10 @@ abstract class FolderI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -810,7 +830,7 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FolderI18n::setDeleted() @@ -853,8 +873,8 @@ abstract class FolderI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -904,8 +924,8 @@ abstract class FolderI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -948,7 +968,7 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1039,7 +1059,7 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1055,12 +1075,12 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1074,7 +1094,7 @@ abstract class FolderI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1119,12 +1139,12 @@ abstract class FolderI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1163,12 +1183,12 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1182,8 +1202,8 @@ abstract class FolderI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1232,8 +1252,8 @@ abstract class FolderI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1269,6 +1289,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->isColumnModified(FolderI18nTableMap::META_TITLE)) $criteria->add(FolderI18nTableMap::META_TITLE, $this->meta_title); if ($this->isColumnModified(FolderI18nTableMap::META_DESCRIPTION)) $criteria->add(FolderI18nTableMap::META_DESCRIPTION, $this->meta_description); if ($this->isColumnModified(FolderI18nTableMap::META_KEYWORDS)) $criteria->add(FolderI18nTableMap::META_KEYWORDS, $this->meta_keywords); + return $criteria; } @@ -1306,7 +1327,7 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1321,6 +1342,7 @@ abstract class FolderI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1330,9 +1352,9 @@ abstract class FolderI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FolderI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FolderI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1359,8 +1381,8 @@ abstract class FolderI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FolderI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FolderI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1376,8 +1398,8 @@ abstract class FolderI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildFolder object. * - * @param ChildFolder $v - * @return \Thelia\Model\FolderI18n The current object (for fluent API support) + * @param ChildFolder $v + * @return \Thelia\Model\FolderI18n The current object (for fluent API support) * @throws PropelException */ public function setFolder(ChildFolder $v = null) @@ -1396,14 +1418,16 @@ abstract class FolderI18n implements ActiveRecordInterface $v->addFolderI18n($this); } + return $this; } + /** * Get the associated ChildFolder object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFolder The associated ChildFolder object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFolder The associated ChildFolder object. * @throws PropelException */ public function getFolder(ConnectionInterface $con = null) @@ -1451,7 +1475,7 @@ abstract class FolderI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/FolderI18nQuery.php b/core/lib/Thelia/Model/Base/FolderI18nQuery.php index c1d8f0fab..787657033 100644 --- a/core/lib/Thelia/Model/Base/FolderI18nQuery.php +++ b/core/lib/Thelia/Model/Base/FolderI18nQuery.php @@ -79,9 +79,9 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FolderI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FolderI18n', $modelAlias = null) { @@ -91,8 +91,8 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Returns a new ChildFolderI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFolderI18nQuery */ @@ -152,10 +152,10 @@ abstract class FolderI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFolderI18n A model object, or null if the key is not found + * @return ChildFolderI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -183,8 +183,8 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFolderI18n|array|mixed the result, formatted by the current formatter */ @@ -204,8 +204,8 @@ abstract class FolderI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -226,7 +226,7 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -241,7 +241,7 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -272,11 +272,11 @@ abstract class FolderI18nQuery extends ModelCriteria * * @see filterByFolder() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -312,9 +312,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -341,9 +341,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -370,9 +370,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -399,9 +399,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -428,9 +428,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -457,9 +457,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByMetaTitle('%fooValue%'); // WHERE meta_title LIKE '%fooValue%' * * - * @param string $metaTitle The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaTitle The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -486,9 +486,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByMetaDescription('%fooValue%'); // WHERE meta_description LIKE '%fooValue%' * * - * @param string $metaDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -515,9 +515,9 @@ abstract class FolderI18nQuery extends ModelCriteria * $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%' * * - * @param string $metaKeywords The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaKeywords The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -538,8 +538,8 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Folder object * - * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -563,8 +563,8 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Folder relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -597,11 +597,11 @@ abstract class FolderI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query */ public function useFolderQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -613,7 +613,7 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFolderI18n $folderI18n Object to remove from the list of results + * @param ChildFolderI18n $folderI18n Object to remove from the list of results * * @return ChildFolderI18nQuery The current query, for fluid interface */ @@ -631,8 +631,8 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Deletes all rows from the folder_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -663,13 +663,13 @@ abstract class FolderI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFolderI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFolderI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFolderI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -689,6 +689,7 @@ abstract class FolderI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FolderI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/FolderImage.php b/core/lib/Thelia/Model/Base/FolderImage.php index c97945a82..d32b11d39 100644 --- a/core/lib/Thelia/Model/Base/FolderImage.php +++ b/core/lib/Thelia/Model/Base/FolderImage.php @@ -32,6 +32,7 @@ abstract class FolderImage implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FolderImageTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class FolderImage implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FolderImage The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class FolderImage implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [folder_id] column value. * - * @return int + * @return int */ public function getFolderId() { + return $this->folder_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class FolderImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class FolderImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class FolderImage implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderImage The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class FolderImage implements ActiveRecordInterface $this->modifiedColumns[FolderImageTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [folder_id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderImage The current object (for fluent API support) */ public function setFolderId($v) { @@ -512,14 +518,15 @@ abstract class FolderImage implements ActiveRecordInterface $this->aFolder = null; } + return $this; } // setFolderId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderImage The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class FolderImage implements ActiveRecordInterface $this->modifiedColumns[FolderImageTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderImage The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class FolderImage implements ActiveRecordInterface $this->modifiedColumns[FolderImageTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FolderImage The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class FolderImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FolderImage The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class FolderImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class FolderImage implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FolderImage::setDeleted() @@ -779,8 +790,8 @@ abstract class FolderImage implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class FolderImage implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class FolderImage implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class FolderImage implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class FolderImage implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class FolderImage implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class FolderImage implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class FolderImage implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class FolderImage implements ActiveRecordInterface if ($this->isColumnModified(FolderImageTableMap::POSITION)) $criteria->add(FolderImageTableMap::POSITION, $this->position); if ($this->isColumnModified(FolderImageTableMap::CREATED_AT)) $criteria->add(FolderImageTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(FolderImageTableMap::UPDATED_AT)) $criteria->add(FolderImageTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class FolderImage implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class FolderImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FolderImage (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FolderImage (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class FolderImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FolderImage Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FolderImage Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class FolderImage implements ActiveRecordInterface /** * Declares an association between this object and a ChildFolder object. * - * @param ChildFolder $v - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param ChildFolder $v + * @return \Thelia\Model\FolderImage The current object (for fluent API support) * @throws PropelException */ public function setFolder(ChildFolder $v = null) @@ -1323,14 +1336,16 @@ abstract class FolderImage implements ActiveRecordInterface $v->addFolderImage($this); } + return $this; } + /** * Get the associated ChildFolder object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFolder The associated ChildFolder object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFolder The associated ChildFolder object. * @throws PropelException */ public function getFolder(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class FolderImage implements ActiveRecordInterface return $this->aFolder; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class FolderImage implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class FolderImage implements ActiveRecordInterface * If this ChildFolderImage is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFolderImageI18n[] List of ChildFolderImageI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class FolderImage implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $folderImageI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildFolderImage The current object (for fluent API support) + * @param Collection $folderImageI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildFolderImage The current object (for fluent API support) */ public function setFolderImageI18ns(Collection $folderImageI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class FolderImage implements ActiveRecordInterface /** * Returns the number of related FolderImageI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FolderImageI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FolderImageI18n objects. * @throws PropelException */ public function countFolderImageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class FolderImage implements ActiveRecordInterface * Method called to associate a ChildFolderImageI18n object to this object * through the ChildFolderImageI18n foreign key attribute. * - * @param ChildFolderImageI18n $l ChildFolderImageI18n - * @return \Thelia\Model\FolderImage The current object (for fluent API support) + * @param ChildFolderImageI18n $l ChildFolderImageI18n + * @return \Thelia\Model\FolderImage The current object (for fluent API support) */ public function addFolderImageI18n(ChildFolderImageI18n $l) { @@ -1571,7 +1587,7 @@ abstract class FolderImage implements ActiveRecordInterface } /** - * @param FolderImageI18n $folderImageI18n The folderImageI18n object to remove. + * @param FolderImageI18n $folderImageI18n The folderImageI18n object to remove. * @return ChildFolderImage The current object (for fluent API support) */ public function removeFolderImageI18n($folderImageI18n) @@ -1614,7 +1630,7 @@ abstract class FolderImage implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildFolderImage The current object (for fluent API support) + * @return ChildFolderImage The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class FolderImage implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildFolderImage The current object (for fluent API support) + * @return ChildFolderImage The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class FolderImage implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildFolderImageI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class FolderImage implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildFolderImage The current object (for fluent API support) + * @return ChildFolderImage The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class FolderImage implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildFolderImageI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/FolderImageI18n.php b/core/lib/Thelia/Model/Base/FolderImageI18n.php index 7b35c18e7..6155871b6 100644 --- a/core/lib/Thelia/Model/Base/FolderImageI18n.php +++ b/core/lib/Thelia/Model/Base/FolderImageI18n.php @@ -26,6 +26,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FolderImageI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class FolderImageI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FolderImageI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class FolderImageI18n implements ActiveRecordInterface $this->aFolderImage = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class FolderImageI18n implements ActiveRecordInterface $this->modifiedColumns[FolderImageI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class FolderImageI18n implements ActiveRecordInterface $this->modifiedColumns[FolderImageI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class FolderImageI18n implements ActiveRecordInterface $this->modifiedColumns[FolderImageI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class FolderImageI18n implements ActiveRecordInterface $this->modifiedColumns[FolderImageI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface $this->modifiedColumns[FolderImageI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FolderImageI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class FolderImageI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FolderImageI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class FolderImageI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class FolderImageI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class FolderImageI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class FolderImageI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class FolderImageI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface if ($this->isColumnModified(FolderImageI18nTableMap::DESCRIPTION)) $criteria->add(FolderImageI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(FolderImageI18nTableMap::CHAPO)) $criteria->add(FolderImageI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(FolderImageI18nTableMap::POSTSCRIPTUM)) $criteria->add(FolderImageI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class FolderImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FolderImageI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FolderImageI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class FolderImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FolderImageI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FolderImageI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class FolderImageI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildFolderImage object. * - * @param ChildFolderImage $v - * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) + * @param ChildFolderImage $v + * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) * @throws PropelException */ public function setFolderImage(ChildFolderImage $v = null) @@ -1231,14 +1247,16 @@ abstract class FolderImageI18n implements ActiveRecordInterface $v->addFolderImageI18n($this); } + return $this; } + /** * Get the associated ChildFolderImage object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFolderImage The associated ChildFolderImage object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFolderImage The associated ChildFolderImage object. * @throws PropelException */ public function getFolderImage(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/FolderImageI18nQuery.php b/core/lib/Thelia/Model/Base/FolderImageI18nQuery.php index 72543aec5..15381439b 100644 --- a/core/lib/Thelia/Model/Base/FolderImageI18nQuery.php +++ b/core/lib/Thelia/Model/Base/FolderImageI18nQuery.php @@ -67,9 +67,9 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FolderImageI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FolderImageI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Returns a new ChildFolderImageI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFolderImageI18nQuery */ @@ -140,10 +140,10 @@ abstract class FolderImageI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFolderImageI18n A model object, or null if the key is not found + * @return ChildFolderImageI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFolderImageI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class FolderImageI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class FolderImageI18nQuery extends ModelCriteria * * @see filterByFolderImage() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class FolderImageI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class FolderImageI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class FolderImageI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class FolderImageI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class FolderImageI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class FolderImageI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\FolderImage object * * @param \Thelia\Model\FolderImage|ObjectCollection $folderImage The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class FolderImageI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderImageQuery A secondary query class using the current class as primary query */ public function useFolderImageQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFolderImageI18n $folderImageI18n Object to remove from the list of results + * @param ChildFolderImageI18n $folderImageI18n Object to remove from the list of results * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Deletes all rows from the folder_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class FolderImageI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFolderImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFolderImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFolderImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class FolderImageI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FolderImageI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/FolderImageQuery.php b/core/lib/Thelia/Model/Base/FolderImageQuery.php index d967c88b0..6466b83a3 100644 --- a/core/lib/Thelia/Model/Base/FolderImageQuery.php +++ b/core/lib/Thelia/Model/Base/FolderImageQuery.php @@ -72,9 +72,9 @@ abstract class FolderImageQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FolderImageQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FolderImage', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class FolderImageQuery extends ModelCriteria /** * Returns a new ChildFolderImageQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFolderImageQuery */ @@ -114,7 +114,7 @@ abstract class FolderImageQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildFolderImage|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class FolderImageQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFolderImage A model object, or null if the key is not found + * @return ChildFolderImage A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class FolderImageQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFolderImage|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class FolderImageQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class FolderImageQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFolderImageQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(FolderImageTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFolderImageQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(FolderImageTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class FolderImageQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class FolderImageQuery extends ModelCriteria * * @see filterByFolder() * - * @param mixed $folderId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $folderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class FolderImageQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class FolderImageQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class FolderImageQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class FolderImageQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class FolderImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Folder object * - * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class FolderImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Folder relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class FolderImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query */ public function useFolderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class FolderImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FolderImageI18n object * - * @param \Thelia\Model\FolderImageI18n|ObjectCollection $folderImageI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FolderImageI18n|ObjectCollection $folderImageI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class FolderImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderImageI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class FolderImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderImageI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderImageI18nQuery A secondary query class using the current class as primary query */ public function useFolderImageI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class FolderImageQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFolderImage $folderImage Object to remove from the list of results + * @param ChildFolderImage $folderImage Object to remove from the list of results * * @return ChildFolderImageQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class FolderImageQuery extends ModelCriteria /** * Deletes all rows from the folder_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class FolderImageQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFolderImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFolderImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFolderImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class FolderImageQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FolderImageTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class FolderImageQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class FolderImageQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class FolderImageQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class FolderImageQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class FolderImageQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class FolderImageQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class FolderImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class FolderImageQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderImageQuery The current query, for fluid interface + * @return ChildFolderImageQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class FolderImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderImageI18nQuery A secondary query class using the current class as primary query + * @return ChildFolderImageI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/FolderQuery.php b/core/lib/Thelia/Model/Base/FolderQuery.php index 822169704..473ad2234 100644 --- a/core/lib/Thelia/Model/Base/FolderQuery.php +++ b/core/lib/Thelia/Model/Base/FolderQuery.php @@ -103,9 +103,9 @@ abstract class FolderQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FolderQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Folder', $modelAlias = null) { @@ -115,8 +115,8 @@ abstract class FolderQuery extends ModelCriteria /** * Returns a new ChildFolderQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFolderQuery */ @@ -145,7 +145,7 @@ abstract class FolderQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildFolder|array|mixed the result, formatted by the current formatter @@ -176,10 +176,10 @@ abstract class FolderQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFolder A model object, or null if the key is not found + * @return ChildFolder A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -206,8 +206,8 @@ abstract class FolderQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFolder|array|mixed the result, formatted by the current formatter */ @@ -227,8 +227,8 @@ abstract class FolderQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -249,24 +249,26 @@ abstract class FolderQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFolderQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(FolderTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFolderQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(FolderTableMap::ID, $keys, Criteria::IN); } @@ -280,11 +282,11 @@ abstract class FolderQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -321,11 +323,11 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByParent(array('min' => 12)); // WHERE parent > 12 * * - * @param mixed $parent The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $parent The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -403,11 +405,11 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -444,13 +446,13 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -487,13 +489,13 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -530,11 +532,11 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -571,13 +573,13 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -613,9 +615,9 @@ abstract class FolderQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -636,8 +638,8 @@ abstract class FolderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ContentFolder object * - * @param \Thelia\Model\ContentFolder|ObjectCollection $contentFolder the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ContentFolder|ObjectCollection $contentFolder the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -659,8 +661,8 @@ abstract class FolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ContentFolder relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderQuery The current query, for fluid interface */ @@ -693,11 +695,11 @@ abstract class FolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentFolderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentFolderQuery A secondary query class using the current class as primary query */ public function useContentFolderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -709,8 +711,8 @@ abstract class FolderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FolderImage object * - * @param \Thelia\Model\FolderImage|ObjectCollection $folderImage the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FolderImage|ObjectCollection $folderImage the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -732,8 +734,8 @@ abstract class FolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderQuery The current query, for fluid interface */ @@ -766,11 +768,11 @@ abstract class FolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderImageQuery A secondary query class using the current class as primary query */ public function useFolderImageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -782,8 +784,8 @@ abstract class FolderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FolderDocument object * - * @param \Thelia\Model\FolderDocument|ObjectCollection $folderDocument the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FolderDocument|ObjectCollection $folderDocument the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -805,8 +807,8 @@ abstract class FolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderQuery The current query, for fluid interface */ @@ -839,11 +841,11 @@ abstract class FolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderDocumentQuery A secondary query class using the current class as primary query */ public function useFolderDocumentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -855,8 +857,8 @@ abstract class FolderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FolderI18n object * - * @param \Thelia\Model\FolderI18n|ObjectCollection $folderI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FolderI18n|ObjectCollection $folderI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -878,8 +880,8 @@ abstract class FolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderQuery The current query, for fluid interface */ @@ -912,11 +914,11 @@ abstract class FolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderI18nQuery A secondary query class using the current class as primary query */ public function useFolderI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -928,8 +930,8 @@ abstract class FolderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FolderVersion object * - * @param \Thelia\Model\FolderVersion|ObjectCollection $folderVersion the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FolderVersion|ObjectCollection $folderVersion the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -951,8 +953,8 @@ abstract class FolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FolderVersion relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderQuery The current query, for fluid interface */ @@ -985,11 +987,11 @@ abstract class FolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderVersionQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderVersionQuery A secondary query class using the current class as primary query */ public function useFolderVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1002,8 +1004,8 @@ abstract class FolderQuery extends ModelCriteria * Filter the query by a related Content object * using the content_folder table as cross reference * - * @param Content $content the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Content $content the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ @@ -1018,7 +1020,7 @@ abstract class FolderQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFolder $folder Object to remove from the list of results + * @param ChildFolder $folder Object to remove from the list of results * * @return ChildFolderQuery The current query, for fluid interface */ @@ -1034,8 +1036,8 @@ abstract class FolderQuery extends ModelCriteria /** * Deletes all rows from the folder table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1066,13 +1068,13 @@ abstract class FolderQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFolder or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFolder object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFolder object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1092,6 +1094,7 @@ abstract class FolderQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FolderTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1110,9 +1113,9 @@ abstract class FolderQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1122,9 +1125,9 @@ abstract class FolderQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1134,7 +1137,7 @@ abstract class FolderQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1144,7 +1147,7 @@ abstract class FolderQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1154,7 +1157,7 @@ abstract class FolderQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1164,7 +1167,7 @@ abstract class FolderQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1176,11 +1179,11 @@ abstract class FolderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1195,10 +1198,10 @@ abstract class FolderQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderQuery The current query, for fluid interface + * @return ChildFolderQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1215,11 +1218,11 @@ abstract class FolderQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildFolderI18nQuery A secondary query class using the current class as primary query + * @return ChildFolderI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1235,7 +1238,7 @@ abstract class FolderQuery extends ModelCriteria * * @return boolean */ - public static function isVersioningEnabled() + static public function isVersioningEnabled() { return self::$isVersioningEnabled; } @@ -1243,7 +1246,7 @@ abstract class FolderQuery extends ModelCriteria /** * Enables versioning */ - public static function enableVersioning() + static public function enableVersioning() { self::$isVersioningEnabled = true; } @@ -1251,7 +1254,7 @@ abstract class FolderQuery extends ModelCriteria /** * Disables versioning */ - public static function disableVersioning() + static public function disableVersioning() { self::$isVersioningEnabled = false; } diff --git a/core/lib/Thelia/Model/Base/FolderVersion.php b/core/lib/Thelia/Model/Base/FolderVersion.php index a5771ac4b..f7718dd5b 100644 --- a/core/lib/Thelia/Model/Base/FolderVersion.php +++ b/core/lib/Thelia/Model/Base/FolderVersion.php @@ -28,6 +28,7 @@ abstract class FolderVersion implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\FolderVersionTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -344,9 +345,9 @@ abstract class FolderVersion implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return FolderVersion The current object, for fluid interface */ @@ -396,40 +397,44 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [parent] column value. * - * @return int + * @return int */ public function getParent() { + return $this->parent; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -437,8 +442,8 @@ abstract class FolderVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -457,8 +462,8 @@ abstract class FolderVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -476,10 +481,11 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -487,8 +493,8 @@ abstract class FolderVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -506,18 +512,19 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setId($v) { @@ -534,14 +541,15 @@ abstract class FolderVersion implements ActiveRecordInterface $this->aFolder = null; } + return $this; } // setId() /** * Set the value of [parent] column. * - * @param int $v new value - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setParent($v) { @@ -554,14 +562,15 @@ abstract class FolderVersion implements ActiveRecordInterface $this->modifiedColumns[FolderVersionTableMap::PARENT] = true; } + return $this; } // setParent() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setVisible($v) { @@ -574,14 +583,15 @@ abstract class FolderVersion implements ActiveRecordInterface $this->modifiedColumns[FolderVersionTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setPosition($v) { @@ -594,15 +604,16 @@ abstract class FolderVersion implements ActiveRecordInterface $this->modifiedColumns[FolderVersionTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -614,15 +625,16 @@ abstract class FolderVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -634,14 +646,15 @@ abstract class FolderVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setVersion($v) { @@ -654,15 +667,16 @@ abstract class FolderVersion implements ActiveRecordInterface $this->modifiedColumns[FolderVersionTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -674,14 +688,15 @@ abstract class FolderVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -694,6 +709,7 @@ abstract class FolderVersion implements ActiveRecordInterface $this->modifiedColumns[FolderVersionTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -737,6 +753,7 @@ abstract class FolderVersion implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : FolderVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -812,10 +829,10 @@ abstract class FolderVersion implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -851,7 +868,7 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see FolderVersion::setDeleted() @@ -894,8 +911,8 @@ abstract class FolderVersion implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -945,8 +962,8 @@ abstract class FolderVersion implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -989,7 +1006,7 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1080,7 +1097,7 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1096,12 +1113,12 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1115,7 +1132,7 @@ abstract class FolderVersion implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1160,12 +1177,12 @@ abstract class FolderVersion implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1204,12 +1221,12 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1223,8 +1240,8 @@ abstract class FolderVersion implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1273,8 +1290,8 @@ abstract class FolderVersion implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1310,6 +1327,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->isColumnModified(FolderVersionTableMap::VERSION)) $criteria->add(FolderVersionTableMap::VERSION, $this->version); if ($this->isColumnModified(FolderVersionTableMap::VERSION_CREATED_AT)) $criteria->add(FolderVersionTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(FolderVersionTableMap::VERSION_CREATED_BY)) $criteria->add(FolderVersionTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1347,7 +1365,7 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1362,6 +1380,7 @@ abstract class FolderVersion implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getVersion()); } @@ -1371,9 +1390,9 @@ abstract class FolderVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\FolderVersion (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\FolderVersion (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1400,8 +1419,8 @@ abstract class FolderVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\FolderVersion Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\FolderVersion Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1417,8 +1436,8 @@ abstract class FolderVersion implements ActiveRecordInterface /** * Declares an association between this object and a ChildFolder object. * - * @param ChildFolder $v - * @return \Thelia\Model\FolderVersion The current object (for fluent API support) + * @param ChildFolder $v + * @return \Thelia\Model\FolderVersion The current object (for fluent API support) * @throws PropelException */ public function setFolder(ChildFolder $v = null) @@ -1437,14 +1456,16 @@ abstract class FolderVersion implements ActiveRecordInterface $v->addFolderVersion($this); } + return $this; } + /** * Get the associated ChildFolder object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildFolder The associated ChildFolder object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildFolder The associated ChildFolder object. * @throws PropelException */ public function getFolder(ConnectionInterface $con = null) @@ -1492,7 +1513,7 @@ abstract class FolderVersion implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/FolderVersionQuery.php b/core/lib/Thelia/Model/Base/FolderVersionQuery.php index a5c96aead..086551003 100644 --- a/core/lib/Thelia/Model/Base/FolderVersionQuery.php +++ b/core/lib/Thelia/Model/Base/FolderVersionQuery.php @@ -79,9 +79,9 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\FolderVersionQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\FolderVersion', $modelAlias = null) { @@ -91,8 +91,8 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Returns a new ChildFolderVersionQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildFolderVersionQuery */ @@ -152,10 +152,10 @@ abstract class FolderVersionQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildFolderVersion A model object, or null if the key is not found + * @return ChildFolderVersion A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -183,8 +183,8 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildFolderVersion|array|mixed the result, formatted by the current formatter */ @@ -204,8 +204,8 @@ abstract class FolderVersionQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -226,7 +226,7 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -241,7 +241,7 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -272,11 +272,11 @@ abstract class FolderVersionQuery extends ModelCriteria * * @see filterByFolder() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -313,11 +313,11 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByParent(array('min' => 12)); // WHERE parent > 12 * * - * @param mixed $parent The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $parent The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -354,11 +354,11 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -395,11 +395,11 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -436,13 +436,13 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -479,13 +479,13 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -522,11 +522,11 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -563,13 +563,13 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -605,9 +605,9 @@ abstract class FolderVersionQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -628,8 +628,8 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Folder object * - * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Folder|ObjectCollection $folder The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -653,8 +653,8 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Folder relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -687,11 +687,11 @@ abstract class FolderVersionQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FolderQuery A secondary query class using the current class as primary query */ public function useFolderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -703,7 +703,7 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildFolderVersion $folderVersion Object to remove from the list of results + * @param ChildFolderVersion $folderVersion Object to remove from the list of results * * @return ChildFolderVersionQuery The current query, for fluid interface */ @@ -721,8 +721,8 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Deletes all rows from the folder_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -753,13 +753,13 @@ abstract class FolderVersionQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildFolderVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildFolderVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildFolderVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -779,6 +779,7 @@ abstract class FolderVersionQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + FolderVersionTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/Lang.php b/core/lib/Thelia/Model/Base/Lang.php index 056a70ba4..c2e99c32a 100644 --- a/core/lib/Thelia/Model/Base/Lang.php +++ b/core/lib/Thelia/Model/Base/Lang.php @@ -30,6 +30,7 @@ abstract class Lang implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\LangTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -375,9 +376,9 @@ abstract class Lang implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Lang The current object, for fluid interface */ @@ -427,130 +428,143 @@ abstract class Lang implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [url] column value. * - * @return string + * @return string */ public function getUrl() { + return $this->url; } /** * Get the [date_format] column value. * - * @return string + * @return string */ public function getDateFormat() { + return $this->date_format; } /** * Get the [time_format] column value. * - * @return string + * @return string */ public function getTimeFormat() { + return $this->time_format; } /** * Get the [datetime_format] column value. * - * @return string + * @return string */ public function getDatetimeFormat() { + return $this->datetime_format; } /** * Get the [decimal_separator] column value. * - * @return string + * @return string */ public function getDecimalSeparator() { + return $this->decimal_separator; } /** * Get the [thousands_separator] column value. * - * @return string + * @return string */ public function getThousandsSeparator() { + return $this->thousands_separator; } /** * Get the [decimals] column value. * - * @return string + * @return string */ public function getDecimals() { + return $this->decimals; } /** * Get the [by_default] column value. * - * @return int + * @return int */ public function getByDefault() { + return $this->by_default; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -558,8 +572,8 @@ abstract class Lang implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -578,8 +592,8 @@ abstract class Lang implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -597,8 +611,8 @@ abstract class Lang implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setId($v) { @@ -611,14 +625,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setTitle($v) { @@ -631,14 +646,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setCode($v) { @@ -651,14 +667,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::CODE] = true; } + return $this; } // setCode() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setLocale($v) { @@ -671,14 +688,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [url] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setUrl($v) { @@ -691,14 +709,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::URL] = true; } + return $this; } // setUrl() /** * Set the value of [date_format] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setDateFormat($v) { @@ -711,14 +730,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::DATE_FORMAT] = true; } + return $this; } // setDateFormat() /** * Set the value of [time_format] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setTimeFormat($v) { @@ -731,14 +751,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::TIME_FORMAT] = true; } + return $this; } // setTimeFormat() /** * Set the value of [datetime_format] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setDatetimeFormat($v) { @@ -751,14 +772,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::DATETIME_FORMAT] = true; } + return $this; } // setDatetimeFormat() /** * Set the value of [decimal_separator] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setDecimalSeparator($v) { @@ -771,14 +793,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::DECIMAL_SEPARATOR] = true; } + return $this; } // setDecimalSeparator() /** * Set the value of [thousands_separator] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setThousandsSeparator($v) { @@ -791,14 +814,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::THOUSANDS_SEPARATOR] = true; } + return $this; } // setThousandsSeparator() /** * Set the value of [decimals] column. * - * @param string $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setDecimals($v) { @@ -811,14 +835,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::DECIMALS] = true; } + return $this; } // setDecimals() /** * Set the value of [by_default] column. * - * @param int $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setByDefault($v) { @@ -831,14 +856,15 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::BY_DEFAULT] = true; } + return $this; } // setByDefault() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setPosition($v) { @@ -851,15 +877,16 @@ abstract class Lang implements ActiveRecordInterface $this->modifiedColumns[LangTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -871,15 +898,16 @@ abstract class Lang implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -891,6 +919,7 @@ abstract class Lang implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -1018,10 +1047,10 @@ abstract class Lang implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1058,7 +1087,7 @@ abstract class Lang implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Lang::setDeleted() @@ -1101,8 +1130,8 @@ abstract class Lang implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1163,8 +1192,8 @@ abstract class Lang implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1212,7 +1241,7 @@ abstract class Lang implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1350,7 +1379,7 @@ abstract class Lang implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1366,12 +1395,12 @@ abstract class Lang implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1385,7 +1414,7 @@ abstract class Lang implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1448,12 +1477,12 @@ abstract class Lang implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1498,12 +1527,12 @@ abstract class Lang implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1517,8 +1546,8 @@ abstract class Lang implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1585,8 +1614,8 @@ abstract class Lang implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1634,6 +1663,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->isColumnModified(LangTableMap::POSITION)) $criteria->add(LangTableMap::POSITION, $this->position); if ($this->isColumnModified(LangTableMap::CREATED_AT)) $criteria->add(LangTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(LangTableMap::UPDATED_AT)) $criteria->add(LangTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1655,7 +1685,7 @@ abstract class Lang implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1665,7 +1695,7 @@ abstract class Lang implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1679,6 +1709,7 @@ abstract class Lang implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1688,9 +1719,9 @@ abstract class Lang implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Lang (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Lang (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1737,8 +1768,8 @@ abstract class Lang implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Lang Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Lang Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1751,12 +1782,13 @@ abstract class Lang implements ActiveRecordInterface return $copyObj; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1795,8 +1827,8 @@ abstract class Lang implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1818,8 +1850,8 @@ abstract class Lang implements ActiveRecordInterface * If this ChildLang is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -1875,9 +1907,9 @@ abstract class Lang implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orders A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildLang The current object (for fluent API support) + * @param Collection $orders A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildLang The current object (for fluent API support) */ public function setOrders(Collection $orders, ConnectionInterface $con = null) { @@ -1904,10 +1936,10 @@ abstract class Lang implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1939,8 +1971,8 @@ abstract class Lang implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\Lang The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\Lang The current object (for fluent API support) */ public function addOrder(ChildOrder $l) { @@ -1966,7 +1998,7 @@ abstract class Lang implements ActiveRecordInterface } /** - * @param Order $order The order object to remove. + * @param Order $order The order object to remove. * @return ChildLang The current object (for fluent API support) */ public function removeOrder($order) @@ -1996,9 +2028,9 @@ abstract class Lang implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Lang. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2021,9 +2053,9 @@ abstract class Lang implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Lang. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2046,9 +2078,9 @@ abstract class Lang implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Lang. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2071,9 +2103,9 @@ abstract class Lang implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Lang. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2096,9 +2128,9 @@ abstract class Lang implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Lang. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2121,9 +2153,9 @@ abstract class Lang implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Lang. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2146,9 +2178,9 @@ abstract class Lang implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Lang. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2193,7 +2225,7 @@ abstract class Lang implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2223,7 +2255,7 @@ abstract class Lang implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildLang The current object (for fluent API support) + * @return ChildLang The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/LangQuery.php b/core/lib/Thelia/Model/Base/LangQuery.php index d6cdaa33c..f4f480fa9 100644 --- a/core/lib/Thelia/Model/Base/LangQuery.php +++ b/core/lib/Thelia/Model/Base/LangQuery.php @@ -103,9 +103,9 @@ abstract class LangQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\LangQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Lang', $modelAlias = null) { @@ -115,8 +115,8 @@ abstract class LangQuery extends ModelCriteria /** * Returns a new ChildLangQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildLangQuery */ @@ -145,7 +145,7 @@ abstract class LangQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildLang|array|mixed the result, formatted by the current formatter @@ -176,10 +176,10 @@ abstract class LangQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildLang A model object, or null if the key is not found + * @return ChildLang A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -206,8 +206,8 @@ abstract class LangQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildLang|array|mixed the result, formatted by the current formatter */ @@ -227,8 +227,8 @@ abstract class LangQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -249,24 +249,26 @@ abstract class LangQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildLangQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(LangTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildLangQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(LangTableMap::ID, $keys, Criteria::IN); } @@ -280,11 +282,11 @@ abstract class LangQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -320,9 +322,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -349,9 +351,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -378,9 +380,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -407,9 +409,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByUrl('%fooValue%'); // WHERE url LIKE '%fooValue%' * * - * @param string $url The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $url The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -436,9 +438,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByDateFormat('%fooValue%'); // WHERE date_format LIKE '%fooValue%' * * - * @param string $dateFormat The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $dateFormat The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -465,9 +467,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByTimeFormat('%fooValue%'); // WHERE time_format LIKE '%fooValue%' * * - * @param string $timeFormat The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $timeFormat The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -494,9 +496,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByDatetimeFormat('%fooValue%'); // WHERE datetime_format LIKE '%fooValue%' * * - * @param string $datetimeFormat The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $datetimeFormat The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -523,9 +525,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByDecimalSeparator('%fooValue%'); // WHERE decimal_separator LIKE '%fooValue%' * * - * @param string $decimalSeparator The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $decimalSeparator The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -552,9 +554,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByThousandsSeparator('%fooValue%'); // WHERE thousands_separator LIKE '%fooValue%' * * - * @param string $thousandsSeparator The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $thousandsSeparator The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -581,9 +583,9 @@ abstract class LangQuery extends ModelCriteria * $query->filterByDecimals('%fooValue%'); // WHERE decimals LIKE '%fooValue%' * * - * @param string $decimals The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $decimals The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -611,11 +613,11 @@ abstract class LangQuery extends ModelCriteria * $query->filterByByDefault(array('min' => 12)); // WHERE by_default > 12 * * - * @param mixed $byDefault The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $byDefault The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -652,11 +654,11 @@ abstract class LangQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -693,13 +695,13 @@ abstract class LangQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -736,13 +738,13 @@ abstract class LangQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -772,8 +774,8 @@ abstract class LangQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildLangQuery The current query, for fluid interface */ @@ -795,8 +797,8 @@ abstract class LangQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Order relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildLangQuery The current query, for fluid interface */ @@ -829,11 +831,11 @@ abstract class LangQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -845,7 +847,7 @@ abstract class LangQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildLang $lang Object to remove from the list of results + * @param ChildLang $lang Object to remove from the list of results * * @return ChildLangQuery The current query, for fluid interface */ @@ -861,8 +863,8 @@ abstract class LangQuery extends ModelCriteria /** * Deletes all rows from the lang table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -893,13 +895,13 @@ abstract class LangQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildLang or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildLang object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildLang object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -919,6 +921,7 @@ abstract class LangQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + LangTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -937,9 +940,9 @@ abstract class LangQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildLangQuery The current query, for fluid interface + * @return ChildLangQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -949,9 +952,9 @@ abstract class LangQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildLangQuery The current query, for fluid interface + * @return ChildLangQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -961,7 +964,7 @@ abstract class LangQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildLangQuery The current query, for fluid interface + * @return ChildLangQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -971,7 +974,7 @@ abstract class LangQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildLangQuery The current query, for fluid interface + * @return ChildLangQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -981,7 +984,7 @@ abstract class LangQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildLangQuery The current query, for fluid interface + * @return ChildLangQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -991,7 +994,7 @@ abstract class LangQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildLangQuery The current query, for fluid interface + * @return ChildLangQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Message.php b/core/lib/Thelia/Model/Base/Message.php index a8298277c..a9e7dde84 100644 --- a/core/lib/Thelia/Model/Base/Message.php +++ b/core/lib/Thelia/Model/Base/Message.php @@ -33,6 +33,7 @@ abstract class Message implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\MessageTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -168,6 +169,7 @@ abstract class Message implements ActiveRecordInterface // versionable behavior + /** * @var bool */ @@ -407,9 +409,9 @@ abstract class Message implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Message The current object, for fluid interface */ @@ -459,70 +461,77 @@ abstract class Message implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [name] column value. * - * @return string + * @return string */ public function getName() { + return $this->name; } /** * Get the [secured] column value. * - * @return int + * @return int */ public function getSecured() { + return $this->secured; } /** * Get the [text_layout_file_name] column value. * - * @return string + * @return string */ public function getTextLayoutFileName() { + return $this->text_layout_file_name; } /** * Get the [text_template_file_name] column value. * - * @return string + * @return string */ public function getTextTemplateFileName() { + return $this->text_template_file_name; } /** * Get the [html_layout_file_name] column value. * - * @return string + * @return string */ public function getHtmlLayoutFileName() { + return $this->html_layout_file_name; } /** * Get the [html_template_file_name] column value. * - * @return string + * @return string */ public function getHtmlTemplateFileName() { + return $this->html_template_file_name; } @@ -530,8 +539,8 @@ abstract class Message implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -550,8 +559,8 @@ abstract class Message implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -569,10 +578,11 @@ abstract class Message implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -580,8 +590,8 @@ abstract class Message implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -599,18 +609,19 @@ abstract class Message implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setId($v) { @@ -623,14 +634,15 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [name] column. * - * @param string $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setName($v) { @@ -643,14 +655,15 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::NAME] = true; } + return $this; } // setName() /** * Set the value of [secured] column. * - * @param int $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setSecured($v) { @@ -663,14 +676,15 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::SECURED] = true; } + return $this; } // setSecured() /** * Set the value of [text_layout_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setTextLayoutFileName($v) { @@ -683,14 +697,15 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::TEXT_LAYOUT_FILE_NAME] = true; } + return $this; } // setTextLayoutFileName() /** * Set the value of [text_template_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setTextTemplateFileName($v) { @@ -703,14 +718,15 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::TEXT_TEMPLATE_FILE_NAME] = true; } + return $this; } // setTextTemplateFileName() /** * Set the value of [html_layout_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setHtmlLayoutFileName($v) { @@ -723,14 +739,15 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::HTML_LAYOUT_FILE_NAME] = true; } + return $this; } // setHtmlLayoutFileName() /** * Set the value of [html_template_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setHtmlTemplateFileName($v) { @@ -743,15 +760,16 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::HTML_TEMPLATE_FILE_NAME] = true; } + return $this; } // setHtmlTemplateFileName() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -763,15 +781,16 @@ abstract class Message implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -783,14 +802,15 @@ abstract class Message implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setVersion($v) { @@ -803,15 +823,16 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -823,14 +844,15 @@ abstract class Message implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -843,6 +865,7 @@ abstract class Message implements ActiveRecordInterface $this->modifiedColumns[MessageTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -886,6 +909,7 @@ abstract class Message implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : MessageTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -967,10 +991,10 @@ abstract class Message implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1009,7 +1033,7 @@ abstract class Message implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Message::setDeleted() @@ -1052,8 +1076,8 @@ abstract class Message implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1126,8 +1150,8 @@ abstract class Message implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1192,7 +1216,7 @@ abstract class Message implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1312,7 +1336,7 @@ abstract class Message implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1328,12 +1352,12 @@ abstract class Message implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1347,7 +1371,7 @@ abstract class Message implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1401,12 +1425,12 @@ abstract class Message implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1451,12 +1475,12 @@ abstract class Message implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1470,8 +1494,8 @@ abstract class Message implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1529,8 +1553,8 @@ abstract class Message implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1572,6 +1596,7 @@ abstract class Message implements ActiveRecordInterface if ($this->isColumnModified(MessageTableMap::VERSION)) $criteria->add(MessageTableMap::VERSION, $this->version); if ($this->isColumnModified(MessageTableMap::VERSION_CREATED_AT)) $criteria->add(MessageTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(MessageTableMap::VERSION_CREATED_BY)) $criteria->add(MessageTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1593,7 +1618,7 @@ abstract class Message implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1603,7 +1628,7 @@ abstract class Message implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1617,6 +1642,7 @@ abstract class Message implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1626,9 +1652,9 @@ abstract class Message implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Message (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Message (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1678,8 +1704,8 @@ abstract class Message implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Message Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Message Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1692,12 +1718,13 @@ abstract class Message implements ActiveRecordInterface return $copyObj; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1739,8 +1766,8 @@ abstract class Message implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1762,8 +1789,8 @@ abstract class Message implements ActiveRecordInterface * If this ChildMessage is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildMessageI18n[] List of ChildMessageI18n objects * @throws PropelException */ @@ -1819,9 +1846,9 @@ abstract class Message implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $messageI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildMessage The current object (for fluent API support) + * @param Collection $messageI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildMessage The current object (for fluent API support) */ public function setMessageI18ns(Collection $messageI18ns, ConnectionInterface $con = null) { @@ -1851,10 +1878,10 @@ abstract class Message implements ActiveRecordInterface /** * Returns the number of related MessageI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related MessageI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related MessageI18n objects. * @throws PropelException */ public function countMessageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1886,8 +1913,8 @@ abstract class Message implements ActiveRecordInterface * Method called to associate a ChildMessageI18n object to this object * through the ChildMessageI18n foreign key attribute. * - * @param ChildMessageI18n $l ChildMessageI18n - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param ChildMessageI18n $l ChildMessageI18n + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function addMessageI18n(ChildMessageI18n $l) { @@ -1917,7 +1944,7 @@ abstract class Message implements ActiveRecordInterface } /** - * @param MessageI18n $messageI18n The messageI18n object to remove. + * @param MessageI18n $messageI18n The messageI18n object to remove. * @return ChildMessage The current object (for fluent API support) */ public function removeMessageI18n($messageI18n) @@ -1964,8 +1991,8 @@ abstract class Message implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1987,8 +2014,8 @@ abstract class Message implements ActiveRecordInterface * If this ChildMessage is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildMessageVersion[] List of ChildMessageVersion objects * @throws PropelException */ @@ -2044,9 +2071,9 @@ abstract class Message implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $messageVersions A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildMessage The current object (for fluent API support) + * @param Collection $messageVersions A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildMessage The current object (for fluent API support) */ public function setMessageVersions(Collection $messageVersions, ConnectionInterface $con = null) { @@ -2076,10 +2103,10 @@ abstract class Message implements ActiveRecordInterface /** * Returns the number of related MessageVersion objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related MessageVersion objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related MessageVersion objects. * @throws PropelException */ public function countMessageVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2111,8 +2138,8 @@ abstract class Message implements ActiveRecordInterface * Method called to associate a ChildMessageVersion object to this object * through the ChildMessageVersion foreign key attribute. * - * @param ChildMessageVersion $l ChildMessageVersion - * @return \Thelia\Model\Message The current object (for fluent API support) + * @param ChildMessageVersion $l ChildMessageVersion + * @return \Thelia\Model\Message The current object (for fluent API support) */ public function addMessageVersion(ChildMessageVersion $l) { @@ -2139,7 +2166,7 @@ abstract class Message implements ActiveRecordInterface /** * @param MessageVersion $messageVersion The messageVersion object to remove. - * @return ChildMessage The current object (for fluent API support) + * @return ChildMessage The current object (for fluent API support) */ public function removeMessageVersion($messageVersion) { @@ -2188,7 +2215,7 @@ abstract class Message implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2228,7 +2255,7 @@ abstract class Message implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildMessage The current object (for fluent API support) + * @return ChildMessage The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2242,9 +2269,9 @@ abstract class Message implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildMessage The current object (for fluent API support) + * @return ChildMessage The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2256,7 +2283,7 @@ abstract class Message implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2266,8 +2293,8 @@ abstract class Message implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildMessageI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2300,10 +2327,10 @@ abstract class Message implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildMessage The current object (for fluent API support) + * @return ChildMessage The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2328,7 +2355,7 @@ abstract class Message implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildMessageI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2449,7 +2476,7 @@ abstract class Message implements ActiveRecordInterface /** * Checks whether the current state must be recorded as a version * - * @return boolean + * @return boolean */ public function isVersioningNecessary($con = null) { @@ -2471,9 +2498,9 @@ abstract class Message implements ActiveRecordInterface /** * Creates a version of the current object and saves it. * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ChildMessageVersion A version object + * @return ChildMessageVersion A version object */ public function addVersion($con = null) { @@ -2501,10 +2528,10 @@ abstract class Message implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con The connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con The connection to use * - * @return ChildMessage The current object (for fluent API support) + * @return ChildMessage The current object (for fluent API support) */ public function toVersion($versionNumber, $con = null) { @@ -2520,9 +2547,9 @@ abstract class Message implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param ChildMessageVersion $version The version object to use - * @param ConnectionInterface $con the connection to use - * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. + * @param ChildMessageVersion $version The version object to use + * @param ConnectionInterface $con the connection to use + * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return ChildMessage The current object (for fluent API support) */ @@ -2548,9 +2575,9 @@ abstract class Message implements ActiveRecordInterface /** * Gets the latest persisted version number for the current object * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return integer + * @return integer */ public function getLastVersionNumber($con = null) { @@ -2568,9 +2595,9 @@ abstract class Message implements ActiveRecordInterface /** * Checks whether the current object is the latest one * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return Boolean + * @return Boolean */ public function isLastVersion($con = null) { @@ -2580,10 +2607,10 @@ abstract class Message implements ActiveRecordInterface /** * Retrieves a version object for this entity and a version number * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con the connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con the connection to use * - * @return ChildMessageVersion A version object + * @return ChildMessageVersion A version object */ public function getOneVersion($versionNumber, $con = null) { @@ -2596,9 +2623,9 @@ abstract class Message implements ActiveRecordInterface /** * Gets all the versions of this object, in incremental order * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ObjectCollection A list of ChildMessageVersion objects + * @return ObjectCollection A list of ChildMessageVersion objects */ public function getAllVersions($con = null) { @@ -2618,12 +2645,12 @@ abstract class Message implements ActiveRecordInterface * ); * * - * @param integer $versionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $versionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersion($versionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -2643,13 +2670,13 @@ abstract class Message implements ActiveRecordInterface * ); * * - * @param integer $fromVersionNumber - * @param integer $toVersionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $fromVersionNumber + * @param integer $toVersionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersions($fromVersionNumber, $toVersionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -2669,12 +2696,12 @@ abstract class Message implements ActiveRecordInterface * ); * * - * @param array $fromVersion An array representing the original version. - * @param array $toVersion An array representing the destination version. - * @param string $keys Main key used for the result diff (versions|columns). - * @param array $ignoredColumns The columns to exclude from the diff. + * @param array $fromVersion An array representing the original version. + * @param array $toVersion An array representing the destination version. + * @param string $keys Main key used for the result diff (versions|columns). + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ protected function computeDiff($fromVersion, $toVersion, $keys = 'columns', $ignoredColumns = array()) { @@ -2711,7 +2738,7 @@ abstract class Message implements ActiveRecordInterface /** * retrieve the last $number versions. * - * @param Integer $number the number of record to return. + * @param Integer $number the number of record to return. * @return PropelCollection|array \Thelia\Model\MessageVersion[] List of \Thelia\Model\MessageVersion objects */ public function getLastVersions($number = 10, $criteria = null, $con = null) diff --git a/core/lib/Thelia/Model/Base/MessageI18n.php b/core/lib/Thelia/Model/Base/MessageI18n.php index e779f09ac..d2e314617 100644 --- a/core/lib/Thelia/Model/Base/MessageI18n.php +++ b/core/lib/Thelia/Model/Base/MessageI18n.php @@ -26,6 +26,7 @@ abstract class MessageI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\MessageI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class MessageI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return MessageI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [subject] column value. * - * @return string + * @return string */ public function getSubject() { + return $this->subject; } /** * Get the [text_message] column value. * - * @return string + * @return string */ public function getTextMessage() { + return $this->text_message; } /** * Get the [html_message] column value. * - * @return string + * @return string */ public function getHtmlMessage() { + return $this->html_message; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\MessageI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\MessageI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class MessageI18n implements ActiveRecordInterface $this->aMessage = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\MessageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class MessageI18n implements ActiveRecordInterface $this->modifiedColumns[MessageI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\MessageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class MessageI18n implements ActiveRecordInterface $this->modifiedColumns[MessageI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [subject] column. * - * @param string $v new value - * @return \Thelia\Model\MessageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageI18n The current object (for fluent API support) */ public function setSubject($v) { @@ -514,14 +524,15 @@ abstract class MessageI18n implements ActiveRecordInterface $this->modifiedColumns[MessageI18nTableMap::SUBJECT] = true; } + return $this; } // setSubject() /** * Set the value of [text_message] column. * - * @param string $v new value - * @return \Thelia\Model\MessageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageI18n The current object (for fluent API support) */ public function setTextMessage($v) { @@ -534,14 +545,15 @@ abstract class MessageI18n implements ActiveRecordInterface $this->modifiedColumns[MessageI18nTableMap::TEXT_MESSAGE] = true; } + return $this; } // setTextMessage() /** * Set the value of [html_message] column. * - * @param string $v new value - * @return \Thelia\Model\MessageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageI18n The current object (for fluent API support) */ public function setHtmlMessage($v) { @@ -554,6 +566,7 @@ abstract class MessageI18n implements ActiveRecordInterface $this->modifiedColumns[MessageI18nTableMap::HTML_MESSAGE] = true; } + return $this; } // setHtmlMessage() @@ -597,6 +610,7 @@ abstract class MessageI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : MessageI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class MessageI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see MessageI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class MessageI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class MessageI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class MessageI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class MessageI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class MessageI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class MessageI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class MessageI18n implements ActiveRecordInterface if ($this->isColumnModified(MessageI18nTableMap::SUBJECT)) $criteria->add(MessageI18nTableMap::SUBJECT, $this->subject); if ($this->isColumnModified(MessageI18nTableMap::TEXT_MESSAGE)) $criteria->add(MessageI18nTableMap::TEXT_MESSAGE, $this->text_message); if ($this->isColumnModified(MessageI18nTableMap::HTML_MESSAGE)) $criteria->add(MessageI18nTableMap::HTML_MESSAGE, $this->html_message); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class MessageI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class MessageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\MessageI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\MessageI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class MessageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\MessageI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\MessageI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class MessageI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildMessage object. * - * @param ChildMessage $v - * @return \Thelia\Model\MessageI18n The current object (for fluent API support) + * @param ChildMessage $v + * @return \Thelia\Model\MessageI18n The current object (for fluent API support) * @throws PropelException */ public function setMessage(ChildMessage $v = null) @@ -1231,14 +1247,16 @@ abstract class MessageI18n implements ActiveRecordInterface $v->addMessageI18n($this); } + return $this; } + /** * Get the associated ChildMessage object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildMessage The associated ChildMessage object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildMessage The associated ChildMessage object. * @throws PropelException */ public function getMessage(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class MessageI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/MessageI18nQuery.php b/core/lib/Thelia/Model/Base/MessageI18nQuery.php index e3a0fdd33..6ef0a1c10 100644 --- a/core/lib/Thelia/Model/Base/MessageI18nQuery.php +++ b/core/lib/Thelia/Model/Base/MessageI18nQuery.php @@ -67,9 +67,9 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\MessageI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\MessageI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Returns a new ChildMessageI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildMessageI18nQuery */ @@ -140,10 +140,10 @@ abstract class MessageI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildMessageI18n A model object, or null if the key is not found + * @return ChildMessageI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildMessageI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class MessageI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class MessageI18nQuery extends ModelCriteria * * @see filterByMessage() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class MessageI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class MessageI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class MessageI18nQuery extends ModelCriteria * $query->filterBySubject('%fooValue%'); // WHERE subject LIKE '%fooValue%' * * - * @param string $subject The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $subject The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class MessageI18nQuery extends ModelCriteria * $query->filterByTextMessage('%fooValue%'); // WHERE text_message LIKE '%fooValue%' * * - * @param string $textMessage The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $textMessage The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class MessageI18nQuery extends ModelCriteria * $query->filterByHtmlMessage('%fooValue%'); // WHERE html_message LIKE '%fooValue%' * * - * @param string $htmlMessage The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $htmlMessage The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Message object * - * @param \Thelia\Model\Message|ObjectCollection $message The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Message|ObjectCollection $message The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Message relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class MessageI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\MessageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\MessageQuery A secondary query class using the current class as primary query */ public function useMessageQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildMessageI18n $messageI18n Object to remove from the list of results + * @param ChildMessageI18n $messageI18n Object to remove from the list of results * * @return ChildMessageI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Deletes all rows from the message_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class MessageI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildMessageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildMessageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildMessageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class MessageI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + MessageI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/MessageQuery.php b/core/lib/Thelia/Model/Base/MessageQuery.php index 8762a17f5..1492b0834 100644 --- a/core/lib/Thelia/Model/Base/MessageQuery.php +++ b/core/lib/Thelia/Model/Base/MessageQuery.php @@ -103,9 +103,9 @@ abstract class MessageQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\MessageQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Message', $modelAlias = null) { @@ -115,8 +115,8 @@ abstract class MessageQuery extends ModelCriteria /** * Returns a new ChildMessageQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildMessageQuery */ @@ -145,7 +145,7 @@ abstract class MessageQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildMessage|array|mixed the result, formatted by the current formatter @@ -176,10 +176,10 @@ abstract class MessageQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildMessage A model object, or null if the key is not found + * @return ChildMessage A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -206,8 +206,8 @@ abstract class MessageQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildMessage|array|mixed the result, formatted by the current formatter */ @@ -227,8 +227,8 @@ abstract class MessageQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -249,24 +249,26 @@ abstract class MessageQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildMessageQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(MessageTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildMessageQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(MessageTableMap::ID, $keys, Criteria::IN); } @@ -280,11 +282,11 @@ abstract class MessageQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -320,9 +322,9 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%' * * - * @param string $name The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $name The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -350,11 +352,11 @@ abstract class MessageQuery extends ModelCriteria * $query->filterBySecured(array('min' => 12)); // WHERE secured > 12 * * - * @param mixed $secured The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $secured The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -390,9 +392,9 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%' * * - * @param string $textLayoutFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $textLayoutFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -419,9 +421,9 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%' * * - * @param string $textTemplateFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $textTemplateFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -448,9 +450,9 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%' * * - * @param string $htmlLayoutFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $htmlLayoutFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -477,9 +479,9 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%' * * - * @param string $htmlTemplateFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $htmlTemplateFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -507,13 +509,13 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -550,13 +552,13 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -593,11 +595,11 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -634,13 +636,13 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -676,9 +678,9 @@ abstract class MessageQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -699,8 +701,8 @@ abstract class MessageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\MessageI18n object * - * @param \Thelia\Model\MessageI18n|ObjectCollection $messageI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\MessageI18n|ObjectCollection $messageI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -722,8 +724,8 @@ abstract class MessageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the MessageI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildMessageQuery The current query, for fluid interface */ @@ -756,11 +758,11 @@ abstract class MessageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\MessageI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\MessageI18nQuery A secondary query class using the current class as primary query */ public function useMessageI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -772,8 +774,8 @@ abstract class MessageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\MessageVersion object * - * @param \Thelia\Model\MessageVersion|ObjectCollection $messageVersion the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\MessageVersion|ObjectCollection $messageVersion the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageQuery The current query, for fluid interface */ @@ -795,8 +797,8 @@ abstract class MessageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the MessageVersion relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildMessageQuery The current query, for fluid interface */ @@ -829,11 +831,11 @@ abstract class MessageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\MessageVersionQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\MessageVersionQuery A secondary query class using the current class as primary query */ public function useMessageVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -845,7 +847,7 @@ abstract class MessageQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildMessage $message Object to remove from the list of results + * @param ChildMessage $message Object to remove from the list of results * * @return ChildMessageQuery The current query, for fluid interface */ @@ -861,8 +863,8 @@ abstract class MessageQuery extends ModelCriteria /** * Deletes all rows from the message table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -893,13 +895,13 @@ abstract class MessageQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildMessage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildMessage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildMessage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -919,6 +921,7 @@ abstract class MessageQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + MessageTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -937,9 +940,9 @@ abstract class MessageQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -949,9 +952,9 @@ abstract class MessageQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -961,7 +964,7 @@ abstract class MessageQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -971,7 +974,7 @@ abstract class MessageQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -981,7 +984,7 @@ abstract class MessageQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -991,7 +994,7 @@ abstract class MessageQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1003,11 +1006,11 @@ abstract class MessageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1022,10 +1025,10 @@ abstract class MessageQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildMessageQuery The current query, for fluid interface + * @return ChildMessageQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1042,11 +1045,11 @@ abstract class MessageQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildMessageI18nQuery A secondary query class using the current class as primary query + * @return ChildMessageI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1062,7 +1065,7 @@ abstract class MessageQuery extends ModelCriteria * * @return boolean */ - public static function isVersioningEnabled() + static public function isVersioningEnabled() { return self::$isVersioningEnabled; } @@ -1070,7 +1073,7 @@ abstract class MessageQuery extends ModelCriteria /** * Enables versioning */ - public static function enableVersioning() + static public function enableVersioning() { self::$isVersioningEnabled = true; } @@ -1078,7 +1081,7 @@ abstract class MessageQuery extends ModelCriteria /** * Disables versioning */ - public static function disableVersioning() + static public function disableVersioning() { self::$isVersioningEnabled = false; } diff --git a/core/lib/Thelia/Model/Base/MessageVersion.php b/core/lib/Thelia/Model/Base/MessageVersion.php index 9e9050c5f..5fc5986bc 100644 --- a/core/lib/Thelia/Model/Base/MessageVersion.php +++ b/core/lib/Thelia/Model/Base/MessageVersion.php @@ -28,6 +28,7 @@ abstract class MessageVersion implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\MessageVersionTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -362,9 +363,9 @@ abstract class MessageVersion implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return MessageVersion The current object, for fluid interface */ @@ -414,70 +415,77 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [name] column value. * - * @return string + * @return string */ public function getName() { + return $this->name; } /** * Get the [secured] column value. * - * @return int + * @return int */ public function getSecured() { + return $this->secured; } /** * Get the [text_layout_file_name] column value. * - * @return string + * @return string */ public function getTextLayoutFileName() { + return $this->text_layout_file_name; } /** * Get the [text_template_file_name] column value. * - * @return string + * @return string */ public function getTextTemplateFileName() { + return $this->text_template_file_name; } /** * Get the [html_layout_file_name] column value. * - * @return string + * @return string */ public function getHtmlLayoutFileName() { + return $this->html_layout_file_name; } /** * Get the [html_template_file_name] column value. * - * @return string + * @return string */ public function getHtmlTemplateFileName() { + return $this->html_template_file_name; } @@ -485,8 +493,8 @@ abstract class MessageVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -505,8 +513,8 @@ abstract class MessageVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -524,10 +532,11 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -535,8 +544,8 @@ abstract class MessageVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -554,18 +563,19 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setId($v) { @@ -582,14 +592,15 @@ abstract class MessageVersion implements ActiveRecordInterface $this->aMessage = null; } + return $this; } // setId() /** * Set the value of [name] column. * - * @param string $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setName($v) { @@ -602,14 +613,15 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::NAME] = true; } + return $this; } // setName() /** * Set the value of [secured] column. * - * @param int $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setSecured($v) { @@ -622,14 +634,15 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::SECURED] = true; } + return $this; } // setSecured() /** * Set the value of [text_layout_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setTextLayoutFileName($v) { @@ -642,14 +655,15 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME] = true; } + return $this; } // setTextLayoutFileName() /** * Set the value of [text_template_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setTextTemplateFileName($v) { @@ -662,14 +676,15 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME] = true; } + return $this; } // setTextTemplateFileName() /** * Set the value of [html_layout_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setHtmlLayoutFileName($v) { @@ -682,14 +697,15 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::HTML_LAYOUT_FILE_NAME] = true; } + return $this; } // setHtmlLayoutFileName() /** * Set the value of [html_template_file_name] column. * - * @param string $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setHtmlTemplateFileName($v) { @@ -702,15 +718,16 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME] = true; } + return $this; } // setHtmlTemplateFileName() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -722,15 +739,16 @@ abstract class MessageVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -742,14 +760,15 @@ abstract class MessageVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setVersion($v) { @@ -762,15 +781,16 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -782,14 +802,15 @@ abstract class MessageVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -802,6 +823,7 @@ abstract class MessageVersion implements ActiveRecordInterface $this->modifiedColumns[MessageVersionTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -845,6 +867,7 @@ abstract class MessageVersion implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : MessageVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -929,10 +952,10 @@ abstract class MessageVersion implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -968,7 +991,7 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see MessageVersion::setDeleted() @@ -1011,8 +1034,8 @@ abstract class MessageVersion implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1062,8 +1085,8 @@ abstract class MessageVersion implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1106,7 +1129,7 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1215,7 +1238,7 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1231,12 +1254,12 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1250,7 +1273,7 @@ abstract class MessageVersion implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1304,12 +1327,12 @@ abstract class MessageVersion implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1351,12 +1374,12 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1370,8 +1393,8 @@ abstract class MessageVersion implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1429,8 +1452,8 @@ abstract class MessageVersion implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1472,6 +1495,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->isColumnModified(MessageVersionTableMap::VERSION)) $criteria->add(MessageVersionTableMap::VERSION, $this->version); if ($this->isColumnModified(MessageVersionTableMap::VERSION_CREATED_AT)) $criteria->add(MessageVersionTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(MessageVersionTableMap::VERSION_CREATED_BY)) $criteria->add(MessageVersionTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1509,7 +1533,7 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1524,6 +1548,7 @@ abstract class MessageVersion implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getVersion()); } @@ -1533,9 +1558,9 @@ abstract class MessageVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\MessageVersion (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\MessageVersion (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1565,8 +1590,8 @@ abstract class MessageVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\MessageVersion Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\MessageVersion Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1582,8 +1607,8 @@ abstract class MessageVersion implements ActiveRecordInterface /** * Declares an association between this object and a ChildMessage object. * - * @param ChildMessage $v - * @return \Thelia\Model\MessageVersion The current object (for fluent API support) + * @param ChildMessage $v + * @return \Thelia\Model\MessageVersion The current object (for fluent API support) * @throws PropelException */ public function setMessage(ChildMessage $v = null) @@ -1602,14 +1627,16 @@ abstract class MessageVersion implements ActiveRecordInterface $v->addMessageVersion($this); } + return $this; } + /** * Get the associated ChildMessage object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildMessage The associated ChildMessage object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildMessage The associated ChildMessage object. * @throws PropelException */ public function getMessage(ConnectionInterface $con = null) @@ -1660,7 +1687,7 @@ abstract class MessageVersion implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/MessageVersionQuery.php b/core/lib/Thelia/Model/Base/MessageVersionQuery.php index aaffbf1a7..5a2a15a03 100644 --- a/core/lib/Thelia/Model/Base/MessageVersionQuery.php +++ b/core/lib/Thelia/Model/Base/MessageVersionQuery.php @@ -91,9 +91,9 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\MessageVersionQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\MessageVersion', $modelAlias = null) { @@ -103,8 +103,8 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Returns a new ChildMessageVersionQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildMessageVersionQuery */ @@ -164,10 +164,10 @@ abstract class MessageVersionQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildMessageVersion A model object, or null if the key is not found + * @return ChildMessageVersion A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -195,8 +195,8 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildMessageVersion|array|mixed the result, formatted by the current formatter */ @@ -216,8 +216,8 @@ abstract class MessageVersionQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -238,7 +238,7 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -253,7 +253,7 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -284,11 +284,11 @@ abstract class MessageVersionQuery extends ModelCriteria * * @see filterByMessage() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -324,9 +324,9 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%' * * - * @param string $name The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $name The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -354,11 +354,11 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterBySecured(array('min' => 12)); // WHERE secured > 12 * * - * @param mixed $secured The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $secured The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -394,9 +394,9 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%' * * - * @param string $textLayoutFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $textLayoutFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -423,9 +423,9 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%' * * - * @param string $textTemplateFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $textTemplateFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -452,9 +452,9 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%' * * - * @param string $htmlLayoutFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $htmlLayoutFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -481,9 +481,9 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%' * * - * @param string $htmlTemplateFileName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $htmlTemplateFileName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -511,13 +511,13 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -554,13 +554,13 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -597,11 +597,11 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -638,13 +638,13 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -680,9 +680,9 @@ abstract class MessageVersionQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -703,8 +703,8 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Message object * - * @param \Thelia\Model\Message|ObjectCollection $message The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Message|ObjectCollection $message The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -728,8 +728,8 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Message relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -762,11 +762,11 @@ abstract class MessageVersionQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\MessageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\MessageQuery A secondary query class using the current class as primary query */ public function useMessageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -778,7 +778,7 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildMessageVersion $messageVersion Object to remove from the list of results + * @param ChildMessageVersion $messageVersion Object to remove from the list of results * * @return ChildMessageVersionQuery The current query, for fluid interface */ @@ -796,8 +796,8 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Deletes all rows from the message_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -828,13 +828,13 @@ abstract class MessageVersionQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildMessageVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildMessageVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildMessageVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -854,6 +854,7 @@ abstract class MessageVersionQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + MessageVersionTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/Module.php b/core/lib/Thelia/Model/Base/Module.php index 9b2950a23..5635c3028 100644 --- a/core/lib/Thelia/Model/Base/Module.php +++ b/core/lib/Thelia/Model/Base/Module.php @@ -38,6 +38,7 @@ abstract class Module implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ModuleTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -415,9 +416,9 @@ abstract class Module implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Module The current object, for fluid interface */ @@ -467,60 +468,66 @@ abstract class Module implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } /** * Get the [type] column value. * - * @return int + * @return int */ public function getType() { + return $this->type; } /** * Get the [activate] column value. * - * @return int + * @return int */ public function getActivate() { + return $this->activate; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } /** * Get the [full_namespace] column value. * - * @return string + * @return string */ public function getFullNamespace() { + return $this->full_namespace; } @@ -528,8 +535,8 @@ abstract class Module implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -548,8 +555,8 @@ abstract class Module implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -567,8 +574,8 @@ abstract class Module implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setId($v) { @@ -581,14 +588,15 @@ abstract class Module implements ActiveRecordInterface $this->modifiedColumns[ModuleTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setCode($v) { @@ -601,14 +609,15 @@ abstract class Module implements ActiveRecordInterface $this->modifiedColumns[ModuleTableMap::CODE] = true; } + return $this; } // setCode() /** * Set the value of [type] column. * - * @param int $v new value - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setType($v) { @@ -621,14 +630,15 @@ abstract class Module implements ActiveRecordInterface $this->modifiedColumns[ModuleTableMap::TYPE] = true; } + return $this; } // setType() /** * Set the value of [activate] column. * - * @param int $v new value - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setActivate($v) { @@ -641,14 +651,15 @@ abstract class Module implements ActiveRecordInterface $this->modifiedColumns[ModuleTableMap::ACTIVATE] = true; } + return $this; } // setActivate() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setPosition($v) { @@ -661,14 +672,15 @@ abstract class Module implements ActiveRecordInterface $this->modifiedColumns[ModuleTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Set the value of [full_namespace] column. * - * @param string $v new value - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setFullNamespace($v) { @@ -681,15 +693,16 @@ abstract class Module implements ActiveRecordInterface $this->modifiedColumns[ModuleTableMap::FULL_NAMESPACE] = true; } + return $this; } // setFullNamespace() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -701,15 +714,16 @@ abstract class Module implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -721,6 +735,7 @@ abstract class Module implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -827,10 +842,10 @@ abstract class Module implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -877,7 +892,7 @@ abstract class Module implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Module::setDeleted() @@ -920,8 +935,8 @@ abstract class Module implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -982,8 +997,8 @@ abstract class Module implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1116,7 +1131,7 @@ abstract class Module implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1212,7 +1227,7 @@ abstract class Module implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1228,12 +1243,12 @@ abstract class Module implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1247,7 +1262,7 @@ abstract class Module implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1289,12 +1304,12 @@ abstract class Module implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1347,12 +1362,12 @@ abstract class Module implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1366,8 +1381,8 @@ abstract class Module implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1413,8 +1428,8 @@ abstract class Module implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1448,6 +1463,7 @@ abstract class Module implements ActiveRecordInterface if ($this->isColumnModified(ModuleTableMap::FULL_NAMESPACE)) $criteria->add(ModuleTableMap::FULL_NAMESPACE, $this->full_namespace); if ($this->isColumnModified(ModuleTableMap::CREATED_AT)) $criteria->add(ModuleTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ModuleTableMap::UPDATED_AT)) $criteria->add(ModuleTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1469,7 +1485,7 @@ abstract class Module implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1479,7 +1495,7 @@ abstract class Module implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1493,6 +1509,7 @@ abstract class Module implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1502,9 +1519,9 @@ abstract class Module implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Module (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Module (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1574,8 +1591,8 @@ abstract class Module implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Module Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Module Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1594,7 +1611,7 @@ abstract class Module implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1648,8 +1665,8 @@ abstract class Module implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1671,8 +1688,8 @@ abstract class Module implements ActiveRecordInterface * If this ChildModule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -1728,14 +1745,15 @@ abstract class Module implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $ordersRelatedByPaymentModuleId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildModule The current object (for fluent API support) + * @param Collection $ordersRelatedByPaymentModuleId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildModule The current object (for fluent API support) */ public function setOrdersRelatedByPaymentModuleId(Collection $ordersRelatedByPaymentModuleId, ConnectionInterface $con = null) { $ordersRelatedByPaymentModuleIdToDelete = $this->getOrdersRelatedByPaymentModuleId(new Criteria(), $con)->diff($ordersRelatedByPaymentModuleId); + $this->ordersRelatedByPaymentModuleIdScheduledForDeletion = $ordersRelatedByPaymentModuleIdToDelete; foreach ($ordersRelatedByPaymentModuleIdToDelete as $orderRelatedByPaymentModuleIdRemoved) { @@ -1756,10 +1774,10 @@ abstract class Module implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrdersRelatedByPaymentModuleId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1791,8 +1809,8 @@ abstract class Module implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function addOrderRelatedByPaymentModuleId(ChildOrder $l) { @@ -1819,7 +1837,7 @@ abstract class Module implements ActiveRecordInterface /** * @param OrderRelatedByPaymentModuleId $orderRelatedByPaymentModuleId The orderRelatedByPaymentModuleId object to remove. - * @return ChildModule The current object (for fluent API support) + * @return ChildModule The current object (for fluent API support) */ public function removeOrderRelatedByPaymentModuleId($orderRelatedByPaymentModuleId) { @@ -1836,6 +1854,7 @@ abstract class Module implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1847,9 +1866,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByPaymentModuleIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1860,6 +1879,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByPaymentModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1871,9 +1891,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByPaymentModuleIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1884,6 +1904,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByPaymentModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1895,9 +1916,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByPaymentModuleIdJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1908,6 +1929,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByPaymentModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1919,9 +1941,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByPaymentModuleIdJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1932,6 +1954,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByPaymentModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1943,9 +1966,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByPaymentModuleIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1956,6 +1979,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByPaymentModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1967,9 +1991,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByPaymentModuleIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2009,8 +2033,8 @@ abstract class Module implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2032,8 +2056,8 @@ abstract class Module implements ActiveRecordInterface * If this ChildModule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -2089,14 +2113,15 @@ abstract class Module implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $ordersRelatedByDeliveryModuleId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildModule The current object (for fluent API support) + * @param Collection $ordersRelatedByDeliveryModuleId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildModule The current object (for fluent API support) */ public function setOrdersRelatedByDeliveryModuleId(Collection $ordersRelatedByDeliveryModuleId, ConnectionInterface $con = null) { $ordersRelatedByDeliveryModuleIdToDelete = $this->getOrdersRelatedByDeliveryModuleId(new Criteria(), $con)->diff($ordersRelatedByDeliveryModuleId); + $this->ordersRelatedByDeliveryModuleIdScheduledForDeletion = $ordersRelatedByDeliveryModuleIdToDelete; foreach ($ordersRelatedByDeliveryModuleIdToDelete as $orderRelatedByDeliveryModuleIdRemoved) { @@ -2117,10 +2142,10 @@ abstract class Module implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrdersRelatedByDeliveryModuleId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2152,8 +2177,8 @@ abstract class Module implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function addOrderRelatedByDeliveryModuleId(ChildOrder $l) { @@ -2180,7 +2205,7 @@ abstract class Module implements ActiveRecordInterface /** * @param OrderRelatedByDeliveryModuleId $orderRelatedByDeliveryModuleId The orderRelatedByDeliveryModuleId object to remove. - * @return ChildModule The current object (for fluent API support) + * @return ChildModule The current object (for fluent API support) */ public function removeOrderRelatedByDeliveryModuleId($orderRelatedByDeliveryModuleId) { @@ -2197,6 +2222,7 @@ abstract class Module implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2208,9 +2234,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryModuleIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2221,6 +2247,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2232,9 +2259,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryModuleIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2245,6 +2272,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2256,9 +2284,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryModuleIdJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2269,6 +2297,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2280,9 +2309,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryModuleIdJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2293,6 +2322,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2304,9 +2334,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryModuleIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2317,6 +2347,7 @@ abstract class Module implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryModuleId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2328,9 +2359,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryModuleIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2370,8 +2401,8 @@ abstract class Module implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2393,8 +2424,8 @@ abstract class Module implements ActiveRecordInterface * If this ChildModule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAreaDeliveryModule[] List of ChildAreaDeliveryModule objects * @throws PropelException */ @@ -2450,14 +2481,15 @@ abstract class Module implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $areaDeliveryModules A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildModule The current object (for fluent API support) + * @param Collection $areaDeliveryModules A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildModule The current object (for fluent API support) */ public function setAreaDeliveryModules(Collection $areaDeliveryModules, ConnectionInterface $con = null) { $areaDeliveryModulesToDelete = $this->getAreaDeliveryModules(new Criteria(), $con)->diff($areaDeliveryModules); + $this->areaDeliveryModulesScheduledForDeletion = $areaDeliveryModulesToDelete; foreach ($areaDeliveryModulesToDelete as $areaDeliveryModuleRemoved) { @@ -2478,10 +2510,10 @@ abstract class Module implements ActiveRecordInterface /** * Returns the number of related AreaDeliveryModule objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AreaDeliveryModule objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AreaDeliveryModule objects. * @throws PropelException */ public function countAreaDeliveryModules(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2513,8 +2545,8 @@ abstract class Module implements ActiveRecordInterface * Method called to associate a ChildAreaDeliveryModule object to this object * through the ChildAreaDeliveryModule foreign key attribute. * - * @param ChildAreaDeliveryModule $l ChildAreaDeliveryModule - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param ChildAreaDeliveryModule $l ChildAreaDeliveryModule + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function addAreaDeliveryModule(ChildAreaDeliveryModule $l) { @@ -2541,7 +2573,7 @@ abstract class Module implements ActiveRecordInterface /** * @param AreaDeliveryModule $areaDeliveryModule The areaDeliveryModule object to remove. - * @return ChildModule The current object (for fluent API support) + * @return ChildModule The current object (for fluent API support) */ public function removeAreaDeliveryModule($areaDeliveryModule) { @@ -2558,6 +2590,7 @@ abstract class Module implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2569,9 +2602,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAreaDeliveryModule[] List of ChildAreaDeliveryModule objects */ public function getAreaDeliveryModulesJoinArea($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2611,8 +2644,8 @@ abstract class Module implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2634,8 +2667,8 @@ abstract class Module implements ActiveRecordInterface * If this ChildModule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProfileModule[] List of ChildProfileModule objects * @throws PropelException */ @@ -2691,14 +2724,15 @@ abstract class Module implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $profileModules A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildModule The current object (for fluent API support) + * @param Collection $profileModules A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildModule The current object (for fluent API support) */ public function setProfileModules(Collection $profileModules, ConnectionInterface $con = null) { $profileModulesToDelete = $this->getProfileModules(new Criteria(), $con)->diff($profileModules); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2722,10 +2756,10 @@ abstract class Module implements ActiveRecordInterface /** * Returns the number of related ProfileModule objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProfileModule objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProfileModule objects. * @throws PropelException */ public function countProfileModules(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2757,8 +2791,8 @@ abstract class Module implements ActiveRecordInterface * Method called to associate a ChildProfileModule object to this object * through the ChildProfileModule foreign key attribute. * - * @param ChildProfileModule $l ChildProfileModule - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param ChildProfileModule $l ChildProfileModule + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function addProfileModule(ChildProfileModule $l) { @@ -2785,7 +2819,7 @@ abstract class Module implements ActiveRecordInterface /** * @param ProfileModule $profileModule The profileModule object to remove. - * @return ChildModule The current object (for fluent API support) + * @return ChildModule The current object (for fluent API support) */ public function removeProfileModule($profileModule) { @@ -2802,6 +2836,7 @@ abstract class Module implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2813,9 +2848,9 @@ abstract class Module implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Module. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProfileModule[] List of ChildProfileModule objects */ public function getProfileModulesJoinProfile($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2855,8 +2890,8 @@ abstract class Module implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2878,8 +2913,8 @@ abstract class Module implements ActiveRecordInterface * If this ChildModule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildModuleImage[] List of ChildModuleImage objects * @throws PropelException */ @@ -2935,14 +2970,15 @@ abstract class Module implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $moduleImages A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildModule The current object (for fluent API support) + * @param Collection $moduleImages A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildModule The current object (for fluent API support) */ public function setModuleImages(Collection $moduleImages, ConnectionInterface $con = null) { $moduleImagesToDelete = $this->getModuleImages(new Criteria(), $con)->diff($moduleImages); + $this->moduleImagesScheduledForDeletion = $moduleImagesToDelete; foreach ($moduleImagesToDelete as $moduleImageRemoved) { @@ -2963,10 +2999,10 @@ abstract class Module implements ActiveRecordInterface /** * Returns the number of related ModuleImage objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ModuleImage objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ModuleImage objects. * @throws PropelException */ public function countModuleImages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2998,8 +3034,8 @@ abstract class Module implements ActiveRecordInterface * Method called to associate a ChildModuleImage object to this object * through the ChildModuleImage foreign key attribute. * - * @param ChildModuleImage $l ChildModuleImage - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param ChildModuleImage $l ChildModuleImage + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function addModuleImage(ChildModuleImage $l) { @@ -3072,8 +3108,8 @@ abstract class Module implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -3095,8 +3131,8 @@ abstract class Module implements ActiveRecordInterface * If this ChildModule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildModuleI18n[] List of ChildModuleI18n objects * @throws PropelException */ @@ -3152,14 +3188,15 @@ abstract class Module implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $moduleI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildModule The current object (for fluent API support) + * @param Collection $moduleI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildModule The current object (for fluent API support) */ public function setModuleI18ns(Collection $moduleI18ns, ConnectionInterface $con = null) { $moduleI18nsToDelete = $this->getModuleI18ns(new Criteria(), $con)->diff($moduleI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -3183,10 +3220,10 @@ abstract class Module implements ActiveRecordInterface /** * Returns the number of related ModuleI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ModuleI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ModuleI18n objects. * @throws PropelException */ public function countModuleI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3218,8 +3255,8 @@ abstract class Module implements ActiveRecordInterface * Method called to associate a ChildModuleI18n object to this object * through the ChildModuleI18n foreign key attribute. * - * @param ChildModuleI18n $l ChildModuleI18n - * @return \Thelia\Model\Module The current object (for fluent API support) + * @param ChildModuleI18n $l ChildModuleI18n + * @return \Thelia\Model\Module The current object (for fluent API support) */ public function addModuleI18n(ChildModuleI18n $l) { @@ -3249,7 +3286,7 @@ abstract class Module implements ActiveRecordInterface } /** - * @param ModuleI18n $moduleI18n The moduleI18n object to remove. + * @param ModuleI18n $moduleI18n The moduleI18n object to remove. * @return ChildModule The current object (for fluent API support) */ public function removeModuleI18n($moduleI18n) @@ -3294,7 +3331,7 @@ abstract class Module implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -3358,7 +3395,7 @@ abstract class Module implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildModule The current object (for fluent API support) + * @return ChildModule The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -3372,9 +3409,9 @@ abstract class Module implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildModule The current object (for fluent API support) + * @return ChildModule The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -3386,7 +3423,7 @@ abstract class Module implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -3396,8 +3433,8 @@ abstract class Module implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildModuleI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -3430,10 +3467,10 @@ abstract class Module implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildModule The current object (for fluent API support) + * @return ChildModule The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -3458,7 +3495,7 @@ abstract class Module implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildModuleI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -3466,6 +3503,7 @@ abstract class Module implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -3476,6 +3514,7 @@ abstract class Module implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -3488,6 +3527,7 @@ abstract class Module implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -3498,6 +3538,7 @@ abstract class Module implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -3510,6 +3551,7 @@ abstract class Module implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -3520,6 +3562,7 @@ abstract class Module implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -3532,6 +3575,7 @@ abstract class Module implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -3542,6 +3586,7 @@ abstract class Module implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -3630,6 +3675,7 @@ abstract class Module implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ModuleI18n.php b/core/lib/Thelia/Model/Base/ModuleI18n.php index c7f101510..949bdec16 100644 --- a/core/lib/Thelia/Model/Base/ModuleI18n.php +++ b/core/lib/Thelia/Model/Base/ModuleI18n.php @@ -26,6 +26,7 @@ abstract class ModuleI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ModuleI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ModuleI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ModuleI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ModuleI18n implements ActiveRecordInterface $this->aModule = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ModuleI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ModuleI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ModuleI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ModuleI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ModuleI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ModuleI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ModuleI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ModuleI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ModuleI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ModuleI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ModuleI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ModuleI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ModuleI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ModuleI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ModuleI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ModuleI18n implements ActiveRecordInterface if ($this->isColumnModified(ModuleI18nTableMap::DESCRIPTION)) $criteria->add(ModuleI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ModuleI18nTableMap::CHAPO)) $criteria->add(ModuleI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ModuleI18nTableMap::POSTSCRIPTUM)) $criteria->add(ModuleI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ModuleI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ModuleI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ModuleI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ModuleI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ModuleI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ModuleI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ModuleI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ModuleI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildModule object. * - * @param ChildModule $v - * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) + * @param ChildModule $v + * @return \Thelia\Model\ModuleI18n The current object (for fluent API support) * @throws PropelException */ public function setModule(ChildModule $v = null) @@ -1231,14 +1247,16 @@ abstract class ModuleI18n implements ActiveRecordInterface $v->addModuleI18n($this); } + return $this; } + /** * Get the associated ChildModule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildModule The associated ChildModule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildModule The associated ChildModule object. * @throws PropelException */ public function getModule(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ModuleI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ModuleI18nQuery.php b/core/lib/Thelia/Model/Base/ModuleI18nQuery.php index c5640bdbe..9bf96ccd5 100644 --- a/core/lib/Thelia/Model/Base/ModuleI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ModuleI18nQuery.php @@ -67,9 +67,9 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ModuleI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ModuleI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Returns a new ChildModuleI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildModuleI18nQuery */ @@ -140,10 +140,10 @@ abstract class ModuleI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildModuleI18n A model object, or null if the key is not found + * @return ChildModuleI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildModuleI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ModuleI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ModuleI18nQuery extends ModelCriteria * * @see filterByModule() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ModuleI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ModuleI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ModuleI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ModuleI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ModuleI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Module object * - * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Module relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ModuleI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query */ public function useModuleQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildModuleI18n $moduleI18n Object to remove from the list of results + * @param ChildModuleI18n $moduleI18n Object to remove from the list of results * * @return ChildModuleI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Deletes all rows from the module_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ModuleI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildModuleI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildModuleI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildModuleI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ModuleI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ModuleI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ModuleImage.php b/core/lib/Thelia/Model/Base/ModuleImage.php index 51f767cb6..f31c11d39 100644 --- a/core/lib/Thelia/Model/Base/ModuleImage.php +++ b/core/lib/Thelia/Model/Base/ModuleImage.php @@ -32,6 +32,7 @@ abstract class ModuleImage implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ModuleImageTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class ModuleImage implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ModuleImage The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [module_id] column value. * - * @return int + * @return int */ public function getModuleId() { + return $this->module_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class ModuleImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class ModuleImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class ModuleImage implements ActiveRecordInterface $this->modifiedColumns[ModuleImageTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [module_id] column. * - * @param int $v new value - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) */ public function setModuleId($v) { @@ -512,14 +518,15 @@ abstract class ModuleImage implements ActiveRecordInterface $this->aModule = null; } + return $this; } // setModuleId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class ModuleImage implements ActiveRecordInterface $this->modifiedColumns[ModuleImageTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class ModuleImage implements ActiveRecordInterface $this->modifiedColumns[ModuleImageTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class ModuleImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class ModuleImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class ModuleImage implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ModuleImage::setDeleted() @@ -779,8 +790,8 @@ abstract class ModuleImage implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class ModuleImage implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class ModuleImage implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class ModuleImage implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class ModuleImage implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class ModuleImage implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class ModuleImage implements ActiveRecordInterface if ($this->isColumnModified(ModuleImageTableMap::POSITION)) $criteria->add(ModuleImageTableMap::POSITION, $this->position); if ($this->isColumnModified(ModuleImageTableMap::CREATED_AT)) $criteria->add(ModuleImageTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ModuleImageTableMap::UPDATED_AT)) $criteria->add(ModuleImageTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class ModuleImage implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class ModuleImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ModuleImage (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ModuleImage (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class ModuleImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ModuleImage Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ModuleImage Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Declares an association between this object and a ChildModule object. * - * @param ChildModule $v - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param ChildModule $v + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) * @throws PropelException */ public function setModule(ChildModule $v = null) @@ -1323,14 +1336,16 @@ abstract class ModuleImage implements ActiveRecordInterface $v->addModuleImage($this); } + return $this; } + /** * Get the associated ChildModule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildModule The associated ChildModule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildModule The associated ChildModule object. * @throws PropelException */ public function getModule(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class ModuleImage implements ActiveRecordInterface return $this->aModule; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class ModuleImage implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class ModuleImage implements ActiveRecordInterface * If this ChildModuleImage is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildModuleImageI18n[] List of ChildModuleImageI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class ModuleImage implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $moduleImageI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildModuleImage The current object (for fluent API support) + * @param Collection $moduleImageI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildModuleImage The current object (for fluent API support) */ public function setModuleImageI18ns(Collection $moduleImageI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Returns the number of related ModuleImageI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ModuleImageI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ModuleImageI18n objects. * @throws PropelException */ public function countModuleImageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class ModuleImage implements ActiveRecordInterface * Method called to associate a ChildModuleImageI18n object to this object * through the ChildModuleImageI18n foreign key attribute. * - * @param ChildModuleImageI18n $l ChildModuleImageI18n - * @return \Thelia\Model\ModuleImage The current object (for fluent API support) + * @param ChildModuleImageI18n $l ChildModuleImageI18n + * @return \Thelia\Model\ModuleImage The current object (for fluent API support) */ public function addModuleImageI18n(ChildModuleImageI18n $l) { @@ -1571,7 +1587,7 @@ abstract class ModuleImage implements ActiveRecordInterface } /** - * @param ModuleImageI18n $moduleImageI18n The moduleImageI18n object to remove. + * @param ModuleImageI18n $moduleImageI18n The moduleImageI18n object to remove. * @return ChildModuleImage The current object (for fluent API support) */ public function removeModuleImageI18n($moduleImageI18n) @@ -1614,7 +1630,7 @@ abstract class ModuleImage implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildModuleImage The current object (for fluent API support) + * @return ChildModuleImage The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildModuleImage The current object (for fluent API support) + * @return ChildModuleImage The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildModuleImageI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildModuleImage The current object (for fluent API support) + * @return ChildModuleImage The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class ModuleImage implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildModuleImageI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/ModuleImageI18n.php b/core/lib/Thelia/Model/Base/ModuleImageI18n.php index 7ba0cac68..0e7645470 100644 --- a/core/lib/Thelia/Model/Base/ModuleImageI18n.php +++ b/core/lib/Thelia/Model/Base/ModuleImageI18n.php @@ -26,6 +26,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ModuleImageI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ModuleImageI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ModuleImageI18n implements ActiveRecordInterface $this->aModuleImage = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ModuleImageI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleImageI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ModuleImageI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleImageI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ModuleImageI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleImageI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ModuleImageI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleImageI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface $this->modifiedColumns[ModuleImageI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ModuleImageI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ModuleImageI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface if ($this->isColumnModified(ModuleImageI18nTableMap::DESCRIPTION)) $criteria->add(ModuleImageI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ModuleImageI18nTableMap::CHAPO)) $criteria->add(ModuleImageI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ModuleImageI18nTableMap::POSTSCRIPTUM)) $criteria->add(ModuleImageI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ModuleImageI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ModuleImageI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ModuleImageI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ModuleImageI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ModuleImageI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildModuleImage object. * - * @param ChildModuleImage $v - * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) + * @param ChildModuleImage $v + * @return \Thelia\Model\ModuleImageI18n The current object (for fluent API support) * @throws PropelException */ public function setModuleImage(ChildModuleImage $v = null) @@ -1231,14 +1247,16 @@ abstract class ModuleImageI18n implements ActiveRecordInterface $v->addModuleImageI18n($this); } + return $this; } + /** * Get the associated ChildModuleImage object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildModuleImage The associated ChildModuleImage object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildModuleImage The associated ChildModuleImage object. * @throws PropelException */ public function getModuleImage(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ModuleImageI18nQuery.php b/core/lib/Thelia/Model/Base/ModuleImageI18nQuery.php index 520de8aec..50e7e61dd 100644 --- a/core/lib/Thelia/Model/Base/ModuleImageI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ModuleImageI18nQuery.php @@ -67,9 +67,9 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ModuleImageI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ModuleImageI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Returns a new ChildModuleImageI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildModuleImageI18nQuery */ @@ -140,10 +140,10 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildModuleImageI18n A model object, or null if the key is not found + * @return ChildModuleImageI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildModuleImageI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * * @see filterByModuleImage() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ModuleImage object * * @param \Thelia\Model\ModuleImage|ObjectCollection $moduleImage The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ModuleImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ModuleImageI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleImageQuery A secondary query class using the current class as primary query */ public function useModuleImageQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildModuleImageI18n $moduleImageI18n Object to remove from the list of results + * @param ChildModuleImageI18n $moduleImageI18n Object to remove from the list of results * * @return ChildModuleImageI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Deletes all rows from the module_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ModuleImageI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildModuleImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildModuleImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildModuleImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ModuleImageI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ModuleImageI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ModuleImageQuery.php b/core/lib/Thelia/Model/Base/ModuleImageQuery.php index 339d1afb8..e5813c649 100644 --- a/core/lib/Thelia/Model/Base/ModuleImageQuery.php +++ b/core/lib/Thelia/Model/Base/ModuleImageQuery.php @@ -72,9 +72,9 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ModuleImageQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ModuleImage', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Returns a new ChildModuleImageQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildModuleImageQuery */ @@ -114,7 +114,7 @@ abstract class ModuleImageQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildModuleImage|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class ModuleImageQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildModuleImage A model object, or null if the key is not found + * @return ChildModuleImage A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildModuleImage|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class ModuleImageQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildModuleImageQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ModuleImageTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildModuleImageQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ModuleImageTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class ModuleImageQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class ModuleImageQuery extends ModelCriteria * * @see filterByModule() * - * @param mixed $moduleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $moduleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class ModuleImageQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class ModuleImageQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class ModuleImageQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class ModuleImageQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Module object * - * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Module relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class ModuleImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query */ public function useModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ModuleImageI18n object * - * @param \Thelia\Model\ModuleImageI18n|ObjectCollection $moduleImageI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ModuleImageI18n|ObjectCollection $moduleImageI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ModuleImageI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class ModuleImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleImageI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleImageI18nQuery A secondary query class using the current class as primary query */ public function useModuleImageI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildModuleImage $moduleImage Object to remove from the list of results + * @param ChildModuleImage $moduleImage Object to remove from the list of results * * @return ChildModuleImageQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Deletes all rows from the module_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildModuleImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildModuleImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildModuleImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class ModuleImageQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ModuleImageTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class ModuleImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class ModuleImageQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildModuleImageQuery The current query, for fluid interface + * @return ChildModuleImageQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class ModuleImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildModuleImageI18nQuery A secondary query class using the current class as primary query + * @return ChildModuleImageI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/ModuleQuery.php b/core/lib/Thelia/Model/Base/ModuleQuery.php index d7f8cefb4..006bfbe7a 100644 --- a/core/lib/Thelia/Model/Base/ModuleQuery.php +++ b/core/lib/Thelia/Model/Base/ModuleQuery.php @@ -96,9 +96,9 @@ abstract class ModuleQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ModuleQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Module', $modelAlias = null) { @@ -108,8 +108,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Returns a new ChildModuleQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildModuleQuery */ @@ -138,7 +138,7 @@ abstract class ModuleQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildModule|array|mixed the result, formatted by the current formatter @@ -169,10 +169,10 @@ abstract class ModuleQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildModule A model object, or null if the key is not found + * @return ChildModule A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -199,8 +199,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildModule|array|mixed the result, formatted by the current formatter */ @@ -220,8 +220,8 @@ abstract class ModuleQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -242,24 +242,26 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildModuleQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ModuleTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildModuleQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ModuleTableMap::ID, $keys, Criteria::IN); } @@ -273,11 +275,11 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -313,9 +315,9 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -343,11 +345,11 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterByType(array('min' => 12)); // WHERE type > 12 * * - * @param mixed $type The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $type The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -384,11 +386,11 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterByActivate(array('min' => 12)); // WHERE activate > 12 * * - * @param mixed $activate The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $activate The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -425,11 +427,11 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -465,9 +467,9 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterByFullNamespace('%fooValue%'); // WHERE full_namespace LIKE '%fooValue%' * * - * @param string $fullNamespace The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $fullNamespace The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -495,13 +497,13 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -538,13 +540,13 @@ abstract class ModuleQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -574,8 +576,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -597,8 +599,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderRelatedByPaymentModuleId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleQuery The current query, for fluid interface */ @@ -631,11 +633,11 @@ abstract class ModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderRelatedByPaymentModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -647,8 +649,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -670,8 +672,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderRelatedByDeliveryModuleId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleQuery The current query, for fluid interface */ @@ -704,11 +706,11 @@ abstract class ModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderRelatedByDeliveryModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -720,8 +722,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AreaDeliveryModule object * - * @param \Thelia\Model\AreaDeliveryModule|ObjectCollection $areaDeliveryModule the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AreaDeliveryModule|ObjectCollection $areaDeliveryModule the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -743,8 +745,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AreaDeliveryModule relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleQuery The current query, for fluid interface */ @@ -777,11 +779,11 @@ abstract class ModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AreaDeliveryModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AreaDeliveryModuleQuery A secondary query class using the current class as primary query */ public function useAreaDeliveryModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -793,8 +795,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProfileModule object * - * @param \Thelia\Model\ProfileModule|ObjectCollection $profileModule the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProfileModule|ObjectCollection $profileModule the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -816,8 +818,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProfileModule relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleQuery The current query, for fluid interface */ @@ -850,11 +852,11 @@ abstract class ModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileModuleQuery A secondary query class using the current class as primary query */ public function useProfileModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -866,8 +868,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ModuleImage object * - * @param \Thelia\Model\ModuleImage|ObjectCollection $moduleImage the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ModuleImage|ObjectCollection $moduleImage the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -889,8 +891,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ModuleImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleQuery The current query, for fluid interface */ @@ -923,11 +925,11 @@ abstract class ModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleImageQuery A secondary query class using the current class as primary query */ public function useModuleImageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -939,8 +941,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ModuleI18n object * - * @param \Thelia\Model\ModuleI18n|ObjectCollection $moduleI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ModuleI18n|ObjectCollection $moduleI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ @@ -962,8 +964,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ModuleI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildModuleQuery The current query, for fluid interface */ @@ -996,11 +998,11 @@ abstract class ModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleI18nQuery A secondary query class using the current class as primary query */ public function useModuleI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -1012,7 +1014,7 @@ abstract class ModuleQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildModule $module Object to remove from the list of results + * @param ChildModule $module Object to remove from the list of results * * @return ChildModuleQuery The current query, for fluid interface */ @@ -1028,8 +1030,8 @@ abstract class ModuleQuery extends ModelCriteria /** * Deletes all rows from the module table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1060,13 +1062,13 @@ abstract class ModuleQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildModule or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildModule object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildModule object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1086,6 +1088,7 @@ abstract class ModuleQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ModuleTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1104,9 +1107,9 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1116,9 +1119,9 @@ abstract class ModuleQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1128,7 +1131,7 @@ abstract class ModuleQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1138,7 +1141,7 @@ abstract class ModuleQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1148,7 +1151,7 @@ abstract class ModuleQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1158,7 +1161,7 @@ abstract class ModuleQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1170,11 +1173,11 @@ abstract class ModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1189,10 +1192,10 @@ abstract class ModuleQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildModuleQuery The current query, for fluid interface + * @return ChildModuleQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1209,11 +1212,11 @@ abstract class ModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildModuleI18nQuery A secondary query class using the current class as primary query + * @return ChildModuleI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/Newsletter.php b/core/lib/Thelia/Model/Base/Newsletter.php index 0ef493955..7c9ca03a6 100644 --- a/core/lib/Thelia/Model/Base/Newsletter.php +++ b/core/lib/Thelia/Model/Base/Newsletter.php @@ -9,6 +9,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\ModelCriteria; use Propel\Runtime\ActiveRecord\ActiveRecordInterface; +use Propel\Runtime\Collection\Collection; use Propel\Runtime\Connection\ConnectionInterface; use Propel\Runtime\Exception\BadMethodCallException; use Propel\Runtime\Exception\PropelException; @@ -26,6 +27,7 @@ abstract class Newsletter implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\NewsletterTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -311,9 +313,9 @@ abstract class Newsletter implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Newsletter The current object, for fluid interface */ @@ -363,50 +365,55 @@ abstract class Newsletter implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [email] column value. * - * @return string + * @return string */ public function getEmail() { + return $this->email; } /** * Get the [firstname] column value. * - * @return string + * @return string */ public function getFirstname() { + return $this->firstname; } /** * Get the [lastname] column value. * - * @return string + * @return string */ public function getLastname() { + return $this->lastname; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } @@ -414,8 +421,8 @@ abstract class Newsletter implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -434,8 +441,8 @@ abstract class Newsletter implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -453,8 +460,8 @@ abstract class Newsletter implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Newsletter The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Newsletter The current object (for fluent API support) */ public function setId($v) { @@ -467,14 +474,15 @@ abstract class Newsletter implements ActiveRecordInterface $this->modifiedColumns[NewsletterTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [email] column. * - * @param string $v new value - * @return \Thelia\Model\Newsletter The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Newsletter The current object (for fluent API support) */ public function setEmail($v) { @@ -487,14 +495,15 @@ abstract class Newsletter implements ActiveRecordInterface $this->modifiedColumns[NewsletterTableMap::EMAIL] = true; } + return $this; } // setEmail() /** * Set the value of [firstname] column. * - * @param string $v new value - * @return \Thelia\Model\Newsletter The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Newsletter The current object (for fluent API support) */ public function setFirstname($v) { @@ -507,14 +516,15 @@ abstract class Newsletter implements ActiveRecordInterface $this->modifiedColumns[NewsletterTableMap::FIRSTNAME] = true; } + return $this; } // setFirstname() /** * Set the value of [lastname] column. * - * @param string $v new value - * @return \Thelia\Model\Newsletter The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Newsletter The current object (for fluent API support) */ public function setLastname($v) { @@ -527,14 +537,15 @@ abstract class Newsletter implements ActiveRecordInterface $this->modifiedColumns[NewsletterTableMap::LASTNAME] = true; } + return $this; } // setLastname() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\Newsletter The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Newsletter The current object (for fluent API support) */ public function setLocale($v) { @@ -547,15 +558,16 @@ abstract class Newsletter implements ActiveRecordInterface $this->modifiedColumns[NewsletterTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Newsletter The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Newsletter The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -567,15 +579,16 @@ abstract class Newsletter implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Newsletter The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Newsletter The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -587,6 +600,7 @@ abstract class Newsletter implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -690,10 +704,10 @@ abstract class Newsletter implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -728,7 +742,7 @@ abstract class Newsletter implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Newsletter::setDeleted() @@ -771,8 +785,8 @@ abstract class Newsletter implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -833,8 +847,8 @@ abstract class Newsletter implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -865,7 +879,7 @@ abstract class Newsletter implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -955,7 +969,7 @@ abstract class Newsletter implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -971,12 +985,12 @@ abstract class Newsletter implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -990,7 +1004,7 @@ abstract class Newsletter implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1029,11 +1043,11 @@ abstract class Newsletter implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion * * @return array an associative array containing the field names (as keys) and field values */ @@ -1058,18 +1072,19 @@ abstract class Newsletter implements ActiveRecordInterface $result[$key] = $virtualColumn; } + return $result; } /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1083,8 +1098,8 @@ abstract class Newsletter implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1127,8 +1142,8 @@ abstract class Newsletter implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1160,6 +1175,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->isColumnModified(NewsletterTableMap::LOCALE)) $criteria->add(NewsletterTableMap::LOCALE, $this->locale); if ($this->isColumnModified(NewsletterTableMap::CREATED_AT)) $criteria->add(NewsletterTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(NewsletterTableMap::UPDATED_AT)) $criteria->add(NewsletterTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1181,7 +1197,7 @@ abstract class Newsletter implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1191,7 +1207,7 @@ abstract class Newsletter implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1205,6 +1221,7 @@ abstract class Newsletter implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1214,9 +1231,9 @@ abstract class Newsletter implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Newsletter (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Newsletter (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1241,8 +1258,8 @@ abstract class Newsletter implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Newsletter Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Newsletter Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1281,7 +1298,7 @@ abstract class Newsletter implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1305,7 +1322,7 @@ abstract class Newsletter implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildNewsletter The current object (for fluent API support) + * @return ChildNewsletter The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/NewsletterQuery.php b/core/lib/Thelia/Model/Base/NewsletterQuery.php index 3ed92a3fb..7968412cf 100644 --- a/core/lib/Thelia/Model/Base/NewsletterQuery.php +++ b/core/lib/Thelia/Model/Base/NewsletterQuery.php @@ -64,9 +64,9 @@ abstract class NewsletterQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\NewsletterQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Newsletter', $modelAlias = null) { @@ -76,8 +76,8 @@ abstract class NewsletterQuery extends ModelCriteria /** * Returns a new ChildNewsletterQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildNewsletterQuery */ @@ -106,7 +106,7 @@ abstract class NewsletterQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildNewsletter|array|mixed the result, formatted by the current formatter @@ -137,10 +137,10 @@ abstract class NewsletterQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildNewsletter A model object, or null if the key is not found + * @return ChildNewsletter A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -167,8 +167,8 @@ abstract class NewsletterQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildNewsletter|array|mixed the result, formatted by the current formatter */ @@ -188,8 +188,8 @@ abstract class NewsletterQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -210,24 +210,26 @@ abstract class NewsletterQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildNewsletterQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(NewsletterTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildNewsletterQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(NewsletterTableMap::ID, $keys, Criteria::IN); } @@ -241,11 +243,11 @@ abstract class NewsletterQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -281,9 +283,9 @@ abstract class NewsletterQuery extends ModelCriteria * $query->filterByEmail('%fooValue%'); // WHERE email LIKE '%fooValue%' * * - * @param string $email The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $email The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -310,9 +312,9 @@ abstract class NewsletterQuery extends ModelCriteria * $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%' * * - * @param string $firstname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $firstname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -339,9 +341,9 @@ abstract class NewsletterQuery extends ModelCriteria * $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%' * * - * @param string $lastname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $lastname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -368,9 +370,9 @@ abstract class NewsletterQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -398,13 +400,13 @@ abstract class NewsletterQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -441,13 +443,13 @@ abstract class NewsletterQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -477,7 +479,7 @@ abstract class NewsletterQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildNewsletter $newsletter Object to remove from the list of results + * @param ChildNewsletter $newsletter Object to remove from the list of results * * @return ChildNewsletterQuery The current query, for fluid interface */ @@ -493,8 +495,8 @@ abstract class NewsletterQuery extends ModelCriteria /** * Deletes all rows from the newsletter table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -525,13 +527,13 @@ abstract class NewsletterQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildNewsletter or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildNewsletter object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildNewsletter object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -551,6 +553,7 @@ abstract class NewsletterQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + NewsletterTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -569,9 +572,9 @@ abstract class NewsletterQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildNewsletterQuery The current query, for fluid interface + * @return ChildNewsletterQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -581,9 +584,9 @@ abstract class NewsletterQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildNewsletterQuery The current query, for fluid interface + * @return ChildNewsletterQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -593,7 +596,7 @@ abstract class NewsletterQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildNewsletterQuery The current query, for fluid interface + * @return ChildNewsletterQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -603,7 +606,7 @@ abstract class NewsletterQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildNewsletterQuery The current query, for fluid interface + * @return ChildNewsletterQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -613,7 +616,7 @@ abstract class NewsletterQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildNewsletterQuery The current query, for fluid interface + * @return ChildNewsletterQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -623,7 +626,7 @@ abstract class NewsletterQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildNewsletterQuery The current query, for fluid interface + * @return ChildNewsletterQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Order.php b/core/lib/Thelia/Model/Base/Order.php index 0d3d67c1f..596829b3e 100644 --- a/core/lib/Thelia/Model/Base/Order.php +++ b/core/lib/Thelia/Model/Base/Order.php @@ -44,6 +44,7 @@ abstract class Order implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -465,9 +466,9 @@ abstract class Order implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Order The current object, for fluid interface */ @@ -517,50 +518,55 @@ abstract class Order implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [ref] column value. * - * @return string + * @return string */ public function getRef() { + return $this->ref; } /** * Get the [customer_id] column value. * - * @return int + * @return int */ public function getCustomerId() { + return $this->customer_id; } /** * Get the [invoice_order_address_id] column value. * - * @return int + * @return int */ public function getInvoiceOrderAddressId() { + return $this->invoice_order_address_id; } /** * Get the [delivery_order_address_id] column value. * - * @return int + * @return int */ public function getDeliveryOrderAddressId() { + return $this->delivery_order_address_id; } @@ -568,8 +574,8 @@ abstract class Order implements ActiveRecordInterface * Get the [optionally formatted] temporal [invoice_date] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 * @@ -587,110 +593,121 @@ abstract class Order implements ActiveRecordInterface /** * Get the [currency_id] column value. * - * @return int + * @return int */ public function getCurrencyId() { + return $this->currency_id; } /** * Get the [currency_rate] column value. * - * @return double + * @return double */ public function getCurrencyRate() { + return $this->currency_rate; } /** * Get the [transaction_ref] column value. * transaction reference - usually use to identify a transaction with banking modules - * @return string + * @return string */ public function getTransactionRef() { + return $this->transaction_ref; } /** * Get the [delivery_ref] column value. * delivery reference - usually use to identify a delivery progress on a distant delivery tracker website - * @return string + * @return string */ public function getDeliveryRef() { + return $this->delivery_ref; } /** * Get the [invoice_ref] column value. * the invoice reference - * @return string + * @return string */ public function getInvoiceRef() { + return $this->invoice_ref; } /** * Get the [discount] column value. * - * @return double + * @return double */ public function getDiscount() { + return $this->discount; } /** * Get the [postage] column value. * - * @return double + * @return double */ public function getPostage() { + return $this->postage; } /** * Get the [payment_module_id] column value. * - * @return int + * @return int */ public function getPaymentModuleId() { + return $this->payment_module_id; } /** * Get the [delivery_module_id] column value. * - * @return int + * @return int */ public function getDeliveryModuleId() { + return $this->delivery_module_id; } /** * Get the [status_id] column value. * - * @return int + * @return int */ public function getStatusId() { + return $this->status_id; } /** * Get the [lang_id] column value. * - * @return int + * @return int */ public function getLangId() { + return $this->lang_id; } @@ -698,8 +715,8 @@ abstract class Order implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -718,8 +735,8 @@ abstract class Order implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -737,8 +754,8 @@ abstract class Order implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setId($v) { @@ -751,14 +768,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [ref] column. * - * @param string $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setRef($v) { @@ -771,14 +789,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::REF] = true; } + return $this; } // setRef() /** * Set the value of [customer_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setCustomerId($v) { @@ -795,14 +814,15 @@ abstract class Order implements ActiveRecordInterface $this->aCustomer = null; } + return $this; } // setCustomerId() /** * Set the value of [invoice_order_address_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setInvoiceOrderAddressId($v) { @@ -819,14 +839,15 @@ abstract class Order implements ActiveRecordInterface $this->aOrderAddressRelatedByInvoiceOrderAddressId = null; } + return $this; } // setInvoiceOrderAddressId() /** * Set the value of [delivery_order_address_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setDeliveryOrderAddressId($v) { @@ -843,15 +864,16 @@ abstract class Order implements ActiveRecordInterface $this->aOrderAddressRelatedByDeliveryOrderAddressId = null; } + return $this; } // setDeliveryOrderAddressId() /** * Sets the value of [invoice_date] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setInvoiceDate($v) { @@ -863,14 +885,15 @@ abstract class Order implements ActiveRecordInterface } } // if either are not null + return $this; } // setInvoiceDate() /** * Set the value of [currency_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setCurrencyId($v) { @@ -887,14 +910,15 @@ abstract class Order implements ActiveRecordInterface $this->aCurrency = null; } + return $this; } // setCurrencyId() /** * Set the value of [currency_rate] column. * - * @param double $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setCurrencyRate($v) { @@ -907,14 +931,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::CURRENCY_RATE] = true; } + return $this; } // setCurrencyRate() /** * Set the value of [transaction_ref] column. * transaction reference - usually use to identify a transaction with banking modules - * @param string $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setTransactionRef($v) { @@ -927,14 +952,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::TRANSACTION_REF] = true; } + return $this; } // setTransactionRef() /** * Set the value of [delivery_ref] column. * delivery reference - usually use to identify a delivery progress on a distant delivery tracker website - * @param string $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setDeliveryRef($v) { @@ -947,14 +973,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::DELIVERY_REF] = true; } + return $this; } // setDeliveryRef() /** * Set the value of [invoice_ref] column. * the invoice reference - * @param string $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setInvoiceRef($v) { @@ -967,14 +994,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::INVOICE_REF] = true; } + return $this; } // setInvoiceRef() /** * Set the value of [discount] column. * - * @param double $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setDiscount($v) { @@ -987,14 +1015,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::DISCOUNT] = true; } + return $this; } // setDiscount() /** * Set the value of [postage] column. * - * @param double $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setPostage($v) { @@ -1007,14 +1036,15 @@ abstract class Order implements ActiveRecordInterface $this->modifiedColumns[OrderTableMap::POSTAGE] = true; } + return $this; } // setPostage() /** * Set the value of [payment_module_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setPaymentModuleId($v) { @@ -1031,14 +1061,15 @@ abstract class Order implements ActiveRecordInterface $this->aModuleRelatedByPaymentModuleId = null; } + return $this; } // setPaymentModuleId() /** * Set the value of [delivery_module_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setDeliveryModuleId($v) { @@ -1055,14 +1086,15 @@ abstract class Order implements ActiveRecordInterface $this->aModuleRelatedByDeliveryModuleId = null; } + return $this; } // setDeliveryModuleId() /** * Set the value of [status_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setStatusId($v) { @@ -1079,14 +1111,15 @@ abstract class Order implements ActiveRecordInterface $this->aOrderStatus = null; } + return $this; } // setStatusId() /** * Set the value of [lang_id] column. * - * @param int $v new value - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setLangId($v) { @@ -1103,15 +1136,16 @@ abstract class Order implements ActiveRecordInterface $this->aLang = null; } + return $this; } // setLangId() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -1123,15 +1157,16 @@ abstract class Order implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -1143,6 +1178,7 @@ abstract class Order implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -1309,10 +1345,10 @@ abstract class Order implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1359,7 +1395,7 @@ abstract class Order implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Order::setDeleted() @@ -1402,8 +1438,8 @@ abstract class Order implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1464,8 +1500,8 @@ abstract class Order implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1591,7 +1627,7 @@ abstract class Order implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1753,7 +1789,7 @@ abstract class Order implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1769,12 +1805,12 @@ abstract class Order implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1788,7 +1824,7 @@ abstract class Order implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1863,12 +1899,12 @@ abstract class Order implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1944,12 +1980,12 @@ abstract class Order implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1963,8 +1999,8 @@ abstract class Order implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -2043,8 +2079,8 @@ abstract class Order implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -2100,6 +2136,7 @@ abstract class Order implements ActiveRecordInterface if ($this->isColumnModified(OrderTableMap::LANG_ID)) $criteria->add(OrderTableMap::LANG_ID, $this->lang_id); if ($this->isColumnModified(OrderTableMap::CREATED_AT)) $criteria->add(OrderTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(OrderTableMap::UPDATED_AT)) $criteria->add(OrderTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -2121,7 +2158,7 @@ abstract class Order implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -2131,7 +2168,7 @@ abstract class Order implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -2145,6 +2182,7 @@ abstract class Order implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -2154,9 +2192,9 @@ abstract class Order implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Order (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Order (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -2213,8 +2251,8 @@ abstract class Order implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Order Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Order Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -2230,8 +2268,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildCurrency object. * - * @param ChildCurrency $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildCurrency $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setCurrency(ChildCurrency $v = null) @@ -2250,6 +2288,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrder($this); } + return $this; } @@ -2257,8 +2296,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildCurrency object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCurrency The associated ChildCurrency object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCurrency The associated ChildCurrency object. * @throws PropelException */ public function getCurrency(ConnectionInterface $con = null) @@ -2280,8 +2319,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildCustomer object. * - * @param ChildCustomer $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildCustomer $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setCustomer(ChildCustomer $v = null) @@ -2300,6 +2339,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrder($this); } + return $this; } @@ -2307,8 +2347,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildCustomer object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCustomer The associated ChildCustomer object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomer The associated ChildCustomer object. * @throws PropelException */ public function getCustomer(ConnectionInterface $con = null) @@ -2330,8 +2370,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrderAddress object. * - * @param ChildOrderAddress $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildOrderAddress $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setOrderAddressRelatedByInvoiceOrderAddressId(ChildOrderAddress $v = null) @@ -2350,6 +2390,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrderRelatedByInvoiceOrderAddressId($this); } + return $this; } @@ -2357,8 +2398,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildOrderAddress object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrderAddress The associated ChildOrderAddress object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrderAddress The associated ChildOrderAddress object. * @throws PropelException */ public function getOrderAddressRelatedByInvoiceOrderAddressId(ConnectionInterface $con = null) @@ -2380,8 +2421,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrderAddress object. * - * @param ChildOrderAddress $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildOrderAddress $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setOrderAddressRelatedByDeliveryOrderAddressId(ChildOrderAddress $v = null) @@ -2400,6 +2441,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrderRelatedByDeliveryOrderAddressId($this); } + return $this; } @@ -2407,8 +2449,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildOrderAddress object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrderAddress The associated ChildOrderAddress object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrderAddress The associated ChildOrderAddress object. * @throws PropelException */ public function getOrderAddressRelatedByDeliveryOrderAddressId(ConnectionInterface $con = null) @@ -2430,8 +2472,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrderStatus object. * - * @param ChildOrderStatus $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildOrderStatus $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setOrderStatus(ChildOrderStatus $v = null) @@ -2450,6 +2492,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrder($this); } + return $this; } @@ -2457,8 +2500,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildOrderStatus object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrderStatus The associated ChildOrderStatus object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrderStatus The associated ChildOrderStatus object. * @throws PropelException */ public function getOrderStatus(ConnectionInterface $con = null) @@ -2480,8 +2523,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildModule object. * - * @param ChildModule $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildModule $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setModuleRelatedByPaymentModuleId(ChildModule $v = null) @@ -2500,6 +2543,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrderRelatedByPaymentModuleId($this); } + return $this; } @@ -2507,8 +2551,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildModule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildModule The associated ChildModule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildModule The associated ChildModule object. * @throws PropelException */ public function getModuleRelatedByPaymentModuleId(ConnectionInterface $con = null) @@ -2530,8 +2574,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildModule object. * - * @param ChildModule $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildModule $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setModuleRelatedByDeliveryModuleId(ChildModule $v = null) @@ -2550,6 +2594,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrderRelatedByDeliveryModuleId($this); } + return $this; } @@ -2557,8 +2602,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildModule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildModule The associated ChildModule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildModule The associated ChildModule object. * @throws PropelException */ public function getModuleRelatedByDeliveryModuleId(ConnectionInterface $con = null) @@ -2580,8 +2625,8 @@ abstract class Order implements ActiveRecordInterface /** * Declares an association between this object and a ChildLang object. * - * @param ChildLang $v - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildLang $v + * @return \Thelia\Model\Order The current object (for fluent API support) * @throws PropelException */ public function setLang(ChildLang $v = null) @@ -2600,6 +2645,7 @@ abstract class Order implements ActiveRecordInterface $v->addOrder($this); } + return $this; } @@ -2607,8 +2653,8 @@ abstract class Order implements ActiveRecordInterface /** * Get the associated ChildLang object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildLang The associated ChildLang object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildLang The associated ChildLang object. * @throws PropelException */ public function getLang(ConnectionInterface $con = null) @@ -2633,7 +2679,7 @@ abstract class Order implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -2675,8 +2721,8 @@ abstract class Order implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2698,8 +2744,8 @@ abstract class Order implements ActiveRecordInterface * If this ChildOrder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrderProduct[] List of ChildOrderProduct objects * @throws PropelException */ @@ -2755,14 +2801,15 @@ abstract class Order implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orderProducts A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrder The current object (for fluent API support) + * @param Collection $orderProducts A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrder The current object (for fluent API support) */ public function setOrderProducts(Collection $orderProducts, ConnectionInterface $con = null) { $orderProductsToDelete = $this->getOrderProducts(new Criteria(), $con)->diff($orderProducts); + $this->orderProductsScheduledForDeletion = $orderProductsToDelete; foreach ($orderProductsToDelete as $orderProductRemoved) { @@ -2783,10 +2830,10 @@ abstract class Order implements ActiveRecordInterface /** * Returns the number of related OrderProduct objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related OrderProduct objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related OrderProduct objects. * @throws PropelException */ public function countOrderProducts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2818,8 +2865,8 @@ abstract class Order implements ActiveRecordInterface * Method called to associate a ChildOrderProduct object to this object * through the ChildOrderProduct foreign key attribute. * - * @param ChildOrderProduct $l ChildOrderProduct - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildOrderProduct $l ChildOrderProduct + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function addOrderProduct(ChildOrderProduct $l) { @@ -2846,7 +2893,7 @@ abstract class Order implements ActiveRecordInterface /** * @param OrderProduct $orderProduct The orderProduct object to remove. - * @return ChildOrder The current object (for fluent API support) + * @return ChildOrder The current object (for fluent API support) */ public function removeOrderProduct($orderProduct) { @@ -2892,8 +2939,8 @@ abstract class Order implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2915,8 +2962,8 @@ abstract class Order implements ActiveRecordInterface * If this ChildOrder is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrderCoupon[] List of ChildOrderCoupon objects * @throws PropelException */ @@ -2972,14 +3019,15 @@ abstract class Order implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orderCoupons A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrder The current object (for fluent API support) + * @param Collection $orderCoupons A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrder The current object (for fluent API support) */ public function setOrderCoupons(Collection $orderCoupons, ConnectionInterface $con = null) { $orderCouponsToDelete = $this->getOrderCoupons(new Criteria(), $con)->diff($orderCoupons); + $this->orderCouponsScheduledForDeletion = $orderCouponsToDelete; foreach ($orderCouponsToDelete as $orderCouponRemoved) { @@ -3000,10 +3048,10 @@ abstract class Order implements ActiveRecordInterface /** * Returns the number of related OrderCoupon objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related OrderCoupon objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related OrderCoupon objects. * @throws PropelException */ public function countOrderCoupons(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3035,8 +3083,8 @@ abstract class Order implements ActiveRecordInterface * Method called to associate a ChildOrderCoupon object to this object * through the ChildOrderCoupon foreign key attribute. * - * @param ChildOrderCoupon $l ChildOrderCoupon - * @return \Thelia\Model\Order The current object (for fluent API support) + * @param ChildOrderCoupon $l ChildOrderCoupon + * @return \Thelia\Model\Order The current object (for fluent API support) */ public function addOrderCoupon(ChildOrderCoupon $l) { @@ -3063,7 +3111,7 @@ abstract class Order implements ActiveRecordInterface /** * @param OrderCoupon $orderCoupon The orderCoupon object to remove. - * @return ChildOrder The current object (for fluent API support) + * @return ChildOrder The current object (for fluent API support) */ public function removeOrderCoupon($orderCoupon) { @@ -3118,7 +3166,7 @@ abstract class Order implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -3162,7 +3210,7 @@ abstract class Order implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildOrder The current object (for fluent API support) + * @return ChildOrder The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -3247,6 +3295,7 @@ abstract class Order implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/OrderAddress.php b/core/lib/Thelia/Model/Base/OrderAddress.php index 1831d05ec..e4743618f 100644 --- a/core/lib/Thelia/Model/Base/OrderAddress.php +++ b/core/lib/Thelia/Model/Base/OrderAddress.php @@ -30,6 +30,7 @@ abstract class OrderAddress implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderAddressTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -381,9 +382,9 @@ abstract class OrderAddress implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return OrderAddress The current object, for fluid interface */ @@ -433,120 +434,132 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [customer_title_id] column value. * - * @return int + * @return int */ public function getCustomerTitleId() { + return $this->customer_title_id; } /** * Get the [company] column value. * - * @return string + * @return string */ public function getCompany() { + return $this->company; } /** * Get the [firstname] column value. * - * @return string + * @return string */ public function getFirstname() { + return $this->firstname; } /** * Get the [lastname] column value. * - * @return string + * @return string */ public function getLastname() { + return $this->lastname; } /** * Get the [address1] column value. * - * @return string + * @return string */ public function getAddress1() { + return $this->address1; } /** * Get the [address2] column value. * - * @return string + * @return string */ public function getAddress2() { + return $this->address2; } /** * Get the [address3] column value. * - * @return string + * @return string */ public function getAddress3() { + return $this->address3; } /** * Get the [zipcode] column value. * - * @return string + * @return string */ public function getZipcode() { + return $this->zipcode; } /** * Get the [city] column value. * - * @return string + * @return string */ public function getCity() { + return $this->city; } /** * Get the [phone] column value. * - * @return string + * @return string */ public function getPhone() { + return $this->phone; } /** * Get the [country_id] column value. * - * @return int + * @return int */ public function getCountryId() { + return $this->country_id; } @@ -554,8 +567,8 @@ abstract class OrderAddress implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -574,8 +587,8 @@ abstract class OrderAddress implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -593,8 +606,8 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setId($v) { @@ -607,14 +620,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [customer_title_id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setCustomerTitleId($v) { @@ -627,14 +641,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::CUSTOMER_TITLE_ID] = true; } + return $this; } // setCustomerTitleId() /** * Set the value of [company] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setCompany($v) { @@ -647,14 +662,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::COMPANY] = true; } + return $this; } // setCompany() /** * Set the value of [firstname] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setFirstname($v) { @@ -667,14 +683,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::FIRSTNAME] = true; } + return $this; } // setFirstname() /** * Set the value of [lastname] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setLastname($v) { @@ -687,14 +704,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::LASTNAME] = true; } + return $this; } // setLastname() /** * Set the value of [address1] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setAddress1($v) { @@ -707,14 +725,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::ADDRESS1] = true; } + return $this; } // setAddress1() /** * Set the value of [address2] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setAddress2($v) { @@ -727,14 +746,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::ADDRESS2] = true; } + return $this; } // setAddress2() /** * Set the value of [address3] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setAddress3($v) { @@ -747,14 +767,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::ADDRESS3] = true; } + return $this; } // setAddress3() /** * Set the value of [zipcode] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setZipcode($v) { @@ -767,14 +788,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::ZIPCODE] = true; } + return $this; } // setZipcode() /** * Set the value of [city] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setCity($v) { @@ -787,14 +809,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::CITY] = true; } + return $this; } // setCity() /** * Set the value of [phone] column. * - * @param string $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setPhone($v) { @@ -807,14 +830,15 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::PHONE] = true; } + return $this; } // setPhone() /** * Set the value of [country_id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setCountryId($v) { @@ -827,15 +851,16 @@ abstract class OrderAddress implements ActiveRecordInterface $this->modifiedColumns[OrderAddressTableMap::COUNTRY_ID] = true; } + return $this; } // setCountryId() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -847,15 +872,16 @@ abstract class OrderAddress implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -867,6 +893,7 @@ abstract class OrderAddress implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -991,10 +1018,10 @@ abstract class OrderAddress implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1033,7 +1060,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see OrderAddress::setDeleted() @@ -1076,8 +1103,8 @@ abstract class OrderAddress implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1138,8 +1165,8 @@ abstract class OrderAddress implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1204,7 +1231,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1336,7 +1363,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1352,12 +1379,12 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1371,7 +1398,7 @@ abstract class OrderAddress implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1431,12 +1458,12 @@ abstract class OrderAddress implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1483,12 +1510,12 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1502,8 +1529,8 @@ abstract class OrderAddress implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1567,8 +1594,8 @@ abstract class OrderAddress implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1614,6 +1641,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->isColumnModified(OrderAddressTableMap::COUNTRY_ID)) $criteria->add(OrderAddressTableMap::COUNTRY_ID, $this->country_id); if ($this->isColumnModified(OrderAddressTableMap::CREATED_AT)) $criteria->add(OrderAddressTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(OrderAddressTableMap::UPDATED_AT)) $criteria->add(OrderAddressTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1635,7 +1663,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1645,7 +1673,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1659,6 +1687,7 @@ abstract class OrderAddress implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1668,9 +1697,9 @@ abstract class OrderAddress implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\OrderAddress (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\OrderAddress (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1722,8 +1751,8 @@ abstract class OrderAddress implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\OrderAddress Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\OrderAddress Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1742,7 +1771,7 @@ abstract class OrderAddress implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1784,8 +1813,8 @@ abstract class OrderAddress implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1807,8 +1836,8 @@ abstract class OrderAddress implements ActiveRecordInterface * If this ChildOrderAddress is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -1864,14 +1893,15 @@ abstract class OrderAddress implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $ordersRelatedByInvoiceOrderAddressId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrderAddress The current object (for fluent API support) + * @param Collection $ordersRelatedByInvoiceOrderAddressId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrderAddress The current object (for fluent API support) */ public function setOrdersRelatedByInvoiceOrderAddressId(Collection $ordersRelatedByInvoiceOrderAddressId, ConnectionInterface $con = null) { $ordersRelatedByInvoiceOrderAddressIdToDelete = $this->getOrdersRelatedByInvoiceOrderAddressId(new Criteria(), $con)->diff($ordersRelatedByInvoiceOrderAddressId); + $this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = $ordersRelatedByInvoiceOrderAddressIdToDelete; foreach ($ordersRelatedByInvoiceOrderAddressIdToDelete as $orderRelatedByInvoiceOrderAddressIdRemoved) { @@ -1892,10 +1922,10 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrdersRelatedByInvoiceOrderAddressId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1927,8 +1957,8 @@ abstract class OrderAddress implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function addOrderRelatedByInvoiceOrderAddressId(ChildOrder $l) { @@ -1955,7 +1985,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * @param OrderRelatedByInvoiceOrderAddressId $orderRelatedByInvoiceOrderAddressId The orderRelatedByInvoiceOrderAddressId object to remove. - * @return ChildOrderAddress The current object (for fluent API support) + * @return ChildOrderAddress The current object (for fluent API support) */ public function removeOrderRelatedByInvoiceOrderAddressId($orderRelatedByInvoiceOrderAddressId) { @@ -1972,6 +2002,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1983,9 +2014,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByInvoiceOrderAddressIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1996,6 +2027,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2007,9 +2039,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByInvoiceOrderAddressIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2020,6 +2052,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2031,9 +2064,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByInvoiceOrderAddressIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2044,6 +2077,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2055,9 +2089,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByInvoiceOrderAddressIdJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2068,6 +2102,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2079,9 +2114,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByInvoiceOrderAddressIdJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2092,6 +2127,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2103,9 +2139,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByInvoiceOrderAddressIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2145,8 +2181,8 @@ abstract class OrderAddress implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2168,8 +2204,8 @@ abstract class OrderAddress implements ActiveRecordInterface * If this ChildOrderAddress is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -2225,14 +2261,15 @@ abstract class OrderAddress implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $ordersRelatedByDeliveryOrderAddressId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrderAddress The current object (for fluent API support) + * @param Collection $ordersRelatedByDeliveryOrderAddressId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrderAddress The current object (for fluent API support) */ public function setOrdersRelatedByDeliveryOrderAddressId(Collection $ordersRelatedByDeliveryOrderAddressId, ConnectionInterface $con = null) { $ordersRelatedByDeliveryOrderAddressIdToDelete = $this->getOrdersRelatedByDeliveryOrderAddressId(new Criteria(), $con)->diff($ordersRelatedByDeliveryOrderAddressId); + $this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = $ordersRelatedByDeliveryOrderAddressIdToDelete; foreach ($ordersRelatedByDeliveryOrderAddressIdToDelete as $orderRelatedByDeliveryOrderAddressIdRemoved) { @@ -2253,10 +2290,10 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrdersRelatedByDeliveryOrderAddressId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2288,8 +2325,8 @@ abstract class OrderAddress implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\OrderAddress The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\OrderAddress The current object (for fluent API support) */ public function addOrderRelatedByDeliveryOrderAddressId(ChildOrder $l) { @@ -2316,7 +2353,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * @param OrderRelatedByDeliveryOrderAddressId $orderRelatedByDeliveryOrderAddressId The orderRelatedByDeliveryOrderAddressId object to remove. - * @return ChildOrderAddress The current object (for fluent API support) + * @return ChildOrderAddress The current object (for fluent API support) */ public function removeOrderRelatedByDeliveryOrderAddressId($orderRelatedByDeliveryOrderAddressId) { @@ -2333,6 +2370,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2344,9 +2382,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryOrderAddressIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2357,6 +2395,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2368,9 +2407,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryOrderAddressIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2381,6 +2420,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2392,9 +2432,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryOrderAddressIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2405,6 +2445,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2416,9 +2457,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryOrderAddressIdJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2429,6 +2470,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2440,9 +2482,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryOrderAddressIdJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2453,6 +2495,7 @@ abstract class OrderAddress implements ActiveRecordInterface return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2464,9 +2507,9 @@ abstract class OrderAddress implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderAddress. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersRelatedByDeliveryOrderAddressIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2510,7 +2553,7 @@ abstract class OrderAddress implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2546,7 +2589,7 @@ abstract class OrderAddress implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildOrderAddress The current object (for fluent API support) + * @return ChildOrderAddress The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2631,6 +2674,7 @@ abstract class OrderAddress implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/OrderAddressQuery.php b/core/lib/Thelia/Model/Base/OrderAddressQuery.php index abd51c699..575e24338 100644 --- a/core/lib/Thelia/Model/Base/OrderAddressQuery.php +++ b/core/lib/Thelia/Model/Base/OrderAddressQuery.php @@ -103,9 +103,9 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderAddressQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderAddress', $modelAlias = null) { @@ -115,8 +115,8 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Returns a new ChildOrderAddressQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderAddressQuery */ @@ -145,7 +145,7 @@ abstract class OrderAddressQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildOrderAddress|array|mixed the result, formatted by the current formatter @@ -176,10 +176,10 @@ abstract class OrderAddressQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrderAddress A model object, or null if the key is not found + * @return ChildOrderAddress A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -206,8 +206,8 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrderAddress|array|mixed the result, formatted by the current formatter */ @@ -227,8 +227,8 @@ abstract class OrderAddressQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -249,24 +249,26 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderAddressQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(OrderAddressTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderAddressQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(OrderAddressTableMap::ID, $keys, Criteria::IN); } @@ -280,11 +282,11 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -321,11 +323,11 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByCustomerTitleId(array('min' => 12)); // WHERE customer_title_id > 12 * * - * @param mixed $customerTitleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $customerTitleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -361,9 +363,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByCompany('%fooValue%'); // WHERE company LIKE '%fooValue%' * * - * @param string $company The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $company The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -390,9 +392,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%' * * - * @param string $firstname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $firstname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -419,9 +421,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%' * * - * @param string $lastname The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $lastname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -448,9 +450,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByAddress1('%fooValue%'); // WHERE address1 LIKE '%fooValue%' * * - * @param string $address1 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $address1 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -477,9 +479,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByAddress2('%fooValue%'); // WHERE address2 LIKE '%fooValue%' * * - * @param string $address2 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $address2 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -506,9 +508,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByAddress3('%fooValue%'); // WHERE address3 LIKE '%fooValue%' * * - * @param string $address3 The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $address3 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -535,9 +537,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByZipcode('%fooValue%'); // WHERE zipcode LIKE '%fooValue%' * * - * @param string $zipcode The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $zipcode The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -564,9 +566,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByCity('%fooValue%'); // WHERE city LIKE '%fooValue%' * * - * @param string $city The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $city The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -593,9 +595,9 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByPhone('%fooValue%'); // WHERE phone LIKE '%fooValue%' * * - * @param string $phone The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $phone The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -623,11 +625,11 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByCountryId(array('min' => 12)); // WHERE country_id > 12 * * - * @param mixed $countryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $countryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -664,13 +666,13 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -707,13 +709,13 @@ abstract class OrderAddressQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -743,8 +745,8 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -766,8 +768,8 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderRelatedByInvoiceOrderAddressId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -800,11 +802,11 @@ abstract class OrderAddressQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderRelatedByInvoiceOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -816,8 +818,8 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -839,8 +841,8 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderRelatedByDeliveryOrderAddressId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -873,11 +875,11 @@ abstract class OrderAddressQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderRelatedByDeliveryOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -889,7 +891,7 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrderAddress $orderAddress Object to remove from the list of results + * @param ChildOrderAddress $orderAddress Object to remove from the list of results * * @return ChildOrderAddressQuery The current query, for fluid interface */ @@ -905,8 +907,8 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Deletes all rows from the order_address table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -937,13 +939,13 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrderAddress or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrderAddress object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrderAddress object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -963,6 +965,7 @@ abstract class OrderAddressQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderAddressTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -981,9 +984,9 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildOrderAddressQuery The current query, for fluid interface + * @return ChildOrderAddressQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -993,9 +996,9 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildOrderAddressQuery The current query, for fluid interface + * @return ChildOrderAddressQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1005,7 +1008,7 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildOrderAddressQuery The current query, for fluid interface + * @return ChildOrderAddressQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1015,7 +1018,7 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildOrderAddressQuery The current query, for fluid interface + * @return ChildOrderAddressQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1025,7 +1028,7 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildOrderAddressQuery The current query, for fluid interface + * @return ChildOrderAddressQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1035,7 +1038,7 @@ abstract class OrderAddressQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildOrderAddressQuery The current query, for fluid interface + * @return ChildOrderAddressQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/OrderCoupon.php b/core/lib/Thelia/Model/Base/OrderCoupon.php index 1ef3e03ce..25179228e 100644 --- a/core/lib/Thelia/Model/Base/OrderCoupon.php +++ b/core/lib/Thelia/Model/Base/OrderCoupon.php @@ -29,6 +29,7 @@ abstract class OrderCoupon implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderCouponTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -367,9 +368,9 @@ abstract class OrderCoupon implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return OrderCoupon The current object, for fluid interface */ @@ -419,80 +420,88 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [order_id] column value. * - * @return int + * @return int */ public function getOrderId() { + return $this->order_id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } /** * Get the [type] column value. * - * @return string + * @return string */ public function getType() { + return $this->type; } /** * Get the [amount] column value. * - * @return double + * @return double */ public function getAmount() { + return $this->amount; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [short_description] column value. * - * @return string + * @return string */ public function getShortDescription() { + return $this->short_description; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } @@ -500,8 +509,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * Get the [optionally formatted] temporal [expiration_date] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -519,40 +528,44 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Get the [is_cumulative] column value. * - * @return boolean + * @return boolean */ public function getIsCumulative() { + return $this->is_cumulative; } /** * Get the [is_removing_postage] column value. * - * @return boolean + * @return boolean */ public function getIsRemovingPostage() { + return $this->is_removing_postage; } /** * Get the [is_available_on_special_offers] column value. * - * @return boolean + * @return boolean */ public function getIsAvailableOnSpecialOffers() { + return $this->is_available_on_special_offers; } /** * Get the [serialized_conditions] column value. * - * @return string + * @return string */ public function getSerializedConditions() { + return $this->serialized_conditions; } @@ -560,8 +573,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -580,8 +593,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -599,8 +612,8 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setId($v) { @@ -613,14 +626,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [order_id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setOrderId($v) { @@ -637,14 +651,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->aOrder = null; } + return $this; } // setOrderId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setCode($v) { @@ -657,14 +672,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::CODE] = true; } + return $this; } // setCode() /** * Set the value of [type] column. * - * @param string $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setType($v) { @@ -677,14 +693,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::TYPE] = true; } + return $this; } // setType() /** * Set the value of [amount] column. * - * @param double $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setAmount($v) { @@ -697,14 +714,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::AMOUNT] = true; } + return $this; } // setAmount() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setTitle($v) { @@ -717,14 +735,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [short_description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setShortDescription($v) { @@ -737,14 +756,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::SHORT_DESCRIPTION] = true; } + return $this; } // setShortDescription() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setDescription($v) { @@ -757,15 +777,16 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Sets the value of [expiration_date] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setExpirationDate($v) { @@ -777,6 +798,7 @@ abstract class OrderCoupon implements ActiveRecordInterface } } // if either are not null + return $this; } // setExpirationDate() @@ -787,8 +809,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setIsCumulative($v) { @@ -805,6 +827,7 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::IS_CUMULATIVE] = true; } + return $this; } // setIsCumulative() @@ -815,8 +838,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setIsRemovingPostage($v) { @@ -833,6 +856,7 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::IS_REMOVING_POSTAGE] = true; } + return $this; } // setIsRemovingPostage() @@ -843,8 +867,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setIsAvailableOnSpecialOffers($v) { @@ -861,14 +885,15 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS] = true; } + return $this; } // setIsAvailableOnSpecialOffers() /** * Set the value of [serialized_conditions] column. * - * @param string $v new value - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setSerializedConditions($v) { @@ -881,15 +906,16 @@ abstract class OrderCoupon implements ActiveRecordInterface $this->modifiedColumns[OrderCouponTableMap::SERIALIZED_CONDITIONS] = true; } + return $this; } // setSerializedConditions() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -901,15 +927,16 @@ abstract class OrderCoupon implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -921,6 +948,7 @@ abstract class OrderCoupon implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -1054,10 +1082,10 @@ abstract class OrderCoupon implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1093,7 +1121,7 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see OrderCoupon::setDeleted() @@ -1136,8 +1164,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1198,8 +1226,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1242,7 +1270,7 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1380,7 +1408,7 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1396,12 +1424,12 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1415,7 +1443,7 @@ abstract class OrderCoupon implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1478,12 +1506,12 @@ abstract class OrderCoupon implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1528,12 +1556,12 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1547,8 +1575,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1615,8 +1643,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1664,6 +1692,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->isColumnModified(OrderCouponTableMap::SERIALIZED_CONDITIONS)) $criteria->add(OrderCouponTableMap::SERIALIZED_CONDITIONS, $this->serialized_conditions); if ($this->isColumnModified(OrderCouponTableMap::CREATED_AT)) $criteria->add(OrderCouponTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(OrderCouponTableMap::UPDATED_AT)) $criteria->add(OrderCouponTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1685,7 +1714,7 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1695,7 +1724,7 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1709,6 +1738,7 @@ abstract class OrderCoupon implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1718,9 +1748,9 @@ abstract class OrderCoupon implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\OrderCoupon (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\OrderCoupon (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1753,8 +1783,8 @@ abstract class OrderCoupon implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\OrderCoupon Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\OrderCoupon Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1770,8 +1800,8 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrder object. * - * @param ChildOrder $v - * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) + * @param ChildOrder $v + * @return \Thelia\Model\OrderCoupon The current object (for fluent API support) * @throws PropelException */ public function setOrder(ChildOrder $v = null) @@ -1790,6 +1820,7 @@ abstract class OrderCoupon implements ActiveRecordInterface $v->addOrderCoupon($this); } + return $this; } @@ -1797,8 +1828,8 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Get the associated ChildOrder object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrder The associated ChildOrder object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrder The associated ChildOrder object. * @throws PropelException */ public function getOrder(ConnectionInterface $con = null) @@ -1851,7 +1882,7 @@ abstract class OrderCoupon implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1876,7 +1907,7 @@ abstract class OrderCoupon implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildOrderCoupon The current object (for fluent API support) + * @return ChildOrderCoupon The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/OrderCouponQuery.php b/core/lib/Thelia/Model/Base/OrderCouponQuery.php index 6bd10fe31..037a8f695 100644 --- a/core/lib/Thelia/Model/Base/OrderCouponQuery.php +++ b/core/lib/Thelia/Model/Base/OrderCouponQuery.php @@ -103,9 +103,9 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderCouponQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderCoupon', $modelAlias = null) { @@ -115,8 +115,8 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Returns a new ChildOrderCouponQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderCouponQuery */ @@ -145,7 +145,7 @@ abstract class OrderCouponQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildOrderCoupon|array|mixed the result, formatted by the current formatter @@ -176,10 +176,10 @@ abstract class OrderCouponQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrderCoupon A model object, or null if the key is not found + * @return ChildOrderCoupon A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -206,8 +206,8 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrderCoupon|array|mixed the result, formatted by the current formatter */ @@ -227,8 +227,8 @@ abstract class OrderCouponQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -249,24 +249,26 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderCouponQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(OrderCouponTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderCouponQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(OrderCouponTableMap::ID, $keys, Criteria::IN); } @@ -280,11 +282,11 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -323,11 +325,11 @@ abstract class OrderCouponQuery extends ModelCriteria * * @see filterByOrder() * - * @param mixed $orderId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $orderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -363,9 +365,9 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -392,9 +394,9 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByType('%fooValue%'); // WHERE type LIKE '%fooValue%' * * - * @param string $type The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $type The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -422,11 +424,11 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByAmount(array('min' => 12)); // WHERE amount > 12 * * - * @param mixed $amount The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $amount The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -462,9 +464,9 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -491,9 +493,9 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%' * * - * @param string $shortDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $shortDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -520,9 +522,9 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -550,13 +552,13 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByExpirationDate(array('max' => 'yesterday')); // WHERE expiration_date > '2011-03-13' * * - * @param mixed $expirationDate The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $expirationDate The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -592,12 +594,12 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByIsCumulative('yes'); // WHERE is_cumulative = true * * - * @param boolean|string $isCumulative The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isCumulative The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -619,12 +621,12 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByIsRemovingPostage('yes'); // WHERE is_removing_postage = true * * - * @param boolean|string $isRemovingPostage The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isRemovingPostage The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -646,12 +648,12 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByIsAvailableOnSpecialOffers('yes'); // WHERE is_available_on_special_offers = true * * - * @param boolean|string $isAvailableOnSpecialOffers The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isAvailableOnSpecialOffers The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -673,9 +675,9 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterBySerializedConditions('%fooValue%'); // WHERE serialized_conditions LIKE '%fooValue%' * * - * @param string $serializedConditions The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $serializedConditions The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -703,13 +705,13 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -746,13 +748,13 @@ abstract class OrderCouponQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -782,8 +784,8 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -807,8 +809,8 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Order relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -841,11 +843,11 @@ abstract class OrderCouponQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -857,7 +859,7 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrderCoupon $orderCoupon Object to remove from the list of results + * @param ChildOrderCoupon $orderCoupon Object to remove from the list of results * * @return ChildOrderCouponQuery The current query, for fluid interface */ @@ -873,8 +875,8 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Deletes all rows from the order_coupon table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -905,13 +907,13 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrderCoupon or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrderCoupon object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrderCoupon object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -931,6 +933,7 @@ abstract class OrderCouponQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderCouponTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -949,9 +952,9 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildOrderCouponQuery The current query, for fluid interface + * @return ChildOrderCouponQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -961,9 +964,9 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildOrderCouponQuery The current query, for fluid interface + * @return ChildOrderCouponQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -973,7 +976,7 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildOrderCouponQuery The current query, for fluid interface + * @return ChildOrderCouponQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -983,7 +986,7 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildOrderCouponQuery The current query, for fluid interface + * @return ChildOrderCouponQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -993,7 +996,7 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildOrderCouponQuery The current query, for fluid interface + * @return ChildOrderCouponQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1003,7 +1006,7 @@ abstract class OrderCouponQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildOrderCouponQuery The current query, for fluid interface + * @return ChildOrderCouponQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/OrderProduct.php b/core/lib/Thelia/Model/Base/OrderProduct.php index a6271f81b..0e65ba671 100644 --- a/core/lib/Thelia/Model/Base/OrderProduct.php +++ b/core/lib/Thelia/Model/Base/OrderProduct.php @@ -34,6 +34,7 @@ abstract class OrderProduct implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderProductTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -426,9 +427,9 @@ abstract class OrderProduct implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return OrderProduct The current object, for fluid interface */ @@ -478,180 +479,198 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [order_id] column value. * - * @return int + * @return int */ public function getOrderId() { + return $this->order_id; } /** * Get the [product_ref] column value. * - * @return string + * @return string */ public function getProductRef() { + return $this->product_ref; } /** * Get the [product_sale_elements_ref] column value. * - * @return string + * @return string */ public function getProductSaleElementsRef() { + return $this->product_sale_elements_ref; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Get the [quantity] column value. * - * @return double + * @return double */ public function getQuantity() { + return $this->quantity; } /** * Get the [price] column value. * - * @return double + * @return double */ public function getPrice() { + return $this->price; } /** * Get the [promo_price] column value. * - * @return string + * @return string */ public function getPromoPrice() { + return $this->promo_price; } /** * Get the [was_new] column value. * - * @return int + * @return int */ public function getWasNew() { + return $this->was_new; } /** * Get the [was_in_promo] column value. * - * @return int + * @return int */ public function getWasInPromo() { + return $this->was_in_promo; } /** * Get the [weight] column value. * - * @return string + * @return string */ public function getWeight() { + return $this->weight; } /** * Get the [ean_code] column value. * - * @return string + * @return string */ public function getEanCode() { + return $this->ean_code; } /** * Get the [tax_rule_title] column value. * - * @return string + * @return string */ public function getTaxRuleTitle() { + return $this->tax_rule_title; } /** * Get the [tax_rule_description] column value. * - * @return string + * @return string */ public function getTaxRuleDescription() { + return $this->tax_rule_description; } /** * Get the [parent] column value. * not managed yet - * @return int + * @return int */ public function getParent() { + return $this->parent; } @@ -659,8 +678,8 @@ abstract class OrderProduct implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -679,8 +698,8 @@ abstract class OrderProduct implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -698,8 +717,8 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setId($v) { @@ -712,14 +731,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [order_id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setOrderId($v) { @@ -736,14 +756,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->aOrder = null; } + return $this; } // setOrderId() /** * Set the value of [product_ref] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setProductRef($v) { @@ -756,14 +777,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::PRODUCT_REF] = true; } + return $this; } // setProductRef() /** * Set the value of [product_sale_elements_ref] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setProductSaleElementsRef($v) { @@ -776,14 +798,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF] = true; } + return $this; } // setProductSaleElementsRef() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setTitle($v) { @@ -796,14 +819,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setChapo($v) { @@ -816,14 +840,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setDescription($v) { @@ -836,14 +861,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -856,14 +882,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() /** * Set the value of [quantity] column. * - * @param double $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setQuantity($v) { @@ -876,14 +903,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::QUANTITY] = true; } + return $this; } // setQuantity() /** * Set the value of [price] column. * - * @param double $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setPrice($v) { @@ -896,14 +924,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::PRICE] = true; } + return $this; } // setPrice() /** * Set the value of [promo_price] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setPromoPrice($v) { @@ -916,14 +945,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::PROMO_PRICE] = true; } + return $this; } // setPromoPrice() /** * Set the value of [was_new] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setWasNew($v) { @@ -936,14 +966,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::WAS_NEW] = true; } + return $this; } // setWasNew() /** * Set the value of [was_in_promo] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setWasInPromo($v) { @@ -956,14 +987,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::WAS_IN_PROMO] = true; } + return $this; } // setWasInPromo() /** * Set the value of [weight] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setWeight($v) { @@ -976,14 +1008,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::WEIGHT] = true; } + return $this; } // setWeight() /** * Set the value of [ean_code] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setEanCode($v) { @@ -996,14 +1029,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::EAN_CODE] = true; } + return $this; } // setEanCode() /** * Set the value of [tax_rule_title] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setTaxRuleTitle($v) { @@ -1016,14 +1050,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::TAX_RULE_TITLE] = true; } + return $this; } // setTaxRuleTitle() /** * Set the value of [tax_rule_description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setTaxRuleDescription($v) { @@ -1036,14 +1071,15 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::TAX_RULE_DESCRIPTION] = true; } + return $this; } // setTaxRuleDescription() /** * Set the value of [parent] column. * not managed yet - * @param int $v new value - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setParent($v) { @@ -1056,15 +1092,16 @@ abstract class OrderProduct implements ActiveRecordInterface $this->modifiedColumns[OrderProductTableMap::PARENT] = true; } + return $this; } // setParent() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -1076,15 +1113,16 @@ abstract class OrderProduct implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -1096,6 +1134,7 @@ abstract class OrderProduct implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -1241,10 +1280,10 @@ abstract class OrderProduct implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1284,7 +1323,7 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see OrderProduct::setDeleted() @@ -1327,8 +1366,8 @@ abstract class OrderProduct implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1389,8 +1428,8 @@ abstract class OrderProduct implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1467,7 +1506,7 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1635,7 +1674,7 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1651,12 +1690,12 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1670,7 +1709,7 @@ abstract class OrderProduct implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1748,12 +1787,12 @@ abstract class OrderProduct implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1809,12 +1848,12 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1828,8 +1867,8 @@ abstract class OrderProduct implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1911,8 +1950,8 @@ abstract class OrderProduct implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1970,6 +2009,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->isColumnModified(OrderProductTableMap::PARENT)) $criteria->add(OrderProductTableMap::PARENT, $this->parent); if ($this->isColumnModified(OrderProductTableMap::CREATED_AT)) $criteria->add(OrderProductTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(OrderProductTableMap::UPDATED_AT)) $criteria->add(OrderProductTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1991,7 +2031,7 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -2001,7 +2041,7 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -2015,6 +2055,7 @@ abstract class OrderProduct implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -2024,9 +2065,9 @@ abstract class OrderProduct implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\OrderProduct (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\OrderProduct (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -2084,8 +2125,8 @@ abstract class OrderProduct implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\OrderProduct Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\OrderProduct Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -2101,8 +2142,8 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrder object. * - * @param ChildOrder $v - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param ChildOrder $v + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) * @throws PropelException */ public function setOrder(ChildOrder $v = null) @@ -2121,6 +2162,7 @@ abstract class OrderProduct implements ActiveRecordInterface $v->addOrderProduct($this); } + return $this; } @@ -2128,8 +2170,8 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Get the associated ChildOrder object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrder The associated ChildOrder object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrder The associated ChildOrder object. * @throws PropelException */ public function getOrder(ConnectionInterface $con = null) @@ -2154,7 +2196,7 @@ abstract class OrderProduct implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -2196,8 +2238,8 @@ abstract class OrderProduct implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2219,8 +2261,8 @@ abstract class OrderProduct implements ActiveRecordInterface * If this ChildOrderProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrderProductAttributeCombination[] List of ChildOrderProductAttributeCombination objects * @throws PropelException */ @@ -2276,14 +2318,15 @@ abstract class OrderProduct implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orderProductAttributeCombinations A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrderProduct The current object (for fluent API support) + * @param Collection $orderProductAttributeCombinations A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrderProduct The current object (for fluent API support) */ public function setOrderProductAttributeCombinations(Collection $orderProductAttributeCombinations, ConnectionInterface $con = null) { $orderProductAttributeCombinationsToDelete = $this->getOrderProductAttributeCombinations(new Criteria(), $con)->diff($orderProductAttributeCombinations); + $this->orderProductAttributeCombinationsScheduledForDeletion = $orderProductAttributeCombinationsToDelete; foreach ($orderProductAttributeCombinationsToDelete as $orderProductAttributeCombinationRemoved) { @@ -2304,10 +2347,10 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Returns the number of related OrderProductAttributeCombination objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related OrderProductAttributeCombination objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related OrderProductAttributeCombination objects. * @throws PropelException */ public function countOrderProductAttributeCombinations(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2339,8 +2382,8 @@ abstract class OrderProduct implements ActiveRecordInterface * Method called to associate a ChildOrderProductAttributeCombination object to this object * through the ChildOrderProductAttributeCombination foreign key attribute. * - * @param ChildOrderProductAttributeCombination $l ChildOrderProductAttributeCombination - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param ChildOrderProductAttributeCombination $l ChildOrderProductAttributeCombination + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function addOrderProductAttributeCombination(ChildOrderProductAttributeCombination $l) { @@ -2367,7 +2410,7 @@ abstract class OrderProduct implements ActiveRecordInterface /** * @param OrderProductAttributeCombination $orderProductAttributeCombination The orderProductAttributeCombination object to remove. - * @return ChildOrderProduct The current object (for fluent API support) + * @return ChildOrderProduct The current object (for fluent API support) */ public function removeOrderProductAttributeCombination($orderProductAttributeCombination) { @@ -2413,8 +2456,8 @@ abstract class OrderProduct implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2436,8 +2479,8 @@ abstract class OrderProduct implements ActiveRecordInterface * If this ChildOrderProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrderProductTax[] List of ChildOrderProductTax objects * @throws PropelException */ @@ -2493,14 +2536,15 @@ abstract class OrderProduct implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orderProductTaxes A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrderProduct The current object (for fluent API support) + * @param Collection $orderProductTaxes A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrderProduct The current object (for fluent API support) */ public function setOrderProductTaxes(Collection $orderProductTaxes, ConnectionInterface $con = null) { $orderProductTaxesToDelete = $this->getOrderProductTaxes(new Criteria(), $con)->diff($orderProductTaxes); + $this->orderProductTaxesScheduledForDeletion = $orderProductTaxesToDelete; foreach ($orderProductTaxesToDelete as $orderProductTaxRemoved) { @@ -2521,10 +2565,10 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Returns the number of related OrderProductTax objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related OrderProductTax objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related OrderProductTax objects. * @throws PropelException */ public function countOrderProductTaxes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2556,8 +2600,8 @@ abstract class OrderProduct implements ActiveRecordInterface * Method called to associate a ChildOrderProductTax object to this object * through the ChildOrderProductTax foreign key attribute. * - * @param ChildOrderProductTax $l ChildOrderProductTax - * @return \Thelia\Model\OrderProduct The current object (for fluent API support) + * @param ChildOrderProductTax $l ChildOrderProductTax + * @return \Thelia\Model\OrderProduct The current object (for fluent API support) */ public function addOrderProductTax(ChildOrderProductTax $l) { @@ -2583,7 +2627,7 @@ abstract class OrderProduct implements ActiveRecordInterface } /** - * @param OrderProductTax $orderProductTax The orderProductTax object to remove. + * @param OrderProductTax $orderProductTax The orderProductTax object to remove. * @return ChildOrderProduct The current object (for fluent API support) */ public function removeOrderProductTax($orderProductTax) @@ -2640,7 +2684,7 @@ abstract class OrderProduct implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2677,7 +2721,7 @@ abstract class OrderProduct implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildOrderProduct The current object (for fluent API support) + * @return ChildOrderProduct The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2762,6 +2806,7 @@ abstract class OrderProduct implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php b/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php index 51f090359..c1ea23848 100644 --- a/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php +++ b/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php @@ -29,6 +29,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderProductAttributeCombinationTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -349,9 +350,9 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return OrderProductAttributeCombination The current object, for fluid interface */ @@ -401,100 +402,110 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [order_product_id] column value. * - * @return int + * @return int */ public function getOrderProductId() { + return $this->order_product_id; } /** * Get the [attribute_title] column value. * - * @return string + * @return string */ public function getAttributeTitle() { + return $this->attribute_title; } /** * Get the [attribute_chapo] column value. * - * @return string + * @return string */ public function getAttributeChapo() { + return $this->attribute_chapo; } /** * Get the [attribute_description] column value. * - * @return string + * @return string */ public function getAttributeDescription() { + return $this->attribute_description; } /** * Get the [attribute_postscriptum] column value. * - * @return string + * @return string */ public function getAttributePostscriptum() { + return $this->attribute_postscriptum; } /** * Get the [attribute_av_title] column value. * - * @return string + * @return string */ public function getAttributeAvTitle() { + return $this->attribute_av_title; } /** * Get the [attribute_av_chapo] column value. * - * @return string + * @return string */ public function getAttributeAvChapo() { + return $this->attribute_av_chapo; } /** * Get the [attribute_av_description] column value. * - * @return string + * @return string */ public function getAttributeAvDescription() { + return $this->attribute_av_description; } /** * Get the [attribute_av_postscriptum] column value. * - * @return string + * @return string */ public function getAttributeAvPostscriptum() { + return $this->attribute_av_postscriptum; } @@ -502,8 +513,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -522,8 +533,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -541,8 +552,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setId($v) { @@ -555,14 +566,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [order_product_id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setOrderProductId($v) { @@ -579,14 +591,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->aOrderProduct = null; } + return $this; } // setOrderProductId() /** * Set the value of [attribute_title] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributeTitle($v) { @@ -599,14 +612,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_TITLE] = true; } + return $this; } // setAttributeTitle() /** * Set the value of [attribute_chapo] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributeChapo($v) { @@ -619,14 +633,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_CHAPO] = true; } + return $this; } // setAttributeChapo() /** * Set the value of [attribute_description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributeDescription($v) { @@ -639,14 +654,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_DESCRIPTION] = true; } + return $this; } // setAttributeDescription() /** * Set the value of [attribute_postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributePostscriptum($v) { @@ -659,14 +675,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_POSTSCRIPTUM] = true; } + return $this; } // setAttributePostscriptum() /** * Set the value of [attribute_av_title] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributeAvTitle($v) { @@ -679,14 +696,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_TITLE] = true; } + return $this; } // setAttributeAvTitle() /** * Set the value of [attribute_av_chapo] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributeAvChapo($v) { @@ -699,14 +717,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_CHAPO] = true; } + return $this; } // setAttributeAvChapo() /** * Set the value of [attribute_av_description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributeAvDescription($v) { @@ -719,14 +738,15 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_DESCRIPTION] = true; } + return $this; } // setAttributeAvDescription() /** * Set the value of [attribute_av_postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setAttributeAvPostscriptum($v) { @@ -739,15 +759,16 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM] = true; } + return $this; } // setAttributeAvPostscriptum() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -759,15 +780,16 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -779,6 +801,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -900,10 +923,10 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -939,7 +962,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see OrderProductAttributeCombination::setDeleted() @@ -982,8 +1005,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1044,8 +1067,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1088,7 +1111,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1208,7 +1231,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1224,12 +1247,12 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1243,7 +1266,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1297,12 +1320,12 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1344,12 +1367,12 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1363,8 +1386,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1422,8 +1445,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1465,6 +1488,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->isColumnModified(OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM)) $criteria->add(OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM, $this->attribute_av_postscriptum); if ($this->isColumnModified(OrderProductAttributeCombinationTableMap::CREATED_AT)) $criteria->add(OrderProductAttributeCombinationTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(OrderProductAttributeCombinationTableMap::UPDATED_AT)) $criteria->add(OrderProductAttributeCombinationTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1486,7 +1510,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1496,7 +1520,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1510,6 +1534,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1519,9 +1544,9 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\OrderProductAttributeCombination (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\OrderProductAttributeCombination (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1551,8 +1576,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\OrderProductAttributeCombination Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\OrderProductAttributeCombination Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1568,8 +1593,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrderProduct object. * - * @param ChildOrderProduct $v - * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) + * @param ChildOrderProduct $v + * @return \Thelia\Model\OrderProductAttributeCombination The current object (for fluent API support) * @throws PropelException */ public function setOrderProduct(ChildOrderProduct $v = null) @@ -1588,6 +1613,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $v->addOrderProductAttributeCombination($this); } + return $this; } @@ -1595,8 +1621,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Get the associated ChildOrderProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrderProduct The associated ChildOrderProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrderProduct The associated ChildOrderProduct object. * @throws PropelException */ public function getOrderProduct(ConnectionInterface $con = null) @@ -1646,7 +1672,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1671,7 +1697,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildOrderProductAttributeCombination The current object (for fluent API support) + * @return ChildOrderProductAttributeCombination The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/OrderProductAttributeCombinationQuery.php b/core/lib/Thelia/Model/Base/OrderProductAttributeCombinationQuery.php index 88fadaf19..cddfb5bbc 100644 --- a/core/lib/Thelia/Model/Base/OrderProductAttributeCombinationQuery.php +++ b/core/lib/Thelia/Model/Base/OrderProductAttributeCombinationQuery.php @@ -91,9 +91,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderProductAttributeCombinationQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderProductAttributeCombination', $modelAlias = null) { @@ -103,8 +103,8 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Returns a new ChildOrderProductAttributeCombinationQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderProductAttributeCombinationQuery */ @@ -133,7 +133,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildOrderProductAttributeCombination|array|mixed the result, formatted by the current formatter @@ -164,10 +164,10 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrderProductAttributeCombination A model object, or null if the key is not found + * @return ChildOrderProductAttributeCombination A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -194,8 +194,8 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrderProductAttributeCombination|array|mixed the result, formatted by the current formatter */ @@ -215,8 +215,8 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -237,24 +237,26 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(OrderProductAttributeCombinationTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(OrderProductAttributeCombinationTableMap::ID, $keys, Criteria::IN); } @@ -268,11 +270,11 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -311,11 +313,11 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * * @see filterByOrderProduct() * - * @param mixed $orderProductId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $orderProductId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -351,9 +353,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributeTitle('%fooValue%'); // WHERE attribute_title LIKE '%fooValue%' * * - * @param string $attributeTitle The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributeTitle The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -380,9 +382,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributeChapo('%fooValue%'); // WHERE attribute_chapo LIKE '%fooValue%' * * - * @param string $attributeChapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributeChapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -409,9 +411,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributeDescription('%fooValue%'); // WHERE attribute_description LIKE '%fooValue%' * * - * @param string $attributeDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributeDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -438,9 +440,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributePostscriptum('%fooValue%'); // WHERE attribute_postscriptum LIKE '%fooValue%' * * - * @param string $attributePostscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributePostscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -467,9 +469,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributeAvTitle('%fooValue%'); // WHERE attribute_av_title LIKE '%fooValue%' * * - * @param string $attributeAvTitle The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributeAvTitle The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -496,9 +498,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributeAvChapo('%fooValue%'); // WHERE attribute_av_chapo LIKE '%fooValue%' * * - * @param string $attributeAvChapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributeAvChapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -525,9 +527,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributeAvDescription('%fooValue%'); // WHERE attribute_av_description LIKE '%fooValue%' * * - * @param string $attributeAvDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributeAvDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -554,9 +556,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByAttributeAvPostscriptum('%fooValue%'); // WHERE attribute_av_postscriptum LIKE '%fooValue%' * * - * @param string $attributeAvPostscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $attributeAvPostscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -584,13 +586,13 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -627,13 +629,13 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -664,7 +666,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\OrderProduct object * * @param \Thelia\Model\OrderProduct|ObjectCollection $orderProduct The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -688,8 +690,8 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderProduct relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -722,11 +724,11 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderProductQuery A secondary query class using the current class as primary query */ public function useOrderProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -738,7 +740,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrderProductAttributeCombination $orderProductAttributeCombination Object to remove from the list of results + * @param ChildOrderProductAttributeCombination $orderProductAttributeCombination Object to remove from the list of results * * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ @@ -754,8 +756,8 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Deletes all rows from the order_product_attribute_combination table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -786,13 +788,13 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrderProductAttributeCombination or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrderProductAttributeCombination object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrderProductAttributeCombination object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -812,6 +814,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderProductAttributeCombinationTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -830,9 +833,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface + * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -842,9 +845,9 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface + * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -854,7 +857,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface + * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -864,7 +867,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface + * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -874,7 +877,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface + * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -884,7 +887,7 @@ abstract class OrderProductAttributeCombinationQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface + * @return ChildOrderProductAttributeCombinationQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/OrderProductQuery.php b/core/lib/Thelia/Model/Base/OrderProductQuery.php index 762ee5566..4ab5d4721 100644 --- a/core/lib/Thelia/Model/Base/OrderProductQuery.php +++ b/core/lib/Thelia/Model/Base/OrderProductQuery.php @@ -131,9 +131,9 @@ abstract class OrderProductQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderProductQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderProduct', $modelAlias = null) { @@ -143,8 +143,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Returns a new ChildOrderProductQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderProductQuery */ @@ -173,7 +173,7 @@ abstract class OrderProductQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildOrderProduct|array|mixed the result, formatted by the current formatter @@ -204,10 +204,10 @@ abstract class OrderProductQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrderProduct A model object, or null if the key is not found + * @return ChildOrderProduct A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -234,8 +234,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrderProduct|array|mixed the result, formatted by the current formatter */ @@ -255,8 +255,8 @@ abstract class OrderProductQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -277,24 +277,26 @@ abstract class OrderProductQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderProductQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(OrderProductTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderProductQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(OrderProductTableMap::ID, $keys, Criteria::IN); } @@ -308,11 +310,11 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -351,11 +353,11 @@ abstract class OrderProductQuery extends ModelCriteria * * @see filterByOrder() * - * @param mixed $orderId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $orderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -391,9 +393,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByProductRef('%fooValue%'); // WHERE product_ref LIKE '%fooValue%' * * - * @param string $productRef The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $productRef The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -420,9 +422,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByProductSaleElementsRef('%fooValue%'); // WHERE product_sale_elements_ref LIKE '%fooValue%' * * - * @param string $productSaleElementsRef The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $productSaleElementsRef The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -449,9 +451,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -478,9 +480,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -507,9 +509,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -536,9 +538,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -566,11 +568,11 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByQuantity(array('min' => 12)); // WHERE quantity > 12 * * - * @param mixed $quantity The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $quantity The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -607,11 +609,11 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByPrice(array('min' => 12)); // WHERE price > 12 * * - * @param mixed $price The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $price The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -647,9 +649,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByPromoPrice('%fooValue%'); // WHERE promo_price LIKE '%fooValue%' * * - * @param string $promoPrice The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $promoPrice The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -677,11 +679,11 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByWasNew(array('min' => 12)); // WHERE was_new > 12 * * - * @param mixed $wasNew The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $wasNew The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -718,11 +720,11 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByWasInPromo(array('min' => 12)); // WHERE was_in_promo > 12 * * - * @param mixed $wasInPromo The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $wasInPromo The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -758,9 +760,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByWeight('%fooValue%'); // WHERE weight LIKE '%fooValue%' * * - * @param string $weight The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $weight The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -787,9 +789,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByEanCode('%fooValue%'); // WHERE ean_code LIKE '%fooValue%' * * - * @param string $eanCode The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $eanCode The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -816,9 +818,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByTaxRuleTitle('%fooValue%'); // WHERE tax_rule_title LIKE '%fooValue%' * * - * @param string $taxRuleTitle The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $taxRuleTitle The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -845,9 +847,9 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByTaxRuleDescription('%fooValue%'); // WHERE tax_rule_description LIKE '%fooValue%' * * - * @param string $taxRuleDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $taxRuleDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -875,11 +877,11 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByParent(array('min' => 12)); // WHERE parent > 12 * * - * @param mixed $parent The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $parent The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -916,13 +918,13 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -959,13 +961,13 @@ abstract class OrderProductQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -995,8 +997,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -1020,8 +1022,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Order relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -1054,11 +1056,11 @@ abstract class OrderProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1070,8 +1072,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\OrderProductAttributeCombination object * - * @param \Thelia\Model\OrderProductAttributeCombination|ObjectCollection $orderProductAttributeCombination the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\OrderProductAttributeCombination|ObjectCollection $orderProductAttributeCombination the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -1093,8 +1095,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderProductAttributeCombination relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -1127,11 +1129,11 @@ abstract class OrderProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderProductAttributeCombinationQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderProductAttributeCombinationQuery A secondary query class using the current class as primary query */ public function useOrderProductAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1143,8 +1145,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\OrderProductTax object * - * @param \Thelia\Model\OrderProductTax|ObjectCollection $orderProductTax the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\OrderProductTax|ObjectCollection $orderProductTax the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -1166,8 +1168,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderProductTax relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -1200,11 +1202,11 @@ abstract class OrderProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderProductTaxQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderProductTaxQuery A secondary query class using the current class as primary query */ public function useOrderProductTaxQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1216,7 +1218,7 @@ abstract class OrderProductQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrderProduct $orderProduct Object to remove from the list of results + * @param ChildOrderProduct $orderProduct Object to remove from the list of results * * @return ChildOrderProductQuery The current query, for fluid interface */ @@ -1232,8 +1234,8 @@ abstract class OrderProductQuery extends ModelCriteria /** * Deletes all rows from the order_product table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1264,13 +1266,13 @@ abstract class OrderProductQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrderProduct or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrderProduct object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrderProduct object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1290,6 +1292,7 @@ abstract class OrderProductQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderProductTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1308,9 +1311,9 @@ abstract class OrderProductQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildOrderProductQuery The current query, for fluid interface + * @return ChildOrderProductQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1320,9 +1323,9 @@ abstract class OrderProductQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildOrderProductQuery The current query, for fluid interface + * @return ChildOrderProductQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1332,7 +1335,7 @@ abstract class OrderProductQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildOrderProductQuery The current query, for fluid interface + * @return ChildOrderProductQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1342,7 +1345,7 @@ abstract class OrderProductQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildOrderProductQuery The current query, for fluid interface + * @return ChildOrderProductQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1352,7 +1355,7 @@ abstract class OrderProductQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildOrderProductQuery The current query, for fluid interface + * @return ChildOrderProductQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1362,7 +1365,7 @@ abstract class OrderProductQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildOrderProductQuery The current query, for fluid interface + * @return ChildOrderProductQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/OrderProductTax.php b/core/lib/Thelia/Model/Base/OrderProductTax.php index 4bfe7c369..b394dde60 100644 --- a/core/lib/Thelia/Model/Base/OrderProductTax.php +++ b/core/lib/Thelia/Model/Base/OrderProductTax.php @@ -29,6 +29,7 @@ abstract class OrderProductTax implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderProductTaxTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -325,9 +326,9 @@ abstract class OrderProductTax implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return OrderProductTax The current object, for fluid interface */ @@ -377,60 +378,66 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [order_product_id] column value. * - * @return int + * @return int */ public function getOrderProductId() { + return $this->order_product_id; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [amount] column value. * - * @return double + * @return double */ public function getAmount() { + return $this->amount; } /** * Get the [promo_amount] column value. * - * @return double + * @return double */ public function getPromoAmount() { + return $this->promo_amount; } @@ -438,8 +445,8 @@ abstract class OrderProductTax implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -458,8 +465,8 @@ abstract class OrderProductTax implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -477,8 +484,8 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setId($v) { @@ -491,14 +498,15 @@ abstract class OrderProductTax implements ActiveRecordInterface $this->modifiedColumns[OrderProductTaxTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [order_product_id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setOrderProductId($v) { @@ -515,14 +523,15 @@ abstract class OrderProductTax implements ActiveRecordInterface $this->aOrderProduct = null; } + return $this; } // setOrderProductId() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setTitle($v) { @@ -535,14 +544,15 @@ abstract class OrderProductTax implements ActiveRecordInterface $this->modifiedColumns[OrderProductTaxTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setDescription($v) { @@ -555,14 +565,15 @@ abstract class OrderProductTax implements ActiveRecordInterface $this->modifiedColumns[OrderProductTaxTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [amount] column. * - * @param double $v new value - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setAmount($v) { @@ -575,14 +586,15 @@ abstract class OrderProductTax implements ActiveRecordInterface $this->modifiedColumns[OrderProductTaxTableMap::AMOUNT] = true; } + return $this; } // setAmount() /** * Set the value of [promo_amount] column. * - * @param double $v new value - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setPromoAmount($v) { @@ -595,15 +607,16 @@ abstract class OrderProductTax implements ActiveRecordInterface $this->modifiedColumns[OrderProductTaxTableMap::PROMO_AMOUNT] = true; } + return $this; } // setPromoAmount() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -615,15 +628,16 @@ abstract class OrderProductTax implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -635,6 +649,7 @@ abstract class OrderProductTax implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -744,10 +759,10 @@ abstract class OrderProductTax implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -783,7 +798,7 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see OrderProductTax::setDeleted() @@ -826,8 +841,8 @@ abstract class OrderProductTax implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -888,8 +903,8 @@ abstract class OrderProductTax implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -932,7 +947,7 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1028,7 +1043,7 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1044,12 +1059,12 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1063,7 +1078,7 @@ abstract class OrderProductTax implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1105,12 +1120,12 @@ abstract class OrderProductTax implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1148,12 +1163,12 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1167,8 +1182,8 @@ abstract class OrderProductTax implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1214,8 +1229,8 @@ abstract class OrderProductTax implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1249,6 +1264,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->isColumnModified(OrderProductTaxTableMap::PROMO_AMOUNT)) $criteria->add(OrderProductTaxTableMap::PROMO_AMOUNT, $this->promo_amount); if ($this->isColumnModified(OrderProductTaxTableMap::CREATED_AT)) $criteria->add(OrderProductTaxTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(OrderProductTaxTableMap::UPDATED_AT)) $criteria->add(OrderProductTaxTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1270,7 +1286,7 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1280,7 +1296,7 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1294,6 +1310,7 @@ abstract class OrderProductTax implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1303,9 +1320,9 @@ abstract class OrderProductTax implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\OrderProductTax (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\OrderProductTax (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1331,8 +1348,8 @@ abstract class OrderProductTax implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\OrderProductTax Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\OrderProductTax Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1348,8 +1365,8 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrderProduct object. * - * @param ChildOrderProduct $v - * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) + * @param ChildOrderProduct $v + * @return \Thelia\Model\OrderProductTax The current object (for fluent API support) * @throws PropelException */ public function setOrderProduct(ChildOrderProduct $v = null) @@ -1368,6 +1385,7 @@ abstract class OrderProductTax implements ActiveRecordInterface $v->addOrderProductTax($this); } + return $this; } @@ -1375,8 +1393,8 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Get the associated ChildOrderProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrderProduct The associated ChildOrderProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrderProduct The associated ChildOrderProduct object. * @throws PropelException */ public function getOrderProduct(ConnectionInterface $con = null) @@ -1422,7 +1440,7 @@ abstract class OrderProductTax implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1447,7 +1465,7 @@ abstract class OrderProductTax implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildOrderProductTax The current object (for fluent API support) + * @return ChildOrderProductTax The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/OrderProductTaxQuery.php b/core/lib/Thelia/Model/Base/OrderProductTaxQuery.php index 56802e645..4bb59bf0d 100644 --- a/core/lib/Thelia/Model/Base/OrderProductTaxQuery.php +++ b/core/lib/Thelia/Model/Base/OrderProductTaxQuery.php @@ -75,9 +75,9 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderProductTaxQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderProductTax', $modelAlias = null) { @@ -87,8 +87,8 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Returns a new ChildOrderProductTaxQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderProductTaxQuery */ @@ -117,7 +117,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildOrderProductTax|array|mixed the result, formatted by the current formatter @@ -148,10 +148,10 @@ abstract class OrderProductTaxQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrderProductTax A model object, or null if the key is not found + * @return ChildOrderProductTax A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -178,8 +178,8 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrderProductTax|array|mixed the result, formatted by the current formatter */ @@ -199,8 +199,8 @@ abstract class OrderProductTaxQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -221,24 +221,26 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(OrderProductTaxTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(OrderProductTaxTableMap::ID, $keys, Criteria::IN); } @@ -252,11 +254,11 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -295,11 +297,11 @@ abstract class OrderProductTaxQuery extends ModelCriteria * * @see filterByOrderProduct() * - * @param mixed $orderProductId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $orderProductId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -335,9 +337,9 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -364,9 +366,9 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -394,11 +396,11 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $query->filterByAmount(array('min' => 12)); // WHERE amount > 12 * * - * @param mixed $amount The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $amount The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -435,11 +437,11 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $query->filterByPromoAmount(array('min' => 12)); // WHERE promo_amount > 12 * * - * @param mixed $promoAmount The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $promoAmount The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -476,13 +478,13 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -519,13 +521,13 @@ abstract class OrderProductTaxQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -556,7 +558,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\OrderProduct object * * @param \Thelia\Model\OrderProduct|ObjectCollection $orderProduct The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderProduct relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class OrderProductTaxQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderProductQuery A secondary query class using the current class as primary query */ public function useOrderProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -630,7 +632,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrderProductTax $orderProductTax Object to remove from the list of results + * @param ChildOrderProductTax $orderProductTax Object to remove from the list of results * * @return ChildOrderProductTaxQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Deletes all rows from the order_product_tax table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrderProductTax or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrderProductTax object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrderProductTax object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderProductTaxTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildOrderProductTaxQuery The current query, for fluid interface + * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildOrderProductTaxQuery The current query, for fluid interface + * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildOrderProductTaxQuery The current query, for fluid interface + * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildOrderProductTaxQuery The current query, for fluid interface + * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildOrderProductTaxQuery The current query, for fluid interface + * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class OrderProductTaxQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildOrderProductTaxQuery The current query, for fluid interface + * @return ChildOrderProductTaxQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/OrderQuery.php b/core/lib/Thelia/Model/Base/OrderQuery.php index d2d430ff0..96aa3d30b 100644 --- a/core/lib/Thelia/Model/Base/OrderQuery.php +++ b/core/lib/Thelia/Model/Base/OrderQuery.php @@ -155,9 +155,9 @@ abstract class OrderQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Order', $modelAlias = null) { @@ -167,8 +167,8 @@ abstract class OrderQuery extends ModelCriteria /** * Returns a new ChildOrderQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderQuery */ @@ -197,7 +197,7 @@ abstract class OrderQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildOrder|array|mixed the result, formatted by the current formatter @@ -228,10 +228,10 @@ abstract class OrderQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrder A model object, or null if the key is not found + * @return ChildOrder A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -258,8 +258,8 @@ abstract class OrderQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrder|array|mixed the result, formatted by the current formatter */ @@ -279,8 +279,8 @@ abstract class OrderQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -301,24 +301,26 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(OrderTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(OrderTableMap::ID, $keys, Criteria::IN); } @@ -332,11 +334,11 @@ abstract class OrderQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -372,9 +374,9 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%' * * - * @param string $ref The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $ref The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -404,11 +406,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByCustomer() * - * @param mixed $customerId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $customerId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -447,11 +449,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByOrderAddressRelatedByInvoiceOrderAddressId() * - * @param mixed $invoiceOrderAddressId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $invoiceOrderAddressId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -490,11 +492,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByOrderAddressRelatedByDeliveryOrderAddressId() * - * @param mixed $deliveryOrderAddressId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $deliveryOrderAddressId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -531,13 +533,13 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByInvoiceDate(array('max' => 'yesterday')); // WHERE invoice_date > '2011-03-13' * * - * @param mixed $invoiceDate The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $invoiceDate The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -576,11 +578,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByCurrency() * - * @param mixed $currencyId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $currencyId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -617,11 +619,11 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByCurrencyRate(array('min' => 12)); // WHERE currency_rate > 12 * * - * @param mixed $currencyRate The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $currencyRate The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -657,9 +659,9 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByTransactionRef('%fooValue%'); // WHERE transaction_ref LIKE '%fooValue%' * * - * @param string $transactionRef The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $transactionRef The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -686,9 +688,9 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByDeliveryRef('%fooValue%'); // WHERE delivery_ref LIKE '%fooValue%' * * - * @param string $deliveryRef The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $deliveryRef The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -715,9 +717,9 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByInvoiceRef('%fooValue%'); // WHERE invoice_ref LIKE '%fooValue%' * * - * @param string $invoiceRef The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $invoiceRef The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -745,11 +747,11 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByDiscount(array('min' => 12)); // WHERE discount > 12 * * - * @param mixed $discount The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $discount The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -786,11 +788,11 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByPostage(array('min' => 12)); // WHERE postage > 12 * * - * @param mixed $postage The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $postage The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -829,11 +831,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByModuleRelatedByPaymentModuleId() * - * @param mixed $paymentModuleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $paymentModuleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -872,11 +874,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByModuleRelatedByDeliveryModuleId() * - * @param mixed $deliveryModuleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $deliveryModuleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -915,11 +917,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByOrderStatus() * - * @param mixed $statusId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $statusId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -958,11 +960,11 @@ abstract class OrderQuery extends ModelCriteria * * @see filterByLang() * - * @param mixed $langId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $langId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -999,13 +1001,13 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1042,13 +1044,13 @@ abstract class OrderQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1078,8 +1080,8 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Currency object * - * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1103,8 +1105,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Currency relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1137,11 +1139,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query */ public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1153,8 +1155,8 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Customer object * - * @param \Thelia\Model\Customer|ObjectCollection $customer The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Customer|ObjectCollection $customer The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1178,8 +1180,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Customer relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1212,11 +1214,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query */ public function useCustomerQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1229,7 +1231,7 @@ abstract class OrderQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\OrderAddress object * * @param \Thelia\Model\OrderAddress|ObjectCollection $orderAddress The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1253,8 +1255,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderAddressRelatedByInvoiceOrderAddressId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1287,11 +1289,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query */ public function useOrderAddressRelatedByInvoiceOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1304,7 +1306,7 @@ abstract class OrderQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\OrderAddress object * * @param \Thelia\Model\OrderAddress|ObjectCollection $orderAddress The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1328,8 +1330,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderAddressRelatedByDeliveryOrderAddressId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1362,11 +1364,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query */ public function useOrderAddressRelatedByDeliveryOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1379,7 +1381,7 @@ abstract class OrderQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\OrderStatus object * * @param \Thelia\Model\OrderStatus|ObjectCollection $orderStatus The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1403,8 +1405,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderStatus relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1437,11 +1439,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderStatusQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderStatusQuery A secondary query class using the current class as primary query */ public function useOrderStatusQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1453,8 +1455,8 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Module object * - * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1478,8 +1480,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1512,11 +1514,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query */ public function useModuleRelatedByPaymentModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1528,8 +1530,8 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Module object * - * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1553,8 +1555,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1587,11 +1589,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query */ public function useModuleRelatedByDeliveryModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1603,8 +1605,8 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Lang object * - * @param \Thelia\Model\Lang|ObjectCollection $lang The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Lang|ObjectCollection $lang The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1628,8 +1630,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Lang relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1662,11 +1664,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\LangQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\LangQuery A secondary query class using the current class as primary query */ public function useLangQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1678,8 +1680,8 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\OrderProduct object * - * @param \Thelia\Model\OrderProduct|ObjectCollection $orderProduct the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\OrderProduct|ObjectCollection $orderProduct the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1701,8 +1703,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderProduct relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1735,11 +1737,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderProductQuery A secondary query class using the current class as primary query */ public function useOrderProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1751,8 +1753,8 @@ abstract class OrderQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\OrderCoupon object * - * @param \Thelia\Model\OrderCoupon|ObjectCollection $orderCoupon the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\OrderCoupon|ObjectCollection $orderCoupon the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1774,8 +1776,8 @@ abstract class OrderQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderCoupon relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1808,11 +1810,11 @@ abstract class OrderQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderCouponQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderCouponQuery A secondary query class using the current class as primary query */ public function useOrderCouponQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1824,7 +1826,7 @@ abstract class OrderQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrder $order Object to remove from the list of results + * @param ChildOrder $order Object to remove from the list of results * * @return ChildOrderQuery The current query, for fluid interface */ @@ -1840,8 +1842,8 @@ abstract class OrderQuery extends ModelCriteria /** * Deletes all rows from the order table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1872,13 +1874,13 @@ abstract class OrderQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrder or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrder object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrder object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1898,6 +1900,7 @@ abstract class OrderQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1916,9 +1919,9 @@ abstract class OrderQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildOrderQuery The current query, for fluid interface + * @return ChildOrderQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1928,9 +1931,9 @@ abstract class OrderQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildOrderQuery The current query, for fluid interface + * @return ChildOrderQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1940,7 +1943,7 @@ abstract class OrderQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildOrderQuery The current query, for fluid interface + * @return ChildOrderQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1950,7 +1953,7 @@ abstract class OrderQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildOrderQuery The current query, for fluid interface + * @return ChildOrderQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1960,7 +1963,7 @@ abstract class OrderQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildOrderQuery The current query, for fluid interface + * @return ChildOrderQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1970,7 +1973,7 @@ abstract class OrderQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildOrderQuery The current query, for fluid interface + * @return ChildOrderQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/OrderStatus.php b/core/lib/Thelia/Model/Base/OrderStatus.php index 02512ff02..2e612d635 100644 --- a/core/lib/Thelia/Model/Base/OrderStatus.php +++ b/core/lib/Thelia/Model/Base/OrderStatus.php @@ -32,6 +32,7 @@ abstract class OrderStatus implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderStatusTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -337,9 +338,9 @@ abstract class OrderStatus implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return OrderStatus The current object, for fluid interface */ @@ -389,20 +390,22 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } @@ -410,8 +413,8 @@ abstract class OrderStatus implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -430,8 +433,8 @@ abstract class OrderStatus implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -449,8 +452,8 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderStatus The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderStatus The current object (for fluent API support) */ public function setId($v) { @@ -463,14 +466,15 @@ abstract class OrderStatus implements ActiveRecordInterface $this->modifiedColumns[OrderStatusTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\OrderStatus The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderStatus The current object (for fluent API support) */ public function setCode($v) { @@ -483,15 +487,16 @@ abstract class OrderStatus implements ActiveRecordInterface $this->modifiedColumns[OrderStatusTableMap::CODE] = true; } + return $this; } // setCode() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderStatus The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderStatus The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -503,15 +508,16 @@ abstract class OrderStatus implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\OrderStatus The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\OrderStatus The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -523,6 +529,7 @@ abstract class OrderStatus implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -617,10 +624,10 @@ abstract class OrderStatus implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -659,7 +666,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see OrderStatus::setDeleted() @@ -702,8 +709,8 @@ abstract class OrderStatus implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -764,8 +771,8 @@ abstract class OrderStatus implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -830,7 +837,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -902,7 +909,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -918,12 +925,12 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -937,7 +944,7 @@ abstract class OrderStatus implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -967,12 +974,12 @@ abstract class OrderStatus implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1009,12 +1016,12 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1028,8 +1035,8 @@ abstract class OrderStatus implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1063,8 +1070,8 @@ abstract class OrderStatus implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1090,6 +1097,7 @@ abstract class OrderStatus implements ActiveRecordInterface if ($this->isColumnModified(OrderStatusTableMap::CODE)) $criteria->add(OrderStatusTableMap::CODE, $this->code); if ($this->isColumnModified(OrderStatusTableMap::CREATED_AT)) $criteria->add(OrderStatusTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(OrderStatusTableMap::UPDATED_AT)) $criteria->add(OrderStatusTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1111,7 +1119,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1121,7 +1129,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1135,6 +1143,7 @@ abstract class OrderStatus implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1144,9 +1153,9 @@ abstract class OrderStatus implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\OrderStatus (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\OrderStatus (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1188,8 +1197,8 @@ abstract class OrderStatus implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\OrderStatus Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\OrderStatus Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1208,7 +1217,7 @@ abstract class OrderStatus implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1250,8 +1259,8 @@ abstract class OrderStatus implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1273,8 +1282,8 @@ abstract class OrderStatus implements ActiveRecordInterface * If this ChildOrderStatus is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrder[] List of ChildOrder objects * @throws PropelException */ @@ -1330,14 +1339,15 @@ abstract class OrderStatus implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orders A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrderStatus The current object (for fluent API support) + * @param Collection $orders A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrderStatus The current object (for fluent API support) */ public function setOrders(Collection $orders, ConnectionInterface $con = null) { $ordersToDelete = $this->getOrders(new Criteria(), $con)->diff($orders); + $this->ordersScheduledForDeletion = $ordersToDelete; foreach ($ordersToDelete as $orderRemoved) { @@ -1358,10 +1368,10 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Returns the number of related Order objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Order objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Order objects. * @throws PropelException */ public function countOrders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1393,8 +1403,8 @@ abstract class OrderStatus implements ActiveRecordInterface * Method called to associate a ChildOrder object to this object * through the ChildOrder foreign key attribute. * - * @param ChildOrder $l ChildOrder - * @return \Thelia\Model\OrderStatus The current object (for fluent API support) + * @param ChildOrder $l ChildOrder + * @return \Thelia\Model\OrderStatus The current object (for fluent API support) */ public function addOrder(ChildOrder $l) { @@ -1420,7 +1430,7 @@ abstract class OrderStatus implements ActiveRecordInterface } /** - * @param Order $order The order object to remove. + * @param Order $order The order object to remove. * @return ChildOrderStatus The current object (for fluent API support) */ public function removeOrder($order) @@ -1438,6 +1448,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1449,9 +1460,9 @@ abstract class OrderStatus implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderStatus. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1462,6 +1473,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1473,9 +1485,9 @@ abstract class OrderStatus implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderStatus. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1486,6 +1498,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1497,9 +1510,9 @@ abstract class OrderStatus implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderStatus. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1510,6 +1523,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1521,9 +1535,9 @@ abstract class OrderStatus implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderStatus. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1534,6 +1548,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1545,9 +1560,9 @@ abstract class OrderStatus implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderStatus. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1558,6 +1573,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1569,9 +1585,9 @@ abstract class OrderStatus implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderStatus. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1582,6 +1598,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getOrders($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1593,9 +1610,9 @@ abstract class OrderStatus implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in OrderStatus. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildOrder[] List of ChildOrder objects */ public function getOrdersJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1635,8 +1652,8 @@ abstract class OrderStatus implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1658,8 +1675,8 @@ abstract class OrderStatus implements ActiveRecordInterface * If this ChildOrderStatus is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildOrderStatusI18n[] List of ChildOrderStatusI18n objects * @throws PropelException */ @@ -1715,14 +1732,15 @@ abstract class OrderStatus implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $orderStatusI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildOrderStatus The current object (for fluent API support) + * @param Collection $orderStatusI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildOrderStatus The current object (for fluent API support) */ public function setOrderStatusI18ns(Collection $orderStatusI18ns, ConnectionInterface $con = null) { $orderStatusI18nsToDelete = $this->getOrderStatusI18ns(new Criteria(), $con)->diff($orderStatusI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1746,10 +1764,10 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Returns the number of related OrderStatusI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related OrderStatusI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related OrderStatusI18n objects. * @throws PropelException */ public function countOrderStatusI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1781,8 +1799,8 @@ abstract class OrderStatus implements ActiveRecordInterface * Method called to associate a ChildOrderStatusI18n object to this object * through the ChildOrderStatusI18n foreign key attribute. * - * @param ChildOrderStatusI18n $l ChildOrderStatusI18n - * @return \Thelia\Model\OrderStatus The current object (for fluent API support) + * @param ChildOrderStatusI18n $l ChildOrderStatusI18n + * @return \Thelia\Model\OrderStatus The current object (for fluent API support) */ public function addOrderStatusI18n(ChildOrderStatusI18n $l) { @@ -1812,7 +1830,7 @@ abstract class OrderStatus implements ActiveRecordInterface } /** - * @param OrderStatusI18n $orderStatusI18n The orderStatusI18n object to remove. + * @param OrderStatusI18n $orderStatusI18n The orderStatusI18n object to remove. * @return ChildOrderStatus The current object (for fluent API support) */ public function removeOrderStatusI18n($orderStatusI18n) @@ -1853,7 +1871,7 @@ abstract class OrderStatus implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1893,7 +1911,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildOrderStatus The current object (for fluent API support) + * @return ChildOrderStatus The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1907,9 +1925,9 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildOrderStatus The current object (for fluent API support) + * @return ChildOrderStatus The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1921,7 +1939,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1931,8 +1949,8 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildOrderStatusI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1965,10 +1983,10 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildOrderStatus The current object (for fluent API support) + * @return ChildOrderStatus The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1993,7 +2011,7 @@ abstract class OrderStatus implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildOrderStatusI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2001,6 +2019,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2011,6 +2030,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2023,6 +2043,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2033,6 +2054,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2045,6 +2067,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -2055,6 +2078,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -2067,6 +2091,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -2077,6 +2102,7 @@ abstract class OrderStatus implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -2165,6 +2191,7 @@ abstract class OrderStatus implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/OrderStatusI18n.php b/core/lib/Thelia/Model/Base/OrderStatusI18n.php index 35f21b319..18c757c39 100644 --- a/core/lib/Thelia/Model/Base/OrderStatusI18n.php +++ b/core/lib/Thelia/Model/Base/OrderStatusI18n.php @@ -26,6 +26,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\OrderStatusI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return OrderStatusI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class OrderStatusI18n implements ActiveRecordInterface $this->aOrderStatus = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class OrderStatusI18n implements ActiveRecordInterface $this->modifiedColumns[OrderStatusI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class OrderStatusI18n implements ActiveRecordInterface $this->modifiedColumns[OrderStatusI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class OrderStatusI18n implements ActiveRecordInterface $this->modifiedColumns[OrderStatusI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class OrderStatusI18n implements ActiveRecordInterface $this->modifiedColumns[OrderStatusI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface $this->modifiedColumns[OrderStatusI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : OrderStatusI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see OrderStatusI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface if ($this->isColumnModified(OrderStatusI18nTableMap::DESCRIPTION)) $criteria->add(OrderStatusI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(OrderStatusI18nTableMap::CHAPO)) $criteria->add(OrderStatusI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(OrderStatusI18nTableMap::POSTSCRIPTUM)) $criteria->add(OrderStatusI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\OrderStatusI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\OrderStatusI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\OrderStatusI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\OrderStatusI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class OrderStatusI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildOrderStatus object. * - * @param ChildOrderStatus $v - * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) + * @param ChildOrderStatus $v + * @return \Thelia\Model\OrderStatusI18n The current object (for fluent API support) * @throws PropelException */ public function setOrderStatus(ChildOrderStatus $v = null) @@ -1231,14 +1247,16 @@ abstract class OrderStatusI18n implements ActiveRecordInterface $v->addOrderStatusI18n($this); } + return $this; } + /** * Get the associated ChildOrderStatus object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildOrderStatus The associated ChildOrderStatus object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrderStatus The associated ChildOrderStatus object. * @throws PropelException */ public function getOrderStatus(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/OrderStatusI18nQuery.php b/core/lib/Thelia/Model/Base/OrderStatusI18nQuery.php index 965f46b1a..1de0e360d 100644 --- a/core/lib/Thelia/Model/Base/OrderStatusI18nQuery.php +++ b/core/lib/Thelia/Model/Base/OrderStatusI18nQuery.php @@ -67,9 +67,9 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderStatusI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderStatusI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Returns a new ChildOrderStatusI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderStatusI18nQuery */ @@ -140,10 +140,10 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrderStatusI18n A model object, or null if the key is not found + * @return ChildOrderStatusI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrderStatusI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * * @see filterByOrderStatus() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\OrderStatus object * * @param \Thelia\Model\OrderStatus|ObjectCollection $orderStatus The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderStatus relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class OrderStatusI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderStatusQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderStatusQuery A secondary query class using the current class as primary query */ public function useOrderStatusQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrderStatusI18n $orderStatusI18n Object to remove from the list of results + * @param ChildOrderStatusI18n $orderStatusI18n Object to remove from the list of results * * @return ChildOrderStatusI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Deletes all rows from the order_status_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class OrderStatusI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrderStatusI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrderStatusI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrderStatusI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class OrderStatusI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderStatusI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/OrderStatusQuery.php b/core/lib/Thelia/Model/Base/OrderStatusQuery.php index 3379ce15a..3fa57cb4b 100644 --- a/core/lib/Thelia/Model/Base/OrderStatusQuery.php +++ b/core/lib/Thelia/Model/Base/OrderStatusQuery.php @@ -64,9 +64,9 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\OrderStatusQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderStatus', $modelAlias = null) { @@ -76,8 +76,8 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Returns a new ChildOrderStatusQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildOrderStatusQuery */ @@ -106,7 +106,7 @@ abstract class OrderStatusQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildOrderStatus|array|mixed the result, formatted by the current formatter @@ -137,10 +137,10 @@ abstract class OrderStatusQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildOrderStatus A model object, or null if the key is not found + * @return ChildOrderStatus A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -167,8 +167,8 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildOrderStatus|array|mixed the result, formatted by the current formatter */ @@ -188,8 +188,8 @@ abstract class OrderStatusQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -210,24 +210,26 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildOrderStatusQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(OrderStatusTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildOrderStatusQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(OrderStatusTableMap::ID, $keys, Criteria::IN); } @@ -241,11 +243,11 @@ abstract class OrderStatusQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -281,9 +283,9 @@ abstract class OrderStatusQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -311,13 +313,13 @@ abstract class OrderStatusQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -354,13 +356,13 @@ abstract class OrderStatusQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -390,8 +392,8 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Order object * - * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -413,8 +415,8 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Order relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -447,11 +449,11 @@ abstract class OrderStatusQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query */ public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -463,8 +465,8 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\OrderStatusI18n object * - * @param \Thelia\Model\OrderStatusI18n|ObjectCollection $orderStatusI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\OrderStatusI18n|ObjectCollection $orderStatusI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -486,8 +488,8 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the OrderStatusI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -520,11 +522,11 @@ abstract class OrderStatusQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\OrderStatusI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\OrderStatusI18nQuery A secondary query class using the current class as primary query */ public function useOrderStatusI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -536,7 +538,7 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildOrderStatus $orderStatus Object to remove from the list of results + * @param ChildOrderStatus $orderStatus Object to remove from the list of results * * @return ChildOrderStatusQuery The current query, for fluid interface */ @@ -552,8 +554,8 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Deletes all rows from the order_status table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -584,13 +586,13 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildOrderStatus or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildOrderStatus object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildOrderStatus object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -610,6 +612,7 @@ abstract class OrderStatusQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + OrderStatusTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -628,9 +631,9 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -640,9 +643,9 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -652,7 +655,7 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -662,7 +665,7 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -672,7 +675,7 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -682,7 +685,7 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -694,11 +697,11 @@ abstract class OrderStatusQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -713,10 +716,10 @@ abstract class OrderStatusQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildOrderStatusQuery The current query, for fluid interface + * @return ChildOrderStatusQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -733,11 +736,11 @@ abstract class OrderStatusQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildOrderStatusI18nQuery A secondary query class using the current class as primary query + * @return ChildOrderStatusI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/Product.php b/core/lib/Thelia/Model/Base/Product.php index 500542139..9f93f3f3b 100644 --- a/core/lib/Thelia/Model/Base/Product.php +++ b/core/lib/Thelia/Model/Base/Product.php @@ -55,6 +55,7 @@ abstract class Product implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -265,6 +266,7 @@ abstract class Product implements ActiveRecordInterface // versionable behavior + /** * @var bool */ @@ -578,9 +580,9 @@ abstract class Product implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Product The current object, for fluid interface */ @@ -630,60 +632,66 @@ abstract class Product implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [tax_rule_id] column value. * - * @return int + * @return int */ public function getTaxRuleId() { + return $this->tax_rule_id; } /** * Get the [ref] column value. * - * @return string + * @return string */ public function getRef() { + return $this->ref; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } /** * Get the [template_id] column value. * - * @return int + * @return int */ public function getTemplateId() { + return $this->template_id; } @@ -691,8 +699,8 @@ abstract class Product implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -711,8 +719,8 @@ abstract class Product implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -730,10 +738,11 @@ abstract class Product implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -741,8 +750,8 @@ abstract class Product implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -760,18 +769,19 @@ abstract class Product implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setId($v) { @@ -784,14 +794,15 @@ abstract class Product implements ActiveRecordInterface $this->modifiedColumns[ProductTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [tax_rule_id] column. * - * @param int $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setTaxRuleId($v) { @@ -808,14 +819,15 @@ abstract class Product implements ActiveRecordInterface $this->aTaxRule = null; } + return $this; } // setTaxRuleId() /** * Set the value of [ref] column. * - * @param string $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setRef($v) { @@ -828,14 +840,15 @@ abstract class Product implements ActiveRecordInterface $this->modifiedColumns[ProductTableMap::REF] = true; } + return $this; } // setRef() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setVisible($v) { @@ -848,14 +861,15 @@ abstract class Product implements ActiveRecordInterface $this->modifiedColumns[ProductTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setPosition($v) { @@ -868,14 +882,15 @@ abstract class Product implements ActiveRecordInterface $this->modifiedColumns[ProductTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Set the value of [template_id] column. * - * @param int $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setTemplateId($v) { @@ -892,15 +907,16 @@ abstract class Product implements ActiveRecordInterface $this->aTemplate = null; } + return $this; } // setTemplateId() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -912,15 +928,16 @@ abstract class Product implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -932,14 +949,15 @@ abstract class Product implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setVersion($v) { @@ -952,15 +970,16 @@ abstract class Product implements ActiveRecordInterface $this->modifiedColumns[ProductTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -972,14 +991,15 @@ abstract class Product implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -992,6 +1012,7 @@ abstract class Product implements ActiveRecordInterface $this->modifiedColumns[ProductTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -1043,6 +1064,7 @@ abstract class Product implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -1127,10 +1149,10 @@ abstract class Product implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -1192,7 +1214,7 @@ abstract class Product implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Product::setDeleted() @@ -1235,8 +1257,8 @@ abstract class Product implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1309,8 +1331,8 @@ abstract class Product implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1628,7 +1650,7 @@ abstract class Product implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1742,7 +1764,7 @@ abstract class Product implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1758,12 +1780,12 @@ abstract class Product implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1777,7 +1799,7 @@ abstract class Product implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1828,12 +1850,12 @@ abstract class Product implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1910,12 +1932,12 @@ abstract class Product implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1929,8 +1951,8 @@ abstract class Product implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1985,8 +2007,8 @@ abstract class Product implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -2026,6 +2048,7 @@ abstract class Product implements ActiveRecordInterface if ($this->isColumnModified(ProductTableMap::VERSION)) $criteria->add(ProductTableMap::VERSION, $this->version); if ($this->isColumnModified(ProductTableMap::VERSION_CREATED_AT)) $criteria->add(ProductTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(ProductTableMap::VERSION_CREATED_BY)) $criteria->add(ProductTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -2047,7 +2070,7 @@ abstract class Product implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -2057,7 +2080,7 @@ abstract class Product implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -2071,6 +2094,7 @@ abstract class Product implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -2080,9 +2104,9 @@ abstract class Product implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Product (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Product (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -2185,8 +2209,8 @@ abstract class Product implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Product Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Product Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -2202,8 +2226,8 @@ abstract class Product implements ActiveRecordInterface /** * Declares an association between this object and a ChildTaxRule object. * - * @param ChildTaxRule $v - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildTaxRule $v + * @return \Thelia\Model\Product The current object (for fluent API support) * @throws PropelException */ public function setTaxRule(ChildTaxRule $v = null) @@ -2222,6 +2246,7 @@ abstract class Product implements ActiveRecordInterface $v->addProduct($this); } + return $this; } @@ -2229,8 +2254,8 @@ abstract class Product implements ActiveRecordInterface /** * Get the associated ChildTaxRule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTaxRule The associated ChildTaxRule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTaxRule The associated ChildTaxRule object. * @throws PropelException */ public function getTaxRule(ConnectionInterface $con = null) @@ -2252,8 +2277,8 @@ abstract class Product implements ActiveRecordInterface /** * Declares an association between this object and a ChildTemplate object. * - * @param ChildTemplate $v - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildTemplate $v + * @return \Thelia\Model\Product The current object (for fluent API support) * @throws PropelException */ public function setTemplate(ChildTemplate $v = null) @@ -2272,6 +2297,7 @@ abstract class Product implements ActiveRecordInterface $v->addProduct($this); } + return $this; } @@ -2279,8 +2305,8 @@ abstract class Product implements ActiveRecordInterface /** * Get the associated ChildTemplate object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTemplate The associated ChildTemplate object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTemplate The associated ChildTemplate object. * @throws PropelException */ public function getTemplate(ConnectionInterface $con = null) @@ -2305,7 +2331,7 @@ abstract class Product implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -2374,8 +2400,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2397,8 +2423,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductCategory[] List of ChildProductCategory objects * @throws PropelException */ @@ -2454,14 +2480,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productCategories A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productCategories A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductCategories(Collection $productCategories, ConnectionInterface $con = null) { $productCategoriesToDelete = $this->getProductCategories(new Criteria(), $con)->diff($productCategories); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2485,10 +2512,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related ProductCategory objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductCategory objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductCategory objects. * @throws PropelException */ public function countProductCategories(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2520,8 +2547,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildProductCategory object to this object * through the ChildProductCategory foreign key attribute. * - * @param ChildProductCategory $l ChildProductCategory - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildProductCategory $l ChildProductCategory + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addProductCategory(ChildProductCategory $l) { @@ -2548,7 +2575,7 @@ abstract class Product implements ActiveRecordInterface /** * @param ProductCategory $productCategory The productCategory object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeProductCategory($productCategory) { @@ -2565,6 +2592,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2576,9 +2604,9 @@ abstract class Product implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Product. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProductCategory[] List of ChildProductCategory objects */ public function getProductCategoriesJoinCategory($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2618,8 +2646,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2641,8 +2669,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects * @throws PropelException */ @@ -2698,14 +2726,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureProducts A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $featureProducts A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setFeatureProducts(Collection $featureProducts, ConnectionInterface $con = null) { $featureProductsToDelete = $this->getFeatureProducts(new Criteria(), $con)->diff($featureProducts); + $this->featureProductsScheduledForDeletion = $featureProductsToDelete; foreach ($featureProductsToDelete as $featureProductRemoved) { @@ -2726,10 +2755,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related FeatureProduct objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureProduct objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureProduct objects. * @throws PropelException */ public function countFeatureProducts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2761,8 +2790,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildFeatureProduct object to this object * through the ChildFeatureProduct foreign key attribute. * - * @param ChildFeatureProduct $l ChildFeatureProduct - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildFeatureProduct $l ChildFeatureProduct + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addFeatureProduct(ChildFeatureProduct $l) { @@ -2789,7 +2818,7 @@ abstract class Product implements ActiveRecordInterface /** * @param FeatureProduct $featureProduct The featureProduct object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeFeatureProduct($featureProduct) { @@ -2806,6 +2835,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2817,9 +2847,9 @@ abstract class Product implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Product. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects */ public function getFeatureProductsJoinFeature($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2830,6 +2860,7 @@ abstract class Product implements ActiveRecordInterface return $this->getFeatureProducts($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2841,9 +2872,9 @@ abstract class Product implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Product. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureProduct[] List of ChildFeatureProduct objects */ public function getFeatureProductsJoinFeatureAv($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2883,8 +2914,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2906,8 +2937,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductSaleElements[] List of ChildProductSaleElements objects * @throws PropelException */ @@ -2963,14 +2994,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productSaleElementss A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productSaleElementss A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductSaleElementss(Collection $productSaleElementss, ConnectionInterface $con = null) { $productSaleElementssToDelete = $this->getProductSaleElementss(new Criteria(), $con)->diff($productSaleElementss); + $this->productSaleElementssScheduledForDeletion = $productSaleElementssToDelete; foreach ($productSaleElementssToDelete as $productSaleElementsRemoved) { @@ -2991,10 +3023,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related ProductSaleElements objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductSaleElements objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductSaleElements objects. * @throws PropelException */ public function countProductSaleElementss(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3026,8 +3058,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildProductSaleElements object to this object * through the ChildProductSaleElements foreign key attribute. * - * @param ChildProductSaleElements $l ChildProductSaleElements - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildProductSaleElements $l ChildProductSaleElements + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addProductSaleElements(ChildProductSaleElements $l) { @@ -3054,7 +3086,7 @@ abstract class Product implements ActiveRecordInterface /** * @param ProductSaleElements $productSaleElements The productSaleElements object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeProductSaleElements($productSaleElements) { @@ -3100,8 +3132,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -3123,8 +3155,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductImage[] List of ChildProductImage objects * @throws PropelException */ @@ -3180,14 +3212,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productImages A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productImages A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductImages(Collection $productImages, ConnectionInterface $con = null) { $productImagesToDelete = $this->getProductImages(new Criteria(), $con)->diff($productImages); + $this->productImagesScheduledForDeletion = $productImagesToDelete; foreach ($productImagesToDelete as $productImageRemoved) { @@ -3208,10 +3241,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related ProductImage objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductImage objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductImage objects. * @throws PropelException */ public function countProductImages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3243,8 +3276,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildProductImage object to this object * through the ChildProductImage foreign key attribute. * - * @param ChildProductImage $l ChildProductImage - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildProductImage $l ChildProductImage + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addProductImage(ChildProductImage $l) { @@ -3317,8 +3350,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -3340,8 +3373,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductDocument[] List of ChildProductDocument objects * @throws PropelException */ @@ -3397,14 +3430,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productDocuments A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productDocuments A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductDocuments(Collection $productDocuments, ConnectionInterface $con = null) { $productDocumentsToDelete = $this->getProductDocuments(new Criteria(), $con)->diff($productDocuments); + $this->productDocumentsScheduledForDeletion = $productDocumentsToDelete; foreach ($productDocumentsToDelete as $productDocumentRemoved) { @@ -3425,10 +3459,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related ProductDocument objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductDocument objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductDocument objects. * @throws PropelException */ public function countProductDocuments(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3460,8 +3494,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildProductDocument object to this object * through the ChildProductDocument foreign key attribute. * - * @param ChildProductDocument $l ChildProductDocument - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildProductDocument $l ChildProductDocument + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addProductDocument(ChildProductDocument $l) { @@ -3488,7 +3522,7 @@ abstract class Product implements ActiveRecordInterface /** * @param ProductDocument $productDocument The productDocument object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeProductDocument($productDocument) { @@ -3534,8 +3568,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -3557,8 +3591,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAccessory[] List of ChildAccessory objects * @throws PropelException */ @@ -3614,14 +3648,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $accessoriesRelatedByProductId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $accessoriesRelatedByProductId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setAccessoriesRelatedByProductId(Collection $accessoriesRelatedByProductId, ConnectionInterface $con = null) { $accessoriesRelatedByProductIdToDelete = $this->getAccessoriesRelatedByProductId(new Criteria(), $con)->diff($accessoriesRelatedByProductId); + $this->accessoriesRelatedByProductIdScheduledForDeletion = $accessoriesRelatedByProductIdToDelete; foreach ($accessoriesRelatedByProductIdToDelete as $accessoryRelatedByProductIdRemoved) { @@ -3642,10 +3677,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related Accessory objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Accessory objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Accessory objects. * @throws PropelException */ public function countAccessoriesRelatedByProductId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3677,8 +3712,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildAccessory object to this object * through the ChildAccessory foreign key attribute. * - * @param ChildAccessory $l ChildAccessory - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildAccessory $l ChildAccessory + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addAccessoryRelatedByProductId(ChildAccessory $l) { @@ -3705,7 +3740,7 @@ abstract class Product implements ActiveRecordInterface /** * @param AccessoryRelatedByProductId $accessoryRelatedByProductId The accessoryRelatedByProductId object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeAccessoryRelatedByProductId($accessoryRelatedByProductId) { @@ -3751,8 +3786,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -3774,8 +3809,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAccessory[] List of ChildAccessory objects * @throws PropelException */ @@ -3831,14 +3866,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $accessoriesRelatedByAccessory A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $accessoriesRelatedByAccessory A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setAccessoriesRelatedByAccessory(Collection $accessoriesRelatedByAccessory, ConnectionInterface $con = null) { $accessoriesRelatedByAccessoryToDelete = $this->getAccessoriesRelatedByAccessory(new Criteria(), $con)->diff($accessoriesRelatedByAccessory); + $this->accessoriesRelatedByAccessoryScheduledForDeletion = $accessoriesRelatedByAccessoryToDelete; foreach ($accessoriesRelatedByAccessoryToDelete as $accessoryRelatedByAccessoryRemoved) { @@ -3859,10 +3895,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related Accessory objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Accessory objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Accessory objects. * @throws PropelException */ public function countAccessoriesRelatedByAccessory(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -3894,8 +3930,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildAccessory object to this object * through the ChildAccessory foreign key attribute. * - * @param ChildAccessory $l ChildAccessory - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildAccessory $l ChildAccessory + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addAccessoryRelatedByAccessory(ChildAccessory $l) { @@ -3922,7 +3958,7 @@ abstract class Product implements ActiveRecordInterface /** * @param AccessoryRelatedByAccessory $accessoryRelatedByAccessory The accessoryRelatedByAccessory object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeAccessoryRelatedByAccessory($accessoryRelatedByAccessory) { @@ -3968,8 +4004,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -3991,8 +4027,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCartItem[] List of ChildCartItem objects * @throws PropelException */ @@ -4048,14 +4084,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $cartItems A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $cartItems A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setCartItems(Collection $cartItems, ConnectionInterface $con = null) { $cartItemsToDelete = $this->getCartItems(new Criteria(), $con)->diff($cartItems); + $this->cartItemsScheduledForDeletion = $cartItemsToDelete; foreach ($cartItemsToDelete as $cartItemRemoved) { @@ -4076,10 +4113,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related CartItem objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CartItem objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CartItem objects. * @throws PropelException */ public function countCartItems(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -4111,8 +4148,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildCartItem object to this object * through the ChildCartItem foreign key attribute. * - * @param ChildCartItem $l ChildCartItem - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildCartItem $l ChildCartItem + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addCartItem(ChildCartItem $l) { @@ -4138,7 +4175,7 @@ abstract class Product implements ActiveRecordInterface } /** - * @param CartItem $cartItem The cartItem object to remove. + * @param CartItem $cartItem The cartItem object to remove. * @return ChildProduct The current object (for fluent API support) */ public function removeCartItem($cartItem) @@ -4156,6 +4193,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -4167,9 +4205,9 @@ abstract class Product implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Product. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCartItem[] List of ChildCartItem objects */ public function getCartItemsJoinCart($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -4180,6 +4218,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCartItems($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -4191,9 +4230,9 @@ abstract class Product implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Product. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCartItem[] List of ChildCartItem objects */ public function getCartItemsJoinProductSaleElements($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -4233,8 +4272,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -4256,8 +4295,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductAssociatedContent[] List of ChildProductAssociatedContent objects * @throws PropelException */ @@ -4313,14 +4352,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productAssociatedContents A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productAssociatedContents A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductAssociatedContents(Collection $productAssociatedContents, ConnectionInterface $con = null) { $productAssociatedContentsToDelete = $this->getProductAssociatedContents(new Criteria(), $con)->diff($productAssociatedContents); + $this->productAssociatedContentsScheduledForDeletion = $productAssociatedContentsToDelete; foreach ($productAssociatedContentsToDelete as $productAssociatedContentRemoved) { @@ -4341,10 +4381,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related ProductAssociatedContent objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductAssociatedContent objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductAssociatedContent objects. * @throws PropelException */ public function countProductAssociatedContents(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -4376,8 +4416,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildProductAssociatedContent object to this object * through the ChildProductAssociatedContent foreign key attribute. * - * @param ChildProductAssociatedContent $l ChildProductAssociatedContent - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildProductAssociatedContent $l ChildProductAssociatedContent + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addProductAssociatedContent(ChildProductAssociatedContent $l) { @@ -4404,7 +4444,7 @@ abstract class Product implements ActiveRecordInterface /** * @param ProductAssociatedContent $productAssociatedContent The productAssociatedContent object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeProductAssociatedContent($productAssociatedContent) { @@ -4421,6 +4461,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -4432,9 +4473,9 @@ abstract class Product implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Product. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProductAssociatedContent[] List of ChildProductAssociatedContent objects */ public function getProductAssociatedContentsJoinContent($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -4474,8 +4515,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -4497,8 +4538,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductI18n[] List of ChildProductI18n objects * @throws PropelException */ @@ -4554,14 +4595,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductI18ns(Collection $productI18ns, ConnectionInterface $con = null) { $productI18nsToDelete = $this->getProductI18ns(new Criteria(), $con)->diff($productI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -4585,10 +4627,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related ProductI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductI18n objects. * @throws PropelException */ public function countProductI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -4620,8 +4662,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildProductI18n object to this object * through the ChildProductI18n foreign key attribute. * - * @param ChildProductI18n $l ChildProductI18n - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildProductI18n $l ChildProductI18n + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addProductI18n(ChildProductI18n $l) { @@ -4651,7 +4693,7 @@ abstract class Product implements ActiveRecordInterface } /** - * @param ProductI18n $productI18n The productI18n object to remove. + * @param ProductI18n $productI18n The productI18n object to remove. * @return ChildProduct The current object (for fluent API support) */ public function removeProductI18n($productI18n) @@ -4698,8 +4740,8 @@ abstract class Product implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -4721,8 +4763,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductVersion[] List of ChildProductVersion objects * @throws PropelException */ @@ -4778,14 +4820,15 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productVersions A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productVersions A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductVersions(Collection $productVersions, ConnectionInterface $con = null) { $productVersionsToDelete = $this->getProductVersions(new Criteria(), $con)->diff($productVersions); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -4809,10 +4852,10 @@ abstract class Product implements ActiveRecordInterface /** * Returns the number of related ProductVersion objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductVersion objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductVersion objects. * @throws PropelException */ public function countProductVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -4844,8 +4887,8 @@ abstract class Product implements ActiveRecordInterface * Method called to associate a ChildProductVersion object to this object * through the ChildProductVersion foreign key attribute. * - * @param ChildProductVersion $l ChildProductVersion - * @return \Thelia\Model\Product The current object (for fluent API support) + * @param ChildProductVersion $l ChildProductVersion + * @return \Thelia\Model\Product The current object (for fluent API support) */ public function addProductVersion(ChildProductVersion $l) { @@ -4872,7 +4915,7 @@ abstract class Product implements ActiveRecordInterface /** * @param ProductVersion $productVersion The productVersion object to remove. - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeProductVersion($productVersion) { @@ -4929,8 +4972,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildCategory[] List of ChildCategory objects */ @@ -4960,9 +5003,9 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $categories A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $categories A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setCategories(Collection $categories, ConnectionInterface $con = null) { @@ -4986,9 +5029,9 @@ abstract class Product implements ActiveRecordInterface * Gets the number of ChildCategory objects related by a many-to-many relationship * to the current object by way of the product_category cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildCategory objects */ @@ -5017,7 +5060,7 @@ abstract class Product implements ActiveRecordInterface * through the product_category cross reference table. * * @param ChildCategory $category The ChildProductCategory object to relate - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function addCategory(ChildCategory $category) { @@ -5034,7 +5077,7 @@ abstract class Product implements ActiveRecordInterface } /** - * @param Category $category The category object to add. + * @param Category $category The category object to add. */ protected function doAddCategory($category) { @@ -5053,8 +5096,8 @@ abstract class Product implements ActiveRecordInterface * Remove a ChildCategory object to this object * through the product_category cross reference table. * - * @param ChildCategory $category The ChildProductCategory object to relate - * @return ChildProduct The current object (for fluent API support) + * @param ChildCategory $category The ChildProductCategory object to relate + * @return ChildProduct The current object (for fluent API support) */ public function removeCategory(ChildCategory $category) { @@ -5112,8 +5155,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildProduct[] List of ChildProduct objects */ @@ -5143,9 +5186,9 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productsRelatedByAccessory A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productsRelatedByAccessory A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductsRelatedByAccessory(Collection $productsRelatedByAccessory, ConnectionInterface $con = null) { @@ -5169,9 +5212,9 @@ abstract class Product implements ActiveRecordInterface * Gets the number of ChildProduct objects related by a many-to-many relationship * to the current object by way of the accessory cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildProduct objects */ @@ -5217,7 +5260,7 @@ abstract class Product implements ActiveRecordInterface } /** - * @param ProductRelatedByAccessory $productRelatedByAccessory The productRelatedByAccessory object to add. + * @param ProductRelatedByAccessory $productRelatedByAccessory The productRelatedByAccessory object to add. */ protected function doAddProductRelatedByAccessory($productRelatedByAccessory) { @@ -5236,7 +5279,7 @@ abstract class Product implements ActiveRecordInterface * Remove a ChildProduct object to this object * through the accessory cross reference table. * - * @param ChildProduct $product The ChildAccessory object to relate + * @param ChildProduct $product The ChildAccessory object to relate * @return ChildProduct The current object (for fluent API support) */ public function removeProductRelatedByAccessory(ChildProduct $product) @@ -5295,8 +5338,8 @@ abstract class Product implements ActiveRecordInterface * If this ChildProduct is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildProduct[] List of ChildProduct objects */ @@ -5326,9 +5369,9 @@ abstract class Product implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productsRelatedByProductId A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProduct The current object (for fluent API support) + * @param Collection $productsRelatedByProductId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProduct The current object (for fluent API support) */ public function setProductsRelatedByProductId(Collection $productsRelatedByProductId, ConnectionInterface $con = null) { @@ -5352,9 +5395,9 @@ abstract class Product implements ActiveRecordInterface * Gets the number of ChildProduct objects related by a many-to-many relationship * to the current object by way of the accessory cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildProduct objects */ @@ -5400,7 +5443,7 @@ abstract class Product implements ActiveRecordInterface } /** - * @param ProductRelatedByProductId $productRelatedByProductId The productRelatedByProductId object to add. + * @param ProductRelatedByProductId $productRelatedByProductId The productRelatedByProductId object to add. */ protected function doAddProductRelatedByProductId($productRelatedByProductId) { @@ -5419,7 +5462,7 @@ abstract class Product implements ActiveRecordInterface * Remove a ChildProduct object to this object * through the accessory cross reference table. * - * @param ChildProduct $product The ChildAccessory object to relate + * @param ChildProduct $product The ChildAccessory object to relate * @return ChildProduct The current object (for fluent API support) */ public function removeProductRelatedByProductId(ChildProduct $product) @@ -5469,7 +5512,7 @@ abstract class Product implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -5583,7 +5626,7 @@ abstract class Product implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -5597,9 +5640,9 @@ abstract class Product implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -5611,7 +5654,7 @@ abstract class Product implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -5621,8 +5664,8 @@ abstract class Product implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildProductI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -5655,10 +5698,10 @@ abstract class Product implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -5683,7 +5726,7 @@ abstract class Product implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildProductI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -5691,6 +5734,7 @@ abstract class Product implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -5701,6 +5745,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -5713,6 +5758,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -5723,6 +5769,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -5735,6 +5782,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -5745,6 +5793,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -5757,6 +5806,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -5767,6 +5817,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -5779,6 +5830,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * Get the [meta_title] column value. * @@ -5789,6 +5841,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaTitle(); } + /** * Set the value of [meta_title] column. * @@ -5801,6 +5854,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * Get the [meta_description] column value. * @@ -5811,6 +5865,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaDescription(); } + /** * Set the value of [meta_description] column. * @@ -5823,6 +5878,7 @@ abstract class Product implements ActiveRecordInterface return $this; } + /** * Get the [meta_keywords] column value. * @@ -5833,6 +5889,7 @@ abstract class Product implements ActiveRecordInterface return $this->getCurrentTranslation()->getMetaKeywords(); } + /** * Set the value of [meta_keywords] column. * @@ -5862,7 +5919,7 @@ abstract class Product implements ActiveRecordInterface /** * Checks whether the current state must be recorded as a version * - * @return boolean + * @return boolean */ public function isVersioningNecessary($con = null) { @@ -5884,9 +5941,9 @@ abstract class Product implements ActiveRecordInterface /** * Creates a version of the current object and saves it. * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ChildProductVersion A version object + * @return ChildProductVersion A version object */ public function addVersion($con = null) { @@ -5913,10 +5970,10 @@ abstract class Product implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con The connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con The connection to use * - * @return ChildProduct The current object (for fluent API support) + * @return ChildProduct The current object (for fluent API support) */ public function toVersion($versionNumber, $con = null) { @@ -5932,9 +5989,9 @@ abstract class Product implements ActiveRecordInterface /** * Sets the properties of the current object to the value they had at a specific version * - * @param ChildProductVersion $version The version object to use - * @param ConnectionInterface $con the connection to use - * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. + * @param ChildProductVersion $version The version object to use + * @param ConnectionInterface $con the connection to use + * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return ChildProduct The current object (for fluent API support) */ @@ -5959,9 +6016,9 @@ abstract class Product implements ActiveRecordInterface /** * Gets the latest persisted version number for the current object * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return integer + * @return integer */ public function getLastVersionNumber($con = null) { @@ -5979,9 +6036,9 @@ abstract class Product implements ActiveRecordInterface /** * Checks whether the current object is the latest one * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return Boolean + * @return Boolean */ public function isLastVersion($con = null) { @@ -5991,10 +6048,10 @@ abstract class Product implements ActiveRecordInterface /** * Retrieves a version object for this entity and a version number * - * @param integer $versionNumber The version number to read - * @param ConnectionInterface $con the connection to use + * @param integer $versionNumber The version number to read + * @param ConnectionInterface $con the connection to use * - * @return ChildProductVersion A version object + * @return ChildProductVersion A version object */ public function getOneVersion($versionNumber, $con = null) { @@ -6007,9 +6064,9 @@ abstract class Product implements ActiveRecordInterface /** * Gets all the versions of this object, in incremental order * - * @param ConnectionInterface $con the connection to use + * @param ConnectionInterface $con the connection to use * - * @return ObjectCollection A list of ChildProductVersion objects + * @return ObjectCollection A list of ChildProductVersion objects */ public function getAllVersions($con = null) { @@ -6029,12 +6086,12 @@ abstract class Product implements ActiveRecordInterface * ); * * - * @param integer $versionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $versionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersion($versionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -6054,13 +6111,13 @@ abstract class Product implements ActiveRecordInterface * ); * * - * @param integer $fromVersionNumber - * @param integer $toVersionNumber - * @param string $keys Main key used for the result diff (versions|columns) - * @param ConnectionInterface $con the connection to use - * @param array $ignoredColumns The columns to exclude from the diff. + * @param integer $fromVersionNumber + * @param integer $toVersionNumber + * @param string $keys Main key used for the result diff (versions|columns) + * @param ConnectionInterface $con the connection to use + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ public function compareVersions($fromVersionNumber, $toVersionNumber, $keys = 'columns', $con = null, $ignoredColumns = array()) { @@ -6080,12 +6137,12 @@ abstract class Product implements ActiveRecordInterface * ); * * - * @param array $fromVersion An array representing the original version. - * @param array $toVersion An array representing the destination version. - * @param string $keys Main key used for the result diff (versions|columns). - * @param array $ignoredColumns The columns to exclude from the diff. + * @param array $fromVersion An array representing the original version. + * @param array $toVersion An array representing the destination version. + * @param string $keys Main key used for the result diff (versions|columns). + * @param array $ignoredColumns The columns to exclude from the diff. * - * @return array A list of differences + * @return array A list of differences */ protected function computeDiff($fromVersion, $toVersion, $keys = 'columns', $ignoredColumns = array()) { @@ -6122,7 +6179,7 @@ abstract class Product implements ActiveRecordInterface /** * retrieve the last $number versions. * - * @param Integer $number the number of record to return. + * @param Integer $number the number of record to return. * @return PropelCollection|array \Thelia\Model\ProductVersion[] List of \Thelia\Model\ProductVersion objects */ public function getLastVersions($number = 10, $criteria = null, $con = null) @@ -6209,6 +6266,7 @@ abstract class Product implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ProductAssociatedContent.php b/core/lib/Thelia/Model/Base/ProductAssociatedContent.php index 9f239bbe8..40446fe47 100644 --- a/core/lib/Thelia/Model/Base/ProductAssociatedContent.php +++ b/core/lib/Thelia/Model/Base/ProductAssociatedContent.php @@ -31,6 +31,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductAssociatedContentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -320,9 +321,9 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductAssociatedContent The current object, for fluid interface */ @@ -372,40 +373,44 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [content_id] column value. * - * @return int + * @return int */ public function getContentId() { + return $this->content_id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -413,8 +418,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -433,8 +438,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -452,8 +457,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) */ public function setId($v) { @@ -466,14 +471,15 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface $this->modifiedColumns[ProductAssociatedContentTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) */ public function setProductId($v) { @@ -490,14 +496,15 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setProductId() /** * Set the value of [content_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) */ public function setContentId($v) { @@ -514,14 +521,15 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface $this->aContent = null; } + return $this; } // setContentId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) */ public function setPosition($v) { @@ -534,15 +542,16 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface $this->modifiedColumns[ProductAssociatedContentTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -554,15 +563,16 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -574,6 +584,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -680,10 +691,10 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -720,7 +731,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductAssociatedContent::setDeleted() @@ -763,8 +774,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -825,8 +836,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -876,7 +887,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -960,7 +971,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -976,12 +987,12 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -995,7 +1006,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1031,12 +1042,12 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1075,12 +1086,12 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1094,8 +1105,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1135,8 +1146,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1166,6 +1177,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface if ($this->isColumnModified(ProductAssociatedContentTableMap::POSITION)) $criteria->add(ProductAssociatedContentTableMap::POSITION, $this->position); if ($this->isColumnModified(ProductAssociatedContentTableMap::CREATED_AT)) $criteria->add(ProductAssociatedContentTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProductAssociatedContentTableMap::UPDATED_AT)) $criteria->add(ProductAssociatedContentTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1187,7 +1199,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1197,7 +1209,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1211,6 +1223,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1220,9 +1233,9 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductAssociatedContent (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductAssociatedContent (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1246,8 +1259,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductAssociatedContent Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductAssociatedContent Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1263,8 +1276,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1283,6 +1296,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface $v->addProductAssociatedContent($this); } + return $this; } @@ -1290,8 +1304,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1313,8 +1327,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Declares an association between this object and a ChildContent object. * - * @param ChildContent $v - * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) + * @param ChildContent $v + * @return \Thelia\Model\ProductAssociatedContent The current object (for fluent API support) * @throws PropelException */ public function setContent(ChildContent $v = null) @@ -1333,6 +1347,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface $v->addProductAssociatedContent($this); } + return $this; } @@ -1340,8 +1355,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Get the associated ChildContent object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildContent The associated ChildContent object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildContent The associated ChildContent object. * @throws PropelException */ public function getContent(ConnectionInterface $con = null) @@ -1385,7 +1400,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1411,7 +1426,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProductAssociatedContent The current object (for fluent API support) + * @return ChildProductAssociatedContent The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/ProductAssociatedContentQuery.php b/core/lib/Thelia/Model/Base/ProductAssociatedContentQuery.php index cb62bc280..6ce76b876 100644 --- a/core/lib/Thelia/Model/Base/ProductAssociatedContentQuery.php +++ b/core/lib/Thelia/Model/Base/ProductAssociatedContentQuery.php @@ -71,9 +71,9 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductAssociatedContentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductAssociatedContent', $modelAlias = null) { @@ -83,8 +83,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Returns a new ChildProductAssociatedContentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductAssociatedContentQuery */ @@ -113,7 +113,7 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProductAssociatedContent|array|mixed the result, formatted by the current formatter @@ -144,10 +144,10 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductAssociatedContent A model object, or null if the key is not found + * @return ChildProductAssociatedContent A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -174,8 +174,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductAssociatedContent|array|mixed the result, formatted by the current formatter */ @@ -195,8 +195,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -217,24 +217,26 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ProductAssociatedContentTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ProductAssociatedContentTableMap::ID, $keys, Criteria::IN); } @@ -248,11 +250,11 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -291,11 +293,11 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -334,11 +336,11 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * * @see filterByContent() * - * @param mixed $contentId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $contentId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -375,11 +377,11 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -416,13 +418,13 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -459,13 +461,13 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -495,8 +497,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -520,8 +522,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -554,11 +556,11 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -570,8 +572,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Content object * - * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Content|ObjectCollection $content The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -595,8 +597,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Content relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -629,11 +631,11 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ContentQuery A secondary query class using the current class as primary query */ public function useContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -645,7 +647,7 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductAssociatedContent $productAssociatedContent Object to remove from the list of results + * @param ChildProductAssociatedContent $productAssociatedContent Object to remove from the list of results * * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ @@ -661,8 +663,8 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Deletes all rows from the product_associated_content table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -693,13 +695,13 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductAssociatedContent or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductAssociatedContent object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductAssociatedContent object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -719,6 +721,7 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductAssociatedContentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -737,9 +740,9 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProductAssociatedContentQuery The current query, for fluid interface + * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -749,9 +752,9 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProductAssociatedContentQuery The current query, for fluid interface + * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -761,7 +764,7 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProductAssociatedContentQuery The current query, for fluid interface + * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -771,7 +774,7 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProductAssociatedContentQuery The current query, for fluid interface + * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -781,7 +784,7 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProductAssociatedContentQuery The current query, for fluid interface + * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -791,7 +794,7 @@ abstract class ProductAssociatedContentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProductAssociatedContentQuery The current query, for fluid interface + * @return ChildProductAssociatedContentQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/ProductCategory.php b/core/lib/Thelia/Model/Base/ProductCategory.php index a739d6d38..6e3b6139c 100644 --- a/core/lib/Thelia/Model/Base/ProductCategory.php +++ b/core/lib/Thelia/Model/Base/ProductCategory.php @@ -31,6 +31,7 @@ abstract class ProductCategory implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductCategoryTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -314,9 +315,9 @@ abstract class ProductCategory implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductCategory The current object, for fluid interface */ @@ -366,30 +367,33 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [category_id] column value. * - * @return int + * @return int */ public function getCategoryId() { + return $this->category_id; } /** * Get the [default_category] column value. * - * @return boolean + * @return boolean */ public function getDefaultCategory() { + return $this->default_category; } @@ -397,8 +401,8 @@ abstract class ProductCategory implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -417,8 +421,8 @@ abstract class ProductCategory implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -436,8 +440,8 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductCategory The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductCategory The current object (for fluent API support) */ public function setProductId($v) { @@ -454,14 +458,15 @@ abstract class ProductCategory implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setProductId() /** * Set the value of [category_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductCategory The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductCategory The current object (for fluent API support) */ public function setCategoryId($v) { @@ -478,6 +483,7 @@ abstract class ProductCategory implements ActiveRecordInterface $this->aCategory = null; } + return $this; } // setCategoryId() @@ -488,8 +494,8 @@ abstract class ProductCategory implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\ProductCategory The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\ProductCategory The current object (for fluent API support) */ public function setDefaultCategory($v) { @@ -506,15 +512,16 @@ abstract class ProductCategory implements ActiveRecordInterface $this->modifiedColumns[ProductCategoryTableMap::DEFAULT_CATEGORY] = true; } + return $this; } // setDefaultCategory() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductCategory The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductCategory The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -526,15 +533,16 @@ abstract class ProductCategory implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductCategory The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductCategory The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -546,6 +554,7 @@ abstract class ProductCategory implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -649,10 +658,10 @@ abstract class ProductCategory implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -689,7 +698,7 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductCategory::setDeleted() @@ -732,8 +741,8 @@ abstract class ProductCategory implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -794,8 +803,8 @@ abstract class ProductCategory implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -845,7 +854,7 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -855,6 +864,7 @@ abstract class ProductCategory implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; + // check the columns in natural order for more readable SQL queries if ($this->isColumnModified(ProductCategoryTableMap::PRODUCT_ID)) { $modifiedColumns[':p' . $index++] = '`PRODUCT_ID`'; @@ -911,7 +921,7 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -927,12 +937,12 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -946,7 +956,7 @@ abstract class ProductCategory implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -979,12 +989,12 @@ abstract class ProductCategory implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1022,12 +1032,12 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1041,8 +1051,8 @@ abstract class ProductCategory implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1079,8 +1089,8 @@ abstract class ProductCategory implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1108,6 +1118,7 @@ abstract class ProductCategory implements ActiveRecordInterface if ($this->isColumnModified(ProductCategoryTableMap::DEFAULT_CATEGORY)) $criteria->add(ProductCategoryTableMap::DEFAULT_CATEGORY, $this->default_category); if ($this->isColumnModified(ProductCategoryTableMap::CREATED_AT)) $criteria->add(ProductCategoryTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProductCategoryTableMap::UPDATED_AT)) $criteria->add(ProductCategoryTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1145,7 +1156,7 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1160,6 +1171,7 @@ abstract class ProductCategory implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getProductId()) && (null === $this->getCategoryId()); } @@ -1169,9 +1181,9 @@ abstract class ProductCategory implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductCategory (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductCategory (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1206,8 @@ abstract class ProductCategory implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductCategory Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductCategory Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1223,8 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\ProductCategory The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\ProductCategory The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1231,6 +1243,7 @@ abstract class ProductCategory implements ActiveRecordInterface $v->addProductCategory($this); } + return $this; } @@ -1238,8 +1251,8 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1261,8 +1274,8 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Declares an association between this object and a ChildCategory object. * - * @param ChildCategory $v - * @return \Thelia\Model\ProductCategory The current object (for fluent API support) + * @param ChildCategory $v + * @return \Thelia\Model\ProductCategory The current object (for fluent API support) * @throws PropelException */ public function setCategory(ChildCategory $v = null) @@ -1281,6 +1294,7 @@ abstract class ProductCategory implements ActiveRecordInterface $v->addProductCategory($this); } + return $this; } @@ -1288,8 +1302,8 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Get the associated ChildCategory object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCategory The associated ChildCategory object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCategory The associated ChildCategory object. * @throws PropelException */ public function getCategory(ConnectionInterface $con = null) @@ -1332,7 +1346,7 @@ abstract class ProductCategory implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1358,7 +1372,7 @@ abstract class ProductCategory implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProductCategory The current object (for fluent API support) + * @return ChildProductCategory The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/ProductCategoryQuery.php b/core/lib/Thelia/Model/Base/ProductCategoryQuery.php index e9670019e..1d1e28830 100644 --- a/core/lib/Thelia/Model/Base/ProductCategoryQuery.php +++ b/core/lib/Thelia/Model/Base/ProductCategoryQuery.php @@ -67,9 +67,9 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductCategoryQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductCategory', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Returns a new ChildProductCategoryQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductCategoryQuery */ @@ -140,10 +140,10 @@ abstract class ProductCategoryQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductCategory A model object, or null if the key is not found + * @return ChildProductCategory A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductCategory|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ProductCategoryQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ProductCategoryQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -303,11 +303,11 @@ abstract class ProductCategoryQuery extends ModelCriteria * * @see filterByCategory() * - * @param mixed $categoryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $categoryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -343,12 +343,12 @@ abstract class ProductCategoryQuery extends ModelCriteria * $query->filterByDefaultCategory('yes'); // WHERE default_category = true * * - * @param boolean|string $defaultCategory The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $defaultCategory The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -371,13 +371,13 @@ abstract class ProductCategoryQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -414,13 +414,13 @@ abstract class ProductCategoryQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -450,8 +450,8 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -475,8 +475,8 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -509,11 +509,11 @@ abstract class ProductCategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -525,8 +525,8 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Category object * - * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Category|ObjectCollection $category The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -550,8 +550,8 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Category relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -584,11 +584,11 @@ abstract class ProductCategoryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CategoryQuery A secondary query class using the current class as primary query */ public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -600,7 +600,7 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductCategory $productCategory Object to remove from the list of results + * @param ChildProductCategory $productCategory Object to remove from the list of results * * @return ChildProductCategoryQuery The current query, for fluid interface */ @@ -618,8 +618,8 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Deletes all rows from the product_category table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -650,13 +650,13 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductCategory or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductCategory object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductCategory object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -676,6 +676,7 @@ abstract class ProductCategoryQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductCategoryTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -694,9 +695,9 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProductCategoryQuery The current query, for fluid interface + * @return ChildProductCategoryQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -706,9 +707,9 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProductCategoryQuery The current query, for fluid interface + * @return ChildProductCategoryQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -718,7 +719,7 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProductCategoryQuery The current query, for fluid interface + * @return ChildProductCategoryQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -728,7 +729,7 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProductCategoryQuery The current query, for fluid interface + * @return ChildProductCategoryQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -738,7 +739,7 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProductCategoryQuery The current query, for fluid interface + * @return ChildProductCategoryQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -748,7 +749,7 @@ abstract class ProductCategoryQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProductCategoryQuery The current query, for fluid interface + * @return ChildProductCategoryQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/ProductDocument.php b/core/lib/Thelia/Model/Base/ProductDocument.php index ca7633078..e8d35e2cb 100644 --- a/core/lib/Thelia/Model/Base/ProductDocument.php +++ b/core/lib/Thelia/Model/Base/ProductDocument.php @@ -32,6 +32,7 @@ abstract class ProductDocument implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductDocumentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class ProductDocument implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductDocument The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class ProductDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class ProductDocument implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class ProductDocument implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) */ public function setProductId($v) { @@ -512,14 +518,15 @@ abstract class ProductDocument implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setProductId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class ProductDocument implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class ProductDocument implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class ProductDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class ProductDocument implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class ProductDocument implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductDocument::setDeleted() @@ -779,8 +790,8 @@ abstract class ProductDocument implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class ProductDocument implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class ProductDocument implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class ProductDocument implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class ProductDocument implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class ProductDocument implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class ProductDocument implements ActiveRecordInterface if ($this->isColumnModified(ProductDocumentTableMap::POSITION)) $criteria->add(ProductDocumentTableMap::POSITION, $this->position); if ($this->isColumnModified(ProductDocumentTableMap::CREATED_AT)) $criteria->add(ProductDocumentTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProductDocumentTableMap::UPDATED_AT)) $criteria->add(ProductDocumentTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class ProductDocument implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class ProductDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductDocument (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductDocument (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class ProductDocument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductDocument Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductDocument Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1323,14 +1336,16 @@ abstract class ProductDocument implements ActiveRecordInterface $v->addProductDocument($this); } + return $this; } + /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class ProductDocument implements ActiveRecordInterface return $this->aProduct; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class ProductDocument implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class ProductDocument implements ActiveRecordInterface * If this ChildProductDocument is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductDocumentI18n[] List of ChildProductDocumentI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class ProductDocument implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productDocumentI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProductDocument The current object (for fluent API support) + * @param Collection $productDocumentI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProductDocument The current object (for fluent API support) */ public function setProductDocumentI18ns(Collection $productDocumentI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Returns the number of related ProductDocumentI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductDocumentI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductDocumentI18n objects. * @throws PropelException */ public function countProductDocumentI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class ProductDocument implements ActiveRecordInterface * Method called to associate a ChildProductDocumentI18n object to this object * through the ChildProductDocumentI18n foreign key attribute. * - * @param ChildProductDocumentI18n $l ChildProductDocumentI18n - * @return \Thelia\Model\ProductDocument The current object (for fluent API support) + * @param ChildProductDocumentI18n $l ChildProductDocumentI18n + * @return \Thelia\Model\ProductDocument The current object (for fluent API support) */ public function addProductDocumentI18n(ChildProductDocumentI18n $l) { @@ -1571,7 +1587,7 @@ abstract class ProductDocument implements ActiveRecordInterface } /** - * @param ProductDocumentI18n $productDocumentI18n The productDocumentI18n object to remove. + * @param ProductDocumentI18n $productDocumentI18n The productDocumentI18n object to remove. * @return ChildProductDocument The current object (for fluent API support) */ public function removeProductDocumentI18n($productDocumentI18n) @@ -1614,7 +1630,7 @@ abstract class ProductDocument implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProductDocument The current object (for fluent API support) + * @return ChildProductDocument The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildProductDocument The current object (for fluent API support) + * @return ChildProductDocument The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildProductDocumentI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildProductDocument The current object (for fluent API support) + * @return ChildProductDocument The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class ProductDocument implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildProductDocumentI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/ProductDocumentI18n.php b/core/lib/Thelia/Model/Base/ProductDocumentI18n.php index 96aabab73..cf9d7e57e 100644 --- a/core/lib/Thelia/Model/Base/ProductDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/ProductDocumentI18n.php @@ -26,6 +26,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductDocumentI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductDocumentI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface $this->aProductDocument = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface $this->modifiedColumns[ProductDocumentI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductDocumentI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductDocumentI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface if ($this->isColumnModified(ProductDocumentI18nTableMap::DESCRIPTION)) $criteria->add(ProductDocumentI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ProductDocumentI18nTableMap::CHAPO)) $criteria->add(ProductDocumentI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ProductDocumentI18nTableMap::POSTSCRIPTUM)) $criteria->add(ProductDocumentI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductDocumentI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductDocumentI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductDocumentI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductDocumentI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildProductDocument object. * - * @param ChildProductDocument $v - * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) + * @param ChildProductDocument $v + * @return \Thelia\Model\ProductDocumentI18n The current object (for fluent API support) * @throws PropelException */ public function setProductDocument(ChildProductDocument $v = null) @@ -1231,14 +1247,16 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface $v->addProductDocumentI18n($this); } + return $this; } + /** * Get the associated ChildProductDocument object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProductDocument The associated ChildProductDocument object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProductDocument The associated ChildProductDocument object. * @throws PropelException */ public function getProductDocument(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ProductDocumentI18nQuery.php b/core/lib/Thelia/Model/Base/ProductDocumentI18nQuery.php index d2f8a4176..79d4854b4 100644 --- a/core/lib/Thelia/Model/Base/ProductDocumentI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ProductDocumentI18nQuery.php @@ -67,9 +67,9 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductDocumentI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductDocumentI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Returns a new ChildProductDocumentI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductDocumentI18nQuery */ @@ -140,10 +140,10 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductDocumentI18n A model object, or null if the key is not found + * @return ChildProductDocumentI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductDocumentI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * * @see filterByProductDocument() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ProductDocument object * * @param \Thelia\Model\ProductDocument|ObjectCollection $productDocument The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductDocumentQuery A secondary query class using the current class as primary query */ public function useProductDocumentQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductDocumentI18n $productDocumentI18n Object to remove from the list of results + * @param ChildProductDocumentI18n $productDocumentI18n Object to remove from the list of results * * @return ChildProductDocumentI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Deletes all rows from the product_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ProductDocumentI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductDocumentI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ProductDocumentQuery.php b/core/lib/Thelia/Model/Base/ProductDocumentQuery.php index 1647bae4c..f5d9d446c 100644 --- a/core/lib/Thelia/Model/Base/ProductDocumentQuery.php +++ b/core/lib/Thelia/Model/Base/ProductDocumentQuery.php @@ -72,9 +72,9 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductDocumentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductDocument', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Returns a new ChildProductDocumentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductDocumentQuery */ @@ -114,7 +114,7 @@ abstract class ProductDocumentQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProductDocument|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class ProductDocumentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductDocument A model object, or null if the key is not found + * @return ChildProductDocument A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductDocument|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class ProductDocumentQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ProductDocumentTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductDocumentQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ProductDocumentTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class ProductDocumentQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class ProductDocumentQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class ProductDocumentQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class ProductDocumentQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class ProductDocumentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class ProductDocumentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class ProductDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductDocumentI18n object * - * @param \Thelia\Model\ProductDocumentI18n|ObjectCollection $productDocumentI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductDocumentI18n|ObjectCollection $productDocumentI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductDocumentI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class ProductDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductDocumentI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductDocumentI18nQuery A secondary query class using the current class as primary query */ public function useProductDocumentI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductDocument $productDocument Object to remove from the list of results + * @param ChildProductDocument $productDocument Object to remove from the list of results * * @return ChildProductDocumentQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Deletes all rows from the product_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class ProductDocumentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductDocumentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class ProductDocumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class ProductDocumentQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductDocumentQuery The current query, for fluid interface + * @return ChildProductDocumentQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class ProductDocumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductDocumentI18nQuery A secondary query class using the current class as primary query + * @return ChildProductDocumentI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/ProductI18n.php b/core/lib/Thelia/Model/Base/ProductI18n.php index 728ae7764..ef90f2de5 100644 --- a/core/lib/Thelia/Model/Base/ProductI18n.php +++ b/core/lib/Thelia/Model/Base/ProductI18n.php @@ -26,6 +26,7 @@ abstract class ProductI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class ProductI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductI18n The current object, for fluid interface */ @@ -394,98 +395,107 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Get the [meta_title] column value. * - * @return string + * @return string */ public function getMetaTitle() { + return $this->meta_title; } /** * Get the [meta_description] column value. * - * @return string + * @return string */ public function getMetaDescription() { + return $this->meta_description; } /** * Get the [meta_keywords] column value. * - * @return string + * @return string */ public function getMetaKeywords() { + return $this->meta_keywords; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setId($v) { @@ -502,14 +512,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -522,14 +533,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -542,14 +554,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -562,14 +575,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -582,14 +596,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -602,14 +617,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() /** * Set the value of [meta_title] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setMetaTitle($v) { @@ -622,14 +638,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::META_TITLE] = true; } + return $this; } // setMetaTitle() /** * Set the value of [meta_description] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setMetaDescription($v) { @@ -642,14 +659,15 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::META_DESCRIPTION] = true; } + return $this; } // setMetaDescription() /** * Set the value of [meta_keywords] column. * - * @param string $v new value - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) */ public function setMetaKeywords($v) { @@ -662,6 +680,7 @@ abstract class ProductI18n implements ActiveRecordInterface $this->modifiedColumns[ProductI18nTableMap::META_KEYWORDS] = true; } + return $this; } // setMetaKeywords() @@ -705,6 +724,7 @@ abstract class ProductI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -771,10 +791,10 @@ abstract class ProductI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -810,7 +830,7 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductI18n::setDeleted() @@ -853,8 +873,8 @@ abstract class ProductI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -904,8 +924,8 @@ abstract class ProductI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -948,7 +968,7 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1039,7 +1059,7 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1055,12 +1075,12 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1074,7 +1094,7 @@ abstract class ProductI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1119,12 +1139,12 @@ abstract class ProductI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1163,12 +1183,12 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1182,8 +1202,8 @@ abstract class ProductI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1232,8 +1252,8 @@ abstract class ProductI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1269,6 +1289,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->isColumnModified(ProductI18nTableMap::META_TITLE)) $criteria->add(ProductI18nTableMap::META_TITLE, $this->meta_title); if ($this->isColumnModified(ProductI18nTableMap::META_DESCRIPTION)) $criteria->add(ProductI18nTableMap::META_DESCRIPTION, $this->meta_description); if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORDS)) $criteria->add(ProductI18nTableMap::META_KEYWORDS, $this->meta_keywords); + return $criteria; } @@ -1306,7 +1327,7 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1321,6 +1342,7 @@ abstract class ProductI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1330,9 +1352,9 @@ abstract class ProductI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1359,8 +1381,8 @@ abstract class ProductI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1376,8 +1398,8 @@ abstract class ProductI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\ProductI18n The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\ProductI18n The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1396,14 +1418,16 @@ abstract class ProductI18n implements ActiveRecordInterface $v->addProductI18n($this); } + return $this; } + /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1451,7 +1475,7 @@ abstract class ProductI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ProductI18nQuery.php b/core/lib/Thelia/Model/Base/ProductI18nQuery.php index 4d9b53540..ab99a0ef2 100644 --- a/core/lib/Thelia/Model/Base/ProductI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ProductI18nQuery.php @@ -79,9 +79,9 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductI18n', $modelAlias = null) { @@ -91,8 +91,8 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Returns a new ChildProductI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductI18nQuery */ @@ -152,10 +152,10 @@ abstract class ProductI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductI18n A model object, or null if the key is not found + * @return ChildProductI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -183,8 +183,8 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductI18n|array|mixed the result, formatted by the current formatter */ @@ -204,8 +204,8 @@ abstract class ProductI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -226,7 +226,7 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -241,7 +241,7 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -272,11 +272,11 @@ abstract class ProductI18nQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -312,9 +312,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -341,9 +341,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -370,9 +370,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -399,9 +399,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -428,9 +428,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -457,9 +457,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByMetaTitle('%fooValue%'); // WHERE meta_title LIKE '%fooValue%' * * - * @param string $metaTitle The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaTitle The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -486,9 +486,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByMetaDescription('%fooValue%'); // WHERE meta_description LIKE '%fooValue%' * * - * @param string $metaDescription The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaDescription The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -515,9 +515,9 @@ abstract class ProductI18nQuery extends ModelCriteria * $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%' * * - * @param string $metaKeywords The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $metaKeywords The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -538,8 +538,8 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -563,8 +563,8 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -597,11 +597,11 @@ abstract class ProductI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -613,7 +613,7 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductI18n $productI18n Object to remove from the list of results + * @param ChildProductI18n $productI18n Object to remove from the list of results * * @return ChildProductI18nQuery The current query, for fluid interface */ @@ -631,8 +631,8 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Deletes all rows from the product_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -663,13 +663,13 @@ abstract class ProductI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -689,6 +689,7 @@ abstract class ProductI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ProductImage.php b/core/lib/Thelia/Model/Base/ProductImage.php index b5eb690b5..bb0973b2d 100644 --- a/core/lib/Thelia/Model/Base/ProductImage.php +++ b/core/lib/Thelia/Model/Base/ProductImage.php @@ -32,6 +32,7 @@ abstract class ProductImage implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductImageTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -342,9 +343,9 @@ abstract class ProductImage implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductImage The current object, for fluid interface */ @@ -394,40 +395,44 @@ abstract class ProductImage implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [file] column value. * - * @return string + * @return string */ public function getFile() { + return $this->file; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -435,8 +440,8 @@ abstract class ProductImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -455,8 +460,8 @@ abstract class ProductImage implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -474,8 +479,8 @@ abstract class ProductImage implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductImage The current object (for fluent API support) */ public function setId($v) { @@ -488,14 +493,15 @@ abstract class ProductImage implements ActiveRecordInterface $this->modifiedColumns[ProductImageTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductImage The current object (for fluent API support) */ public function setProductId($v) { @@ -512,14 +518,15 @@ abstract class ProductImage implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setProductId() /** * Set the value of [file] column. * - * @param string $v new value - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductImage The current object (for fluent API support) */ public function setFile($v) { @@ -532,14 +539,15 @@ abstract class ProductImage implements ActiveRecordInterface $this->modifiedColumns[ProductImageTableMap::FILE] = true; } + return $this; } // setFile() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductImage The current object (for fluent API support) */ public function setPosition($v) { @@ -552,15 +560,16 @@ abstract class ProductImage implements ActiveRecordInterface $this->modifiedColumns[ProductImageTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductImage The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -572,15 +581,16 @@ abstract class ProductImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductImage The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -592,6 +602,7 @@ abstract class ProductImage implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -695,10 +706,10 @@ abstract class ProductImage implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -736,7 +747,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductImage::setDeleted() @@ -779,8 +790,8 @@ abstract class ProductImage implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -841,8 +852,8 @@ abstract class ProductImage implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -902,7 +913,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -986,7 +997,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1002,12 +1013,12 @@ abstract class ProductImage implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1021,7 +1032,7 @@ abstract class ProductImage implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1057,12 +1068,12 @@ abstract class ProductImage implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1101,12 +1112,12 @@ abstract class ProductImage implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1120,8 +1131,8 @@ abstract class ProductImage implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1161,8 +1172,8 @@ abstract class ProductImage implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1192,6 +1203,7 @@ abstract class ProductImage implements ActiveRecordInterface if ($this->isColumnModified(ProductImageTableMap::POSITION)) $criteria->add(ProductImageTableMap::POSITION, $this->position); if ($this->isColumnModified(ProductImageTableMap::CREATED_AT)) $criteria->add(ProductImageTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProductImageTableMap::UPDATED_AT)) $criteria->add(ProductImageTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1213,7 +1225,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1223,7 +1235,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1237,6 +1249,7 @@ abstract class ProductImage implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1246,9 +1259,9 @@ abstract class ProductImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductImage (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductImage (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1286,8 +1299,8 @@ abstract class ProductImage implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductImage Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductImage Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1303,8 +1316,8 @@ abstract class ProductImage implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\ProductImage The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1323,14 +1336,16 @@ abstract class ProductImage implements ActiveRecordInterface $v->addProductImage($this); } + return $this; } + /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1349,12 +1364,13 @@ abstract class ProductImage implements ActiveRecordInterface return $this->aProduct; } + /** * Initializes a collection based on the name of a relation. * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1393,8 +1409,8 @@ abstract class ProductImage implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1416,8 +1432,8 @@ abstract class ProductImage implements ActiveRecordInterface * If this ChildProductImage is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductImageI18n[] List of ChildProductImageI18n objects * @throws PropelException */ @@ -1473,9 +1489,9 @@ abstract class ProductImage implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productImageI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProductImage The current object (for fluent API support) + * @param Collection $productImageI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProductImage The current object (for fluent API support) */ public function setProductImageI18ns(Collection $productImageI18ns, ConnectionInterface $con = null) { @@ -1505,10 +1521,10 @@ abstract class ProductImage implements ActiveRecordInterface /** * Returns the number of related ProductImageI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductImageI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductImageI18n objects. * @throws PropelException */ public function countProductImageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1540,8 +1556,8 @@ abstract class ProductImage implements ActiveRecordInterface * Method called to associate a ChildProductImageI18n object to this object * through the ChildProductImageI18n foreign key attribute. * - * @param ChildProductImageI18n $l ChildProductImageI18n - * @return \Thelia\Model\ProductImage The current object (for fluent API support) + * @param ChildProductImageI18n $l ChildProductImageI18n + * @return \Thelia\Model\ProductImage The current object (for fluent API support) */ public function addProductImageI18n(ChildProductImageI18n $l) { @@ -1571,7 +1587,7 @@ abstract class ProductImage implements ActiveRecordInterface } /** - * @param ProductImageI18n $productImageI18n The productImageI18n object to remove. + * @param ProductImageI18n $productImageI18n The productImageI18n object to remove. * @return ChildProductImage The current object (for fluent API support) */ public function removeProductImageI18n($productImageI18n) @@ -1614,7 +1630,7 @@ abstract class ProductImage implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1649,7 +1665,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProductImage The current object (for fluent API support) + * @return ChildProductImage The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1663,9 +1679,9 @@ abstract class ProductImage implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildProductImage The current object (for fluent API support) + * @return ChildProductImage The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1677,7 +1693,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1687,8 +1703,8 @@ abstract class ProductImage implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildProductImageI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1721,10 +1737,10 @@ abstract class ProductImage implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildProductImage The current object (for fluent API support) + * @return ChildProductImage The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1749,7 +1765,7 @@ abstract class ProductImage implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildProductImageI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) diff --git a/core/lib/Thelia/Model/Base/ProductImageI18n.php b/core/lib/Thelia/Model/Base/ProductImageI18n.php index 4dceba1d6..ede0e5516 100644 --- a/core/lib/Thelia/Model/Base/ProductImageI18n.php +++ b/core/lib/Thelia/Model/Base/ProductImageI18n.php @@ -26,6 +26,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductImageI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ProductImageI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductImageI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ProductImageI18n implements ActiveRecordInterface $this->aProductImage = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ProductImageI18n implements ActiveRecordInterface $this->modifiedColumns[ProductImageI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ProductImageI18n implements ActiveRecordInterface $this->modifiedColumns[ProductImageI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ProductImageI18n implements ActiveRecordInterface $this->modifiedColumns[ProductImageI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ProductImageI18n implements ActiveRecordInterface $this->modifiedColumns[ProductImageI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface $this->modifiedColumns[ProductImageI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductImageI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ProductImageI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductImageI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ProductImageI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ProductImageI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ProductImageI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ProductImageI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ProductImageI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface if ($this->isColumnModified(ProductImageI18nTableMap::DESCRIPTION)) $criteria->add(ProductImageI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ProductImageI18nTableMap::CHAPO)) $criteria->add(ProductImageI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ProductImageI18nTableMap::POSTSCRIPTUM)) $criteria->add(ProductImageI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ProductImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductImageI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductImageI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ProductImageI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductImageI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductImageI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ProductImageI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildProductImage object. * - * @param ChildProductImage $v - * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) + * @param ChildProductImage $v + * @return \Thelia\Model\ProductImageI18n The current object (for fluent API support) * @throws PropelException */ public function setProductImage(ChildProductImage $v = null) @@ -1231,14 +1247,16 @@ abstract class ProductImageI18n implements ActiveRecordInterface $v->addProductImageI18n($this); } + return $this; } + /** * Get the associated ChildProductImage object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProductImage The associated ChildProductImage object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProductImage The associated ChildProductImage object. * @throws PropelException */ public function getProductImage(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ProductImageI18nQuery.php b/core/lib/Thelia/Model/Base/ProductImageI18nQuery.php index de5ddd262..cb588e56c 100644 --- a/core/lib/Thelia/Model/Base/ProductImageI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ProductImageI18nQuery.php @@ -67,9 +67,9 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductImageI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductImageI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Returns a new ChildProductImageI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductImageI18nQuery */ @@ -140,10 +140,10 @@ abstract class ProductImageI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductImageI18n A model object, or null if the key is not found + * @return ChildProductImageI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductImageI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ProductImageI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ProductImageI18nQuery extends ModelCriteria * * @see filterByProductImage() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ProductImageI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ProductImageI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ProductImageI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ProductImageI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ProductImageI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -440,7 +440,7 @@ abstract class ProductImageI18nQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ProductImage object * * @param \Thelia\Model\ProductImage|ObjectCollection $productImage The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ProductImageI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductImageQuery A secondary query class using the current class as primary query */ public function useProductImageQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductImageI18n $productImageI18n Object to remove from the list of results + * @param ChildProductImageI18n $productImageI18n Object to remove from the list of results * * @return ChildProductImageI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Deletes all rows from the product_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ProductImageI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ProductImageI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductImageI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ProductImageQuery.php b/core/lib/Thelia/Model/Base/ProductImageQuery.php index 3e28b19e7..cb73e994b 100644 --- a/core/lib/Thelia/Model/Base/ProductImageQuery.php +++ b/core/lib/Thelia/Model/Base/ProductImageQuery.php @@ -72,9 +72,9 @@ abstract class ProductImageQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductImageQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductImage', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class ProductImageQuery extends ModelCriteria /** * Returns a new ChildProductImageQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductImageQuery */ @@ -114,7 +114,7 @@ abstract class ProductImageQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProductImage|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class ProductImageQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductImage A model object, or null if the key is not found + * @return ChildProductImage A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class ProductImageQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductImage|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class ProductImageQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class ProductImageQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductImageQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ProductImageTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductImageQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ProductImageTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class ProductImageQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -292,11 +294,11 @@ abstract class ProductImageQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -332,9 +334,9 @@ abstract class ProductImageQuery extends ModelCriteria * $query->filterByFile('%fooValue%'); // WHERE file LIKE '%fooValue%' * * - * @param string $file The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $file The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -362,11 +364,11 @@ abstract class ProductImageQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -403,13 +405,13 @@ abstract class ProductImageQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -446,13 +448,13 @@ abstract class ProductImageQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -482,8 +484,8 @@ abstract class ProductImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -507,8 +509,8 @@ abstract class ProductImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -541,11 +543,11 @@ abstract class ProductImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -557,8 +559,8 @@ abstract class ProductImageQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductImageI18n object * - * @param \Thelia\Model\ProductImageI18n|ObjectCollection $productImageI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductImageI18n|ObjectCollection $productImageI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -580,8 +582,8 @@ abstract class ProductImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductImageI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -614,11 +616,11 @@ abstract class ProductImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductImageI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductImageI18nQuery A secondary query class using the current class as primary query */ public function useProductImageI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -630,7 +632,7 @@ abstract class ProductImageQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductImage $productImage Object to remove from the list of results + * @param ChildProductImage $productImage Object to remove from the list of results * * @return ChildProductImageQuery The current query, for fluid interface */ @@ -646,8 +648,8 @@ abstract class ProductImageQuery extends ModelCriteria /** * Deletes all rows from the product_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -678,13 +680,13 @@ abstract class ProductImageQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -704,6 +706,7 @@ abstract class ProductImageQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductImageTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -722,9 +725,9 @@ abstract class ProductImageQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -734,9 +737,9 @@ abstract class ProductImageQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -746,7 +749,7 @@ abstract class ProductImageQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -756,7 +759,7 @@ abstract class ProductImageQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -766,7 +769,7 @@ abstract class ProductImageQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -776,7 +779,7 @@ abstract class ProductImageQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -788,11 +791,11 @@ abstract class ProductImageQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -807,10 +810,10 @@ abstract class ProductImageQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductImageQuery The current query, for fluid interface + * @return ChildProductImageQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -827,11 +830,11 @@ abstract class ProductImageQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductImageI18nQuery A secondary query class using the current class as primary query + * @return ChildProductImageI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/ProductPrice.php b/core/lib/Thelia/Model/Base/ProductPrice.php index 0990febcc..a883a524c 100644 --- a/core/lib/Thelia/Model/Base/ProductPrice.php +++ b/core/lib/Thelia/Model/Base/ProductPrice.php @@ -31,6 +31,7 @@ abstract class ProductPrice implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductPriceTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -344,9 +345,9 @@ abstract class ProductPrice implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductPrice The current object, for fluid interface */ @@ -396,50 +397,55 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Get the [product_sale_elements_id] column value. * - * @return int + * @return int */ public function getProductSaleElementsId() { + return $this->product_sale_elements_id; } /** * Get the [currency_id] column value. * - * @return int + * @return int */ public function getCurrencyId() { + return $this->currency_id; } /** * Get the [price] column value. * - * @return double + * @return double */ public function getPrice() { + return $this->price; } /** * Get the [promo_price] column value. * - * @return double + * @return double */ public function getPromoPrice() { + return $this->promo_price; } /** * Get the [from_default_currency] column value. * - * @return boolean + * @return boolean */ public function getFromDefaultCurrency() { + return $this->from_default_currency; } @@ -447,8 +453,8 @@ abstract class ProductPrice implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -467,8 +473,8 @@ abstract class ProductPrice implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -486,8 +492,8 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Set the value of [product_sale_elements_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) */ public function setProductSaleElementsId($v) { @@ -504,14 +510,15 @@ abstract class ProductPrice implements ActiveRecordInterface $this->aProductSaleElements = null; } + return $this; } // setProductSaleElementsId() /** * Set the value of [currency_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) */ public function setCurrencyId($v) { @@ -528,14 +535,15 @@ abstract class ProductPrice implements ActiveRecordInterface $this->aCurrency = null; } + return $this; } // setCurrencyId() /** * Set the value of [price] column. * - * @param double $v new value - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) */ public function setPrice($v) { @@ -548,14 +556,15 @@ abstract class ProductPrice implements ActiveRecordInterface $this->modifiedColumns[ProductPriceTableMap::PRICE] = true; } + return $this; } // setPrice() /** * Set the value of [promo_price] column. * - * @param double $v new value - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) */ public function setPromoPrice($v) { @@ -568,6 +577,7 @@ abstract class ProductPrice implements ActiveRecordInterface $this->modifiedColumns[ProductPriceTableMap::PROMO_PRICE] = true; } + return $this; } // setPromoPrice() @@ -578,8 +588,8 @@ abstract class ProductPrice implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) */ public function setFromDefaultCurrency($v) { @@ -596,15 +606,16 @@ abstract class ProductPrice implements ActiveRecordInterface $this->modifiedColumns[ProductPriceTableMap::FROM_DEFAULT_CURRENCY] = true; } + return $this; } // setFromDefaultCurrency() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -616,15 +627,16 @@ abstract class ProductPrice implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -636,6 +648,7 @@ abstract class ProductPrice implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -687,6 +700,7 @@ abstract class ProductPrice implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductPriceTableMap::translateFieldName('ProductSaleElementsId', TableMap::TYPE_PHPNAME, $indexType)]; $this->product_sale_elements_id = (null !== $col) ? (int) $col : null; @@ -756,10 +770,10 @@ abstract class ProductPrice implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -796,7 +810,7 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductPrice::setDeleted() @@ -839,8 +853,8 @@ abstract class ProductPrice implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -901,8 +915,8 @@ abstract class ProductPrice implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -952,7 +966,7 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1031,7 +1045,7 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1047,12 +1061,12 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1066,7 +1080,7 @@ abstract class ProductPrice implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1105,12 +1119,12 @@ abstract class ProductPrice implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1150,12 +1164,12 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1169,8 +1183,8 @@ abstract class ProductPrice implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1213,8 +1227,8 @@ abstract class ProductPrice implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1246,6 +1260,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->isColumnModified(ProductPriceTableMap::FROM_DEFAULT_CURRENCY)) $criteria->add(ProductPriceTableMap::FROM_DEFAULT_CURRENCY, $this->from_default_currency); if ($this->isColumnModified(ProductPriceTableMap::CREATED_AT)) $criteria->add(ProductPriceTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProductPriceTableMap::UPDATED_AT)) $criteria->add(ProductPriceTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1283,7 +1298,7 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1298,6 +1313,7 @@ abstract class ProductPrice implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getProductSaleElementsId()) && (null === $this->getCurrencyId()); } @@ -1307,9 +1323,9 @@ abstract class ProductPrice implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductPrice (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductPrice (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1334,8 +1350,8 @@ abstract class ProductPrice implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductPrice Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductPrice Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1351,8 +1367,8 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Declares an association between this object and a ChildProductSaleElements object. * - * @param ChildProductSaleElements $v - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param ChildProductSaleElements $v + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) * @throws PropelException */ public function setProductSaleElements(ChildProductSaleElements $v = null) @@ -1371,14 +1387,16 @@ abstract class ProductPrice implements ActiveRecordInterface $v->addProductPrice($this); } + return $this; } + /** * Get the associated ChildProductSaleElements object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProductSaleElements The associated ChildProductSaleElements object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProductSaleElements The associated ChildProductSaleElements object. * @throws PropelException */ public function getProductSaleElements(ConnectionInterface $con = null) @@ -1400,8 +1418,8 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Declares an association between this object and a ChildCurrency object. * - * @param ChildCurrency $v - * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + * @param ChildCurrency $v + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) * @throws PropelException */ public function setCurrency(ChildCurrency $v = null) @@ -1420,14 +1438,16 @@ abstract class ProductPrice implements ActiveRecordInterface $v->addProductPrice($this); } + return $this; } + /** * Get the associated ChildCurrency object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCurrency The associated ChildCurrency object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCurrency The associated ChildCurrency object. * @throws PropelException */ public function getCurrency(ConnectionInterface $con = null) @@ -1473,7 +1493,7 @@ abstract class ProductPrice implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1499,7 +1519,7 @@ abstract class ProductPrice implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProductPrice The current object (for fluent API support) + * @return ChildProductPrice The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1584,6 +1604,7 @@ abstract class ProductPrice implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ProductPriceQuery.php b/core/lib/Thelia/Model/Base/ProductPriceQuery.php index 469f45185..269fc833c 100644 --- a/core/lib/Thelia/Model/Base/ProductPriceQuery.php +++ b/core/lib/Thelia/Model/Base/ProductPriceQuery.php @@ -75,9 +75,9 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductPriceQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductPrice', $modelAlias = null) { @@ -87,8 +87,8 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Returns a new ChildProductPriceQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductPriceQuery */ @@ -148,10 +148,10 @@ abstract class ProductPriceQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductPrice A model object, or null if the key is not found + * @return ChildProductPrice A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -179,8 +179,8 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductPrice|array|mixed the result, formatted by the current formatter */ @@ -200,8 +200,8 @@ abstract class ProductPriceQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -222,7 +222,7 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -237,7 +237,7 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -268,11 +268,11 @@ abstract class ProductPriceQuery extends ModelCriteria * * @see filterByProductSaleElements() * - * @param mixed $productSaleElementsId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productSaleElementsId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -311,11 +311,11 @@ abstract class ProductPriceQuery extends ModelCriteria * * @see filterByCurrency() * - * @param mixed $currencyId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $currencyId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -352,11 +352,11 @@ abstract class ProductPriceQuery extends ModelCriteria * $query->filterByPrice(array('min' => 12)); // WHERE price > 12 * * - * @param mixed $price The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $price The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -393,11 +393,11 @@ abstract class ProductPriceQuery extends ModelCriteria * $query->filterByPromoPrice(array('min' => 12)); // WHERE promo_price > 12 * * - * @param mixed $promoPrice The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $promoPrice The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -433,12 +433,12 @@ abstract class ProductPriceQuery extends ModelCriteria * $query->filterByFromDefaultCurrency('yes'); // WHERE from_default_currency = true * * - * @param boolean|string $fromDefaultCurrency The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $fromDefaultCurrency The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -461,13 +461,13 @@ abstract class ProductPriceQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -504,13 +504,13 @@ abstract class ProductPriceQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -541,7 +541,7 @@ abstract class ProductPriceQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\ProductSaleElements object * * @param \Thelia\Model\ProductSaleElements|ObjectCollection $productSaleElements The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -565,8 +565,8 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductSaleElements relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -599,11 +599,11 @@ abstract class ProductPriceQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query */ public function useProductSaleElementsQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -615,8 +615,8 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Currency object * - * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -640,8 +640,8 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Currency relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -674,11 +674,11 @@ abstract class ProductPriceQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query */ public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -690,7 +690,7 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductPrice $productPrice Object to remove from the list of results + * @param ChildProductPrice $productPrice Object to remove from the list of results * * @return ChildProductPriceQuery The current query, for fluid interface */ @@ -708,8 +708,8 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Deletes all rows from the product_price table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -740,13 +740,13 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductPrice or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductPrice object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductPrice object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -766,6 +766,7 @@ abstract class ProductPriceQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductPriceTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -784,9 +785,9 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProductPriceQuery The current query, for fluid interface + * @return ChildProductPriceQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -796,9 +797,9 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProductPriceQuery The current query, for fluid interface + * @return ChildProductPriceQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -808,7 +809,7 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProductPriceQuery The current query, for fluid interface + * @return ChildProductPriceQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -818,7 +819,7 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProductPriceQuery The current query, for fluid interface + * @return ChildProductPriceQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -828,7 +829,7 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProductPriceQuery The current query, for fluid interface + * @return ChildProductPriceQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -838,7 +839,7 @@ abstract class ProductPriceQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProductPriceQuery The current query, for fluid interface + * @return ChildProductPriceQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/ProductQuery.php b/core/lib/Thelia/Model/Base/ProductQuery.php index 3750e316a..352b5cc68 100644 --- a/core/lib/Thelia/Model/Base/ProductQuery.php +++ b/core/lib/Thelia/Model/Base/ProductQuery.php @@ -143,9 +143,9 @@ abstract class ProductQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Product', $modelAlias = null) { @@ -155,8 +155,8 @@ abstract class ProductQuery extends ModelCriteria /** * Returns a new ChildProductQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductQuery */ @@ -185,7 +185,7 @@ abstract class ProductQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProduct|array|mixed the result, formatted by the current formatter @@ -216,10 +216,10 @@ abstract class ProductQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProduct A model object, or null if the key is not found + * @return ChildProduct A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -246,8 +246,8 @@ abstract class ProductQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProduct|array|mixed the result, formatted by the current formatter */ @@ -267,8 +267,8 @@ abstract class ProductQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -289,24 +289,26 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ProductTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ProductTableMap::ID, $keys, Criteria::IN); } @@ -320,11 +322,11 @@ abstract class ProductQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -363,11 +365,11 @@ abstract class ProductQuery extends ModelCriteria * * @see filterByTaxRule() * - * @param mixed $taxRuleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $taxRuleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -403,9 +405,9 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%' * * - * @param string $ref The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $ref The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -433,11 +435,11 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -474,11 +476,11 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -517,11 +519,11 @@ abstract class ProductQuery extends ModelCriteria * * @see filterByTemplate() * - * @param mixed $templateId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $templateId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -558,13 +560,13 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -601,13 +603,13 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -644,11 +646,11 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -685,13 +687,13 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -727,9 +729,9 @@ abstract class ProductQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -750,8 +752,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxRule object * - * @param \Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -775,8 +777,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxRule relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -809,11 +811,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxRuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxRuleQuery A secondary query class using the current class as primary query */ public function useTaxRuleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -825,8 +827,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Template object * - * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -850,8 +852,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Template relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -884,11 +886,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query */ public function useTemplateQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -900,8 +902,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductCategory object * - * @param \Thelia\Model\ProductCategory|ObjectCollection $productCategory the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductCategory|ObjectCollection $productCategory the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -923,8 +925,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductCategory relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -957,11 +959,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductCategoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductCategoryQuery A secondary query class using the current class as primary query */ public function useProductCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -973,8 +975,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureProduct object * - * @param \Thelia\Model\FeatureProduct|ObjectCollection $featureProduct the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureProduct|ObjectCollection $featureProduct the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -996,8 +998,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureProduct relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1030,11 +1032,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureProductQuery A secondary query class using the current class as primary query */ public function useFeatureProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1046,8 +1048,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductSaleElements object * - * @param \Thelia\Model\ProductSaleElements|ObjectCollection $productSaleElements the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductSaleElements|ObjectCollection $productSaleElements the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1069,8 +1071,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductSaleElements relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1103,11 +1105,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductSaleElementsQuery A secondary query class using the current class as primary query */ public function useProductSaleElementsQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1119,8 +1121,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductImage object * - * @param \Thelia\Model\ProductImage|ObjectCollection $productImage the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductImage|ObjectCollection $productImage the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1142,8 +1144,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductImage relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1176,11 +1178,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductImageQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductImageQuery A secondary query class using the current class as primary query */ public function useProductImageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1192,8 +1194,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductDocument object * - * @param \Thelia\Model\ProductDocument|ObjectCollection $productDocument the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductDocument|ObjectCollection $productDocument the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1215,8 +1217,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductDocument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1249,11 +1251,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductDocumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductDocumentQuery A secondary query class using the current class as primary query */ public function useProductDocumentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1266,7 +1268,7 @@ abstract class ProductQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\Accessory object * * @param \Thelia\Model\Accessory|ObjectCollection $accessory the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1288,8 +1290,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AccessoryRelatedByProductId relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1322,11 +1324,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AccessoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AccessoryQuery A secondary query class using the current class as primary query */ public function useAccessoryRelatedByProductIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1339,7 +1341,7 @@ abstract class ProductQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\Accessory object * * @param \Thelia\Model\Accessory|ObjectCollection $accessory the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1361,8 +1363,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AccessoryRelatedByAccessory relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1395,11 +1397,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AccessoryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AccessoryQuery A secondary query class using the current class as primary query */ public function useAccessoryRelatedByAccessoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1411,8 +1413,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CartItem object * - * @param \Thelia\Model\CartItem|ObjectCollection $cartItem the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CartItem|ObjectCollection $cartItem the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1434,8 +1436,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CartItem relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1468,11 +1470,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartItemQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartItemQuery A secondary query class using the current class as primary query */ public function useCartItemQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1484,8 +1486,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductAssociatedContent object * - * @param \Thelia\Model\ProductAssociatedContent|ObjectCollection $productAssociatedContent the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductAssociatedContent|ObjectCollection $productAssociatedContent the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1507,8 +1509,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductAssociatedContent relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1541,11 +1543,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductAssociatedContentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductAssociatedContentQuery A secondary query class using the current class as primary query */ public function useProductAssociatedContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1557,8 +1559,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductI18n object * - * @param \Thelia\Model\ProductI18n|ObjectCollection $productI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductI18n|ObjectCollection $productI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1580,8 +1582,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1614,11 +1616,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductI18nQuery A secondary query class using the current class as primary query */ public function useProductI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -1630,8 +1632,8 @@ abstract class ProductQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductVersion object * - * @param \Thelia\Model\ProductVersion|ObjectCollection $productVersion the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductVersion|ObjectCollection $productVersion the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1653,8 +1655,8 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductVersion relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductQuery The current query, for fluid interface */ @@ -1687,11 +1689,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductVersionQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductVersionQuery A secondary query class using the current class as primary query */ public function useProductVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -1704,8 +1706,8 @@ abstract class ProductQuery extends ModelCriteria * Filter the query by a related Category object * using the product_category table as cross reference * - * @param Category $category the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Category $category the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1721,8 +1723,8 @@ abstract class ProductQuery extends ModelCriteria * Filter the query by a related Product object * using the accessory table as cross reference * - * @param Product $product the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Product $product the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1738,8 +1740,8 @@ abstract class ProductQuery extends ModelCriteria * Filter the query by a related Product object * using the accessory table as cross reference * - * @param Product $product the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Product $product the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ @@ -1754,7 +1756,7 @@ abstract class ProductQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProduct $product Object to remove from the list of results + * @param ChildProduct $product Object to remove from the list of results * * @return ChildProductQuery The current query, for fluid interface */ @@ -1770,8 +1772,8 @@ abstract class ProductQuery extends ModelCriteria /** * Deletes all rows from the product table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1802,13 +1804,13 @@ abstract class ProductQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProduct or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProduct object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProduct object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1828,6 +1830,7 @@ abstract class ProductQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1846,9 +1849,9 @@ abstract class ProductQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1858,9 +1861,9 @@ abstract class ProductQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1870,7 +1873,7 @@ abstract class ProductQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1880,7 +1883,7 @@ abstract class ProductQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1890,7 +1893,7 @@ abstract class ProductQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1900,7 +1903,7 @@ abstract class ProductQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -1912,11 +1915,11 @@ abstract class ProductQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1931,10 +1934,10 @@ abstract class ProductQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductQuery The current query, for fluid interface + * @return ChildProductQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -1951,11 +1954,11 @@ abstract class ProductQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProductI18nQuery A secondary query class using the current class as primary query + * @return ChildProductI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -1971,7 +1974,7 @@ abstract class ProductQuery extends ModelCriteria * * @return boolean */ - public static function isVersioningEnabled() + static public function isVersioningEnabled() { return self::$isVersioningEnabled; } @@ -1979,7 +1982,7 @@ abstract class ProductQuery extends ModelCriteria /** * Enables versioning */ - public static function enableVersioning() + static public function enableVersioning() { self::$isVersioningEnabled = true; } @@ -1987,7 +1990,7 @@ abstract class ProductQuery extends ModelCriteria /** * Disables versioning */ - public static function disableVersioning() + static public function disableVersioning() { self::$isVersioningEnabled = false; } diff --git a/core/lib/Thelia/Model/Base/ProductSaleElements.php b/core/lib/Thelia/Model/Base/ProductSaleElements.php index 2d24ed3a0..cb899c8c5 100644 --- a/core/lib/Thelia/Model/Base/ProductSaleElements.php +++ b/core/lib/Thelia/Model/Base/ProductSaleElements.php @@ -36,6 +36,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductSaleElementsTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -406,9 +407,9 @@ abstract class ProductSaleElements implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductSaleElements The current object, for fluid interface */ @@ -458,90 +459,99 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [product_id] column value. * - * @return int + * @return int */ public function getProductId() { + return $this->product_id; } /** * Get the [ref] column value. * - * @return string + * @return string */ public function getRef() { + return $this->ref; } /** * Get the [quantity] column value. * - * @return double + * @return double */ public function getQuantity() { + return $this->quantity; } /** * Get the [promo] column value. * - * @return int + * @return int */ public function getPromo() { + return $this->promo; } /** * Get the [newness] column value. * - * @return int + * @return int */ public function getNewness() { + return $this->newness; } /** * Get the [weight] column value. * - * @return double + * @return double */ public function getWeight() { + return $this->weight; } /** * Get the [is_default] column value. * - * @return boolean + * @return boolean */ public function getIsDefault() { + return $this->is_default; } /** * Get the [ean_code] column value. * - * @return string + * @return string */ public function getEanCode() { + return $this->ean_code; } @@ -549,8 +559,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -569,8 +579,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -588,8 +598,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setId($v) { @@ -602,14 +612,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [product_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setProductId($v) { @@ -626,14 +637,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setProductId() /** * Set the value of [ref] column. * - * @param string $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setRef($v) { @@ -646,14 +658,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::REF] = true; } + return $this; } // setRef() /** * Set the value of [quantity] column. * - * @param double $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setQuantity($v) { @@ -666,14 +679,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::QUANTITY] = true; } + return $this; } // setQuantity() /** * Set the value of [promo] column. * - * @param int $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setPromo($v) { @@ -686,14 +700,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::PROMO] = true; } + return $this; } // setPromo() /** * Set the value of [newness] column. * - * @param int $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setNewness($v) { @@ -706,14 +721,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::NEWNESS] = true; } + return $this; } // setNewness() /** * Set the value of [weight] column. * - * @param double $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param double $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setWeight($v) { @@ -726,6 +742,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::WEIGHT] = true; } + return $this; } // setWeight() @@ -736,8 +753,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setIsDefault($v) { @@ -754,14 +771,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::IS_DEFAULT] = true; } + return $this; } // setIsDefault() /** * Set the value of [ean_code] column. * - * @param string $v new value - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setEanCode($v) { @@ -774,15 +792,16 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->modifiedColumns[ProductSaleElementsTableMap::EAN_CODE] = true; } + return $this; } // setEanCode() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -794,15 +813,16 @@ abstract class ProductSaleElements implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -814,6 +834,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -869,6 +890,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductSaleElementsTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -947,10 +969,10 @@ abstract class ProductSaleElements implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -992,7 +1014,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductSaleElements::setDeleted() @@ -1035,8 +1057,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1097,8 +1119,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1192,7 +1214,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1306,7 +1328,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1322,12 +1344,12 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1341,7 +1363,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1392,12 +1414,12 @@ abstract class ProductSaleElements implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1447,12 +1469,12 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1466,8 +1488,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1522,8 +1544,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1563,6 +1585,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->isColumnModified(ProductSaleElementsTableMap::EAN_CODE)) $criteria->add(ProductSaleElementsTableMap::EAN_CODE, $this->ean_code); if ($this->isColumnModified(ProductSaleElementsTableMap::CREATED_AT)) $criteria->add(ProductSaleElementsTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProductSaleElementsTableMap::UPDATED_AT)) $criteria->add(ProductSaleElementsTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1584,7 +1607,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1594,7 +1617,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1608,6 +1631,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1617,9 +1641,9 @@ abstract class ProductSaleElements implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductSaleElements (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductSaleElements (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1674,8 +1698,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductSaleElements Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductSaleElements Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1691,8 +1715,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1711,6 +1735,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface $v->addProductSaleElements($this); } + return $this; } @@ -1718,8 +1743,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1744,7 +1769,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1789,8 +1814,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1812,8 +1837,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * If this ChildProductSaleElements is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects * @throws PropelException */ @@ -1869,14 +1894,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeCombinations A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProductSaleElements The current object (for fluent API support) + * @param Collection $attributeCombinations A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProductSaleElements The current object (for fluent API support) */ public function setAttributeCombinations(Collection $attributeCombinations, ConnectionInterface $con = null) { $attributeCombinationsToDelete = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1900,10 +1926,10 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Returns the number of related AttributeCombination objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeCombination objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeCombination objects. * @throws PropelException */ public function countAttributeCombinations(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1935,8 +1961,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Method called to associate a ChildAttributeCombination object to this object * through the ChildAttributeCombination foreign key attribute. * - * @param ChildAttributeCombination $l ChildAttributeCombination - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param ChildAttributeCombination $l ChildAttributeCombination + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function addAttributeCombination(ChildAttributeCombination $l) { @@ -1962,7 +1988,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface } /** - * @param AttributeCombination $attributeCombination The attributeCombination object to remove. + * @param AttributeCombination $attributeCombination The attributeCombination object to remove. * @return ChildProductSaleElements The current object (for fluent API support) */ public function removeAttributeCombination($attributeCombination) @@ -1980,6 +2006,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1991,9 +2018,9 @@ abstract class ProductSaleElements implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in ProductSaleElements. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects */ public function getAttributeCombinationsJoinAttribute($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2004,6 +2031,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface return $this->getAttributeCombinations($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2015,9 +2043,9 @@ abstract class ProductSaleElements implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in ProductSaleElements. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeCombination[] List of ChildAttributeCombination objects */ public function getAttributeCombinationsJoinAttributeAv($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2057,8 +2085,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2080,8 +2108,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * If this ChildProductSaleElements is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildCartItem[] List of ChildCartItem objects * @throws PropelException */ @@ -2137,14 +2165,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $cartItems A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProductSaleElements The current object (for fluent API support) + * @param Collection $cartItems A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProductSaleElements The current object (for fluent API support) */ public function setCartItems(Collection $cartItems, ConnectionInterface $con = null) { $cartItemsToDelete = $this->getCartItems(new Criteria(), $con)->diff($cartItems); + $this->cartItemsScheduledForDeletion = $cartItemsToDelete; foreach ($cartItemsToDelete as $cartItemRemoved) { @@ -2165,10 +2194,10 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Returns the number of related CartItem objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related CartItem objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CartItem objects. * @throws PropelException */ public function countCartItems(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2200,8 +2229,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Method called to associate a ChildCartItem object to this object * through the ChildCartItem foreign key attribute. * - * @param ChildCartItem $l ChildCartItem - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param ChildCartItem $l ChildCartItem + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function addCartItem(ChildCartItem $l) { @@ -2227,7 +2256,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface } /** - * @param CartItem $cartItem The cartItem object to remove. + * @param CartItem $cartItem The cartItem object to remove. * @return ChildProductSaleElements The current object (for fluent API support) */ public function removeCartItem($cartItem) @@ -2245,6 +2274,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2256,9 +2286,9 @@ abstract class ProductSaleElements implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in ProductSaleElements. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCartItem[] List of ChildCartItem objects */ public function getCartItemsJoinCart($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2269,6 +2299,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface return $this->getCartItems($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2280,9 +2311,9 @@ abstract class ProductSaleElements implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in ProductSaleElements. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildCartItem[] List of ChildCartItem objects */ public function getCartItemsJoinProduct($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2322,8 +2353,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2345,8 +2376,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * If this ChildProductSaleElements is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProductPrice[] List of ChildProductPrice objects * @throws PropelException */ @@ -2402,14 +2433,15 @@ abstract class ProductSaleElements implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $productPrices A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProductSaleElements The current object (for fluent API support) + * @param Collection $productPrices A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProductSaleElements The current object (for fluent API support) */ public function setProductPrices(Collection $productPrices, ConnectionInterface $con = null) { $productPricesToDelete = $this->getProductPrices(new Criteria(), $con)->diff($productPrices); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2433,10 +2465,10 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Returns the number of related ProductPrice objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProductPrice objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProductPrice objects. * @throws PropelException */ public function countProductPrices(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2468,8 +2500,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface * Method called to associate a ChildProductPrice object to this object * through the ChildProductPrice foreign key attribute. * - * @param ChildProductPrice $l ChildProductPrice - * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) + * @param ChildProductPrice $l ChildProductPrice + * @return \Thelia\Model\ProductSaleElements The current object (for fluent API support) */ public function addProductPrice(ChildProductPrice $l) { @@ -2495,7 +2527,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface } /** - * @param ProductPrice $productPrice The productPrice object to remove. + * @param ProductPrice $productPrice The productPrice object to remove. * @return ChildProductSaleElements The current object (for fluent API support) */ public function removeProductPrice($productPrice) @@ -2513,6 +2545,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2524,9 +2557,9 @@ abstract class ProductSaleElements implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in ProductSaleElements. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProductPrice[] List of ChildProductPrice objects */ public function getProductPricesJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2568,7 +2601,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2611,7 +2644,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProductSaleElements The current object (for fluent API support) + * @return ChildProductSaleElements The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2696,6 +2729,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ProductSaleElementsQuery.php b/core/lib/Thelia/Model/Base/ProductSaleElementsQuery.php index aa0ec2b12..3a46a016d 100644 --- a/core/lib/Thelia/Model/Base/ProductSaleElementsQuery.php +++ b/core/lib/Thelia/Model/Base/ProductSaleElementsQuery.php @@ -99,9 +99,9 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductSaleElementsQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductSaleElements', $modelAlias = null) { @@ -111,8 +111,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Returns a new ChildProductSaleElementsQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductSaleElementsQuery */ @@ -141,7 +141,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProductSaleElements|array|mixed the result, formatted by the current formatter @@ -172,10 +172,10 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductSaleElements A model object, or null if the key is not found + * @return ChildProductSaleElements A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -202,8 +202,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductSaleElements|array|mixed the result, formatted by the current formatter */ @@ -223,8 +223,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -245,24 +245,26 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ProductSaleElementsTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ProductSaleElementsTableMap::ID, $keys, Criteria::IN); } @@ -276,11 +278,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -319,11 +321,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $productId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $productId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -359,9 +361,9 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%' * * - * @param string $ref The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $ref The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -389,11 +391,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByQuantity(array('min' => 12)); // WHERE quantity > 12 * * - * @param mixed $quantity The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $quantity The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -430,11 +432,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByPromo(array('min' => 12)); // WHERE promo > 12 * * - * @param mixed $promo The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $promo The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -471,11 +473,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByNewness(array('min' => 12)); // WHERE newness > 12 * * - * @param mixed $newness The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $newness The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -512,11 +514,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByWeight(array('min' => 12)); // WHERE weight > 12 * * - * @param mixed $weight The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $weight The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -552,12 +554,12 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByIsDefault('yes'); // WHERE is_default = true * * - * @param boolean|string $isDefault The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isDefault The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -579,9 +581,9 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByEanCode('%fooValue%'); // WHERE ean_code LIKE '%fooValue%' * * - * @param string $eanCode The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $eanCode The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -609,13 +611,13 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -652,13 +654,13 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -688,8 +690,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -713,8 +715,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -747,11 +749,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -763,8 +765,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeCombination object * - * @param \Thelia\Model\AttributeCombination|ObjectCollection $attributeCombination the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeCombination|ObjectCollection $attributeCombination the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -786,8 +788,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeCombination relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -820,11 +822,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeCombinationQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeCombinationQuery A secondary query class using the current class as primary query */ public function useAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -836,8 +838,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\CartItem object * - * @param \Thelia\Model\CartItem|ObjectCollection $cartItem the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\CartItem|ObjectCollection $cartItem the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -859,8 +861,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the CartItem relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -893,11 +895,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CartItemQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CartItemQuery A secondary query class using the current class as primary query */ public function useCartItemQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -909,8 +911,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProductPrice object * - * @param \Thelia\Model\ProductPrice|ObjectCollection $productPrice the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProductPrice|ObjectCollection $productPrice the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -932,8 +934,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProductPrice relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -966,11 +968,11 @@ abstract class ProductSaleElementsQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductPriceQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductPriceQuery A secondary query class using the current class as primary query */ public function useProductPriceQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -982,7 +984,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductSaleElements $productSaleElements Object to remove from the list of results + * @param ChildProductSaleElements $productSaleElements Object to remove from the list of results * * @return ChildProductSaleElementsQuery The current query, for fluid interface */ @@ -998,8 +1000,8 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Deletes all rows from the product_sale_elements table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -1030,13 +1032,13 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductSaleElements or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductSaleElements object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductSaleElements object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -1056,6 +1058,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductSaleElementsTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -1074,9 +1077,9 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProductSaleElementsQuery The current query, for fluid interface + * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -1086,9 +1089,9 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProductSaleElementsQuery The current query, for fluid interface + * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -1098,7 +1101,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProductSaleElementsQuery The current query, for fluid interface + * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -1108,7 +1111,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProductSaleElementsQuery The current query, for fluid interface + * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -1118,7 +1121,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProductSaleElementsQuery The current query, for fluid interface + * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -1128,7 +1131,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProductSaleElementsQuery The current query, for fluid interface + * @return ChildProductSaleElementsQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/ProductVersion.php b/core/lib/Thelia/Model/Base/ProductVersion.php index f8158d846..cf5ea8af9 100644 --- a/core/lib/Thelia/Model/Base/ProductVersion.php +++ b/core/lib/Thelia/Model/Base/ProductVersion.php @@ -28,6 +28,7 @@ abstract class ProductVersion implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProductVersionTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -360,9 +361,9 @@ abstract class ProductVersion implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProductVersion The current object, for fluid interface */ @@ -412,60 +413,66 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [tax_rule_id] column value. * - * @return int + * @return int */ public function getTaxRuleId() { + return $this->tax_rule_id; } /** * Get the [ref] column value. * - * @return string + * @return string */ public function getRef() { + return $this->ref; } /** * Get the [visible] column value. * - * @return int + * @return int */ public function getVisible() { + return $this->visible; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } /** * Get the [template_id] column value. * - * @return int + * @return int */ public function getTemplateId() { + return $this->template_id; } @@ -473,8 +480,8 @@ abstract class ProductVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -493,8 +500,8 @@ abstract class ProductVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -512,10 +519,11 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Get the [version] column value. * - * @return int + * @return int */ public function getVersion() { + return $this->version; } @@ -523,8 +531,8 @@ abstract class ProductVersion implements ActiveRecordInterface * Get the [optionally formatted] temporal [version_created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -542,18 +550,19 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Get the [version_created_by] column value. * - * @return string + * @return string */ public function getVersionCreatedBy() { + return $this->version_created_by; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setId($v) { @@ -570,14 +579,15 @@ abstract class ProductVersion implements ActiveRecordInterface $this->aProduct = null; } + return $this; } // setId() /** * Set the value of [tax_rule_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setTaxRuleId($v) { @@ -590,14 +600,15 @@ abstract class ProductVersion implements ActiveRecordInterface $this->modifiedColumns[ProductVersionTableMap::TAX_RULE_ID] = true; } + return $this; } // setTaxRuleId() /** * Set the value of [ref] column. * - * @param string $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setRef($v) { @@ -610,14 +621,15 @@ abstract class ProductVersion implements ActiveRecordInterface $this->modifiedColumns[ProductVersionTableMap::REF] = true; } + return $this; } // setRef() /** * Set the value of [visible] column. * - * @param int $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setVisible($v) { @@ -630,14 +642,15 @@ abstract class ProductVersion implements ActiveRecordInterface $this->modifiedColumns[ProductVersionTableMap::VISIBLE] = true; } + return $this; } // setVisible() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setPosition($v) { @@ -650,14 +663,15 @@ abstract class ProductVersion implements ActiveRecordInterface $this->modifiedColumns[ProductVersionTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Set the value of [template_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setTemplateId($v) { @@ -670,15 +684,16 @@ abstract class ProductVersion implements ActiveRecordInterface $this->modifiedColumns[ProductVersionTableMap::TEMPLATE_ID] = true; } + return $this; } // setTemplateId() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -690,15 +705,16 @@ abstract class ProductVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -710,14 +726,15 @@ abstract class ProductVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() /** * Set the value of [version] column. * - * @param int $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setVersion($v) { @@ -730,15 +747,16 @@ abstract class ProductVersion implements ActiveRecordInterface $this->modifiedColumns[ProductVersionTableMap::VERSION] = true; } + return $this; } // setVersion() /** * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setVersionCreatedAt($v) { @@ -750,14 +768,15 @@ abstract class ProductVersion implements ActiveRecordInterface } } // if either are not null + return $this; } // setVersionCreatedAt() /** * Set the value of [version_created_by] column. * - * @param string $v new value - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) */ public function setVersionCreatedBy($v) { @@ -770,6 +789,7 @@ abstract class ProductVersion implements ActiveRecordInterface $this->modifiedColumns[ProductVersionTableMap::VERSION_CREATED_BY] = true; } + return $this; } // setVersionCreatedBy() @@ -821,6 +841,7 @@ abstract class ProductVersion implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProductVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -902,10 +923,10 @@ abstract class ProductVersion implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -941,7 +962,7 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProductVersion::setDeleted() @@ -984,8 +1005,8 @@ abstract class ProductVersion implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -1035,8 +1056,8 @@ abstract class ProductVersion implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -1079,7 +1100,7 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1182,7 +1203,7 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1198,12 +1219,12 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1217,7 +1238,7 @@ abstract class ProductVersion implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1268,12 +1289,12 @@ abstract class ProductVersion implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1314,12 +1335,12 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1333,8 +1354,8 @@ abstract class ProductVersion implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1389,8 +1410,8 @@ abstract class ProductVersion implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1430,6 +1451,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->isColumnModified(ProductVersionTableMap::VERSION)) $criteria->add(ProductVersionTableMap::VERSION, $this->version); if ($this->isColumnModified(ProductVersionTableMap::VERSION_CREATED_AT)) $criteria->add(ProductVersionTableMap::VERSION_CREATED_AT, $this->version_created_at); if ($this->isColumnModified(ProductVersionTableMap::VERSION_CREATED_BY)) $criteria->add(ProductVersionTableMap::VERSION_CREATED_BY, $this->version_created_by); + return $criteria; } @@ -1467,7 +1489,7 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1482,6 +1504,7 @@ abstract class ProductVersion implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getVersion()); } @@ -1491,9 +1514,9 @@ abstract class ProductVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProductVersion (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProductVersion (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1522,8 +1545,8 @@ abstract class ProductVersion implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProductVersion Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProductVersion Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1539,8 +1562,8 @@ abstract class ProductVersion implements ActiveRecordInterface /** * Declares an association between this object and a ChildProduct object. * - * @param ChildProduct $v - * @return \Thelia\Model\ProductVersion The current object (for fluent API support) + * @param ChildProduct $v + * @return \Thelia\Model\ProductVersion The current object (for fluent API support) * @throws PropelException */ public function setProduct(ChildProduct $v = null) @@ -1559,14 +1582,16 @@ abstract class ProductVersion implements ActiveRecordInterface $v->addProductVersion($this); } + return $this; } + /** * Get the associated ChildProduct object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProduct The associated ChildProduct object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProduct The associated ChildProduct object. * @throws PropelException */ public function getProduct(ConnectionInterface $con = null) @@ -1616,7 +1641,7 @@ abstract class ProductVersion implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ProductVersionQuery.php b/core/lib/Thelia/Model/Base/ProductVersionQuery.php index a7ee6d73e..cf017b048 100644 --- a/core/lib/Thelia/Model/Base/ProductVersionQuery.php +++ b/core/lib/Thelia/Model/Base/ProductVersionQuery.php @@ -87,9 +87,9 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProductVersionQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProductVersion', $modelAlias = null) { @@ -99,8 +99,8 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Returns a new ChildProductVersionQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProductVersionQuery */ @@ -160,10 +160,10 @@ abstract class ProductVersionQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProductVersion A model object, or null if the key is not found + * @return ChildProductVersion A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -191,8 +191,8 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProductVersion|array|mixed the result, formatted by the current formatter */ @@ -212,8 +212,8 @@ abstract class ProductVersionQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -234,7 +234,7 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -249,7 +249,7 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -280,11 +280,11 @@ abstract class ProductVersionQuery extends ModelCriteria * * @see filterByProduct() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -321,11 +321,11 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByTaxRuleId(array('min' => 12)); // WHERE tax_rule_id > 12 * * - * @param mixed $taxRuleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $taxRuleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -361,9 +361,9 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%' * * - * @param string $ref The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $ref The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -391,11 +391,11 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12 * * - * @param mixed $visible The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $visible The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -432,11 +432,11 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -473,11 +473,11 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByTemplateId(array('min' => 12)); // WHERE template_id > 12 * * - * @param mixed $templateId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $templateId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -514,13 +514,13 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -557,13 +557,13 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -600,11 +600,11 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 * * - * @param mixed $version The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -641,13 +641,13 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' * * - * @param mixed $versionCreatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -683,9 +683,9 @@ abstract class ProductVersionQuery extends ModelCriteria * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' * * - * @param string $versionCreatedBy The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -706,8 +706,8 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -731,8 +731,8 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -765,11 +765,11 @@ abstract class ProductVersionQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -781,7 +781,7 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProductVersion $productVersion Object to remove from the list of results + * @param ChildProductVersion $productVersion Object to remove from the list of results * * @return ChildProductVersionQuery The current query, for fluid interface */ @@ -799,8 +799,8 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Deletes all rows from the product_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -831,13 +831,13 @@ abstract class ProductVersionQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProductVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProductVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProductVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -857,6 +857,7 @@ abstract class ProductVersionQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProductVersionTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/Profile.php b/core/lib/Thelia/Model/Base/Profile.php index 8e2f5ecaf..55b8ac6eb 100644 --- a/core/lib/Thelia/Model/Base/Profile.php +++ b/core/lib/Thelia/Model/Base/Profile.php @@ -38,6 +38,7 @@ abstract class Profile implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProfileTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -378,9 +379,9 @@ abstract class Profile implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Profile The current object, for fluid interface */ @@ -430,20 +431,22 @@ abstract class Profile implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } @@ -451,8 +454,8 @@ abstract class Profile implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -471,8 +474,8 @@ abstract class Profile implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -490,8 +493,8 @@ abstract class Profile implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function setId($v) { @@ -504,14 +507,15 @@ abstract class Profile implements ActiveRecordInterface $this->modifiedColumns[ProfileTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function setCode($v) { @@ -524,15 +528,16 @@ abstract class Profile implements ActiveRecordInterface $this->modifiedColumns[ProfileTableMap::CODE] = true; } + return $this; } // setCode() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -544,15 +549,16 @@ abstract class Profile implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -564,6 +570,7 @@ abstract class Profile implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -658,10 +665,10 @@ abstract class Profile implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -705,7 +712,7 @@ abstract class Profile implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Profile::setDeleted() @@ -748,8 +755,8 @@ abstract class Profile implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -810,8 +817,8 @@ abstract class Profile implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -938,7 +945,7 @@ abstract class Profile implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1010,7 +1017,7 @@ abstract class Profile implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1026,12 +1033,12 @@ abstract class Profile implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1045,7 +1052,7 @@ abstract class Profile implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1075,12 +1082,12 @@ abstract class Profile implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1123,12 +1130,12 @@ abstract class Profile implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1142,8 +1149,8 @@ abstract class Profile implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1177,8 +1184,8 @@ abstract class Profile implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1204,6 +1211,7 @@ abstract class Profile implements ActiveRecordInterface if ($this->isColumnModified(ProfileTableMap::CODE)) $criteria->add(ProfileTableMap::CODE, $this->code); if ($this->isColumnModified(ProfileTableMap::CREATED_AT)) $criteria->add(ProfileTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProfileTableMap::UPDATED_AT)) $criteria->add(ProfileTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1225,7 +1233,7 @@ abstract class Profile implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1235,7 +1243,7 @@ abstract class Profile implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1249,6 +1257,7 @@ abstract class Profile implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1258,9 +1267,9 @@ abstract class Profile implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Profile (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Profile (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1314,8 +1323,8 @@ abstract class Profile implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Profile Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Profile Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1334,7 +1343,7 @@ abstract class Profile implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1382,8 +1391,8 @@ abstract class Profile implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1405,8 +1414,8 @@ abstract class Profile implements ActiveRecordInterface * If this ChildProfile is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAdmin[] List of ChildAdmin objects * @throws PropelException */ @@ -1462,14 +1471,15 @@ abstract class Profile implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $admins A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProfile The current object (for fluent API support) + * @param Collection $admins A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProfile The current object (for fluent API support) */ public function setAdmins(Collection $admins, ConnectionInterface $con = null) { $adminsToDelete = $this->getAdmins(new Criteria(), $con)->diff($admins); + $this->adminsScheduledForDeletion = $adminsToDelete; foreach ($adminsToDelete as $adminRemoved) { @@ -1490,10 +1500,10 @@ abstract class Profile implements ActiveRecordInterface /** * Returns the number of related Admin objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Admin objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Admin objects. * @throws PropelException */ public function countAdmins(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1525,8 +1535,8 @@ abstract class Profile implements ActiveRecordInterface * Method called to associate a ChildAdmin object to this object * through the ChildAdmin foreign key attribute. * - * @param ChildAdmin $l ChildAdmin - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param ChildAdmin $l ChildAdmin + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function addAdmin(ChildAdmin $l) { @@ -1552,7 +1562,7 @@ abstract class Profile implements ActiveRecordInterface } /** - * @param Admin $admin The admin object to remove. + * @param Admin $admin The admin object to remove. * @return ChildProfile The current object (for fluent API support) */ public function removeAdmin($admin) @@ -1599,8 +1609,8 @@ abstract class Profile implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1622,8 +1632,8 @@ abstract class Profile implements ActiveRecordInterface * If this ChildProfile is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProfileResource[] List of ChildProfileResource objects * @throws PropelException */ @@ -1679,14 +1689,15 @@ abstract class Profile implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $profileResources A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProfile The current object (for fluent API support) + * @param Collection $profileResources A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProfile The current object (for fluent API support) */ public function setProfileResources(Collection $profileResources, ConnectionInterface $con = null) { $profileResourcesToDelete = $this->getProfileResources(new Criteria(), $con)->diff($profileResources); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1710,10 +1721,10 @@ abstract class Profile implements ActiveRecordInterface /** * Returns the number of related ProfileResource objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProfileResource objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProfileResource objects. * @throws PropelException */ public function countProfileResources(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1745,8 +1756,8 @@ abstract class Profile implements ActiveRecordInterface * Method called to associate a ChildProfileResource object to this object * through the ChildProfileResource foreign key attribute. * - * @param ChildProfileResource $l ChildProfileResource - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param ChildProfileResource $l ChildProfileResource + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function addProfileResource(ChildProfileResource $l) { @@ -1773,7 +1784,7 @@ abstract class Profile implements ActiveRecordInterface /** * @param ProfileResource $profileResource The profileResource object to remove. - * @return ChildProfile The current object (for fluent API support) + * @return ChildProfile The current object (for fluent API support) */ public function removeProfileResource($profileResource) { @@ -1790,6 +1801,7 @@ abstract class Profile implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1801,9 +1813,9 @@ abstract class Profile implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Profile. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProfileResource[] List of ChildProfileResource objects */ public function getProfileResourcesJoinResource($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1843,8 +1855,8 @@ abstract class Profile implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1866,8 +1878,8 @@ abstract class Profile implements ActiveRecordInterface * If this ChildProfile is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProfileModule[] List of ChildProfileModule objects * @throws PropelException */ @@ -1923,14 +1935,15 @@ abstract class Profile implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $profileModules A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProfile The current object (for fluent API support) + * @param Collection $profileModules A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProfile The current object (for fluent API support) */ public function setProfileModules(Collection $profileModules, ConnectionInterface $con = null) { $profileModulesToDelete = $this->getProfileModules(new Criteria(), $con)->diff($profileModules); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1954,10 +1967,10 @@ abstract class Profile implements ActiveRecordInterface /** * Returns the number of related ProfileModule objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProfileModule objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProfileModule objects. * @throws PropelException */ public function countProfileModules(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1989,8 +2002,8 @@ abstract class Profile implements ActiveRecordInterface * Method called to associate a ChildProfileModule object to this object * through the ChildProfileModule foreign key attribute. * - * @param ChildProfileModule $l ChildProfileModule - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param ChildProfileModule $l ChildProfileModule + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function addProfileModule(ChildProfileModule $l) { @@ -2017,7 +2030,7 @@ abstract class Profile implements ActiveRecordInterface /** * @param ProfileModule $profileModule The profileModule object to remove. - * @return ChildProfile The current object (for fluent API support) + * @return ChildProfile The current object (for fluent API support) */ public function removeProfileModule($profileModule) { @@ -2034,6 +2047,7 @@ abstract class Profile implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2045,9 +2059,9 @@ abstract class Profile implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Profile. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProfileModule[] List of ChildProfileModule objects */ public function getProfileModulesJoinModule($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2087,8 +2101,8 @@ abstract class Profile implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2110,8 +2124,8 @@ abstract class Profile implements ActiveRecordInterface * If this ChildProfile is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProfileI18n[] List of ChildProfileI18n objects * @throws PropelException */ @@ -2167,14 +2181,15 @@ abstract class Profile implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $profileI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProfile The current object (for fluent API support) + * @param Collection $profileI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProfile The current object (for fluent API support) */ public function setProfileI18ns(Collection $profileI18ns, ConnectionInterface $con = null) { $profileI18nsToDelete = $this->getProfileI18ns(new Criteria(), $con)->diff($profileI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2198,10 +2213,10 @@ abstract class Profile implements ActiveRecordInterface /** * Returns the number of related ProfileI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProfileI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProfileI18n objects. * @throws PropelException */ public function countProfileI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2233,8 +2248,8 @@ abstract class Profile implements ActiveRecordInterface * Method called to associate a ChildProfileI18n object to this object * through the ChildProfileI18n foreign key attribute. * - * @param ChildProfileI18n $l ChildProfileI18n - * @return \Thelia\Model\Profile The current object (for fluent API support) + * @param ChildProfileI18n $l ChildProfileI18n + * @return \Thelia\Model\Profile The current object (for fluent API support) */ public function addProfileI18n(ChildProfileI18n $l) { @@ -2264,7 +2279,7 @@ abstract class Profile implements ActiveRecordInterface } /** - * @param ProfileI18n $profileI18n The profileI18n object to remove. + * @param ProfileI18n $profileI18n The profileI18n object to remove. * @return ChildProfile The current object (for fluent API support) */ public function removeProfileI18n($profileI18n) @@ -2322,8 +2337,8 @@ abstract class Profile implements ActiveRecordInterface * If this ChildProfile is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildResource[] List of ChildResource objects */ @@ -2353,9 +2368,9 @@ abstract class Profile implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $resources A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildProfile The current object (for fluent API support) + * @param Collection $resources A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildProfile The current object (for fluent API support) */ public function setResources(Collection $resources, ConnectionInterface $con = null) { @@ -2379,9 +2394,9 @@ abstract class Profile implements ActiveRecordInterface * Gets the number of ChildResource objects related by a many-to-many relationship * to the current object by way of the profile_resource cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildResource objects */ @@ -2410,7 +2425,7 @@ abstract class Profile implements ActiveRecordInterface * through the profile_resource cross reference table. * * @param ChildResource $resource The ChildProfileResource object to relate - * @return ChildProfile The current object (for fluent API support) + * @return ChildProfile The current object (for fluent API support) */ public function addResource(ChildResource $resource) { @@ -2427,7 +2442,7 @@ abstract class Profile implements ActiveRecordInterface } /** - * @param Resource $resource The resource object to add. + * @param Resource $resource The resource object to add. */ protected function doAddResource($resource) { @@ -2446,8 +2461,8 @@ abstract class Profile implements ActiveRecordInterface * Remove a ChildResource object to this object * through the profile_resource cross reference table. * - * @param ChildResource $resource The ChildProfileResource object to relate - * @return ChildProfile The current object (for fluent API support) + * @param ChildResource $resource The ChildProfileResource object to relate + * @return ChildProfile The current object (for fluent API support) */ public function removeResource(ChildResource $resource) { @@ -2488,7 +2503,7 @@ abstract class Profile implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2546,7 +2561,7 @@ abstract class Profile implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProfile The current object (for fluent API support) + * @return ChildProfile The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2560,9 +2575,9 @@ abstract class Profile implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildProfile The current object (for fluent API support) + * @return ChildProfile The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2574,7 +2589,7 @@ abstract class Profile implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2584,8 +2599,8 @@ abstract class Profile implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildProfileI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2618,10 +2633,10 @@ abstract class Profile implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildProfile The current object (for fluent API support) + * @return ChildProfile The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2646,7 +2661,7 @@ abstract class Profile implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildProfileI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2654,6 +2669,7 @@ abstract class Profile implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2664,6 +2680,7 @@ abstract class Profile implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2676,6 +2693,7 @@ abstract class Profile implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2686,6 +2704,7 @@ abstract class Profile implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2698,6 +2717,7 @@ abstract class Profile implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -2708,6 +2728,7 @@ abstract class Profile implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -2720,6 +2741,7 @@ abstract class Profile implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -2730,6 +2752,7 @@ abstract class Profile implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -2818,6 +2841,7 @@ abstract class Profile implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ProfileI18n.php b/core/lib/Thelia/Model/Base/ProfileI18n.php index 48c19f2a3..f68618a1d 100644 --- a/core/lib/Thelia/Model/Base/ProfileI18n.php +++ b/core/lib/Thelia/Model/Base/ProfileI18n.php @@ -26,6 +26,7 @@ abstract class ProfileI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProfileI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ProfileI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProfileI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ProfileI18n implements ActiveRecordInterface $this->aProfile = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ProfileI18n implements ActiveRecordInterface $this->modifiedColumns[ProfileI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ProfileI18n implements ActiveRecordInterface $this->modifiedColumns[ProfileI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ProfileI18n implements ActiveRecordInterface $this->modifiedColumns[ProfileI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ProfileI18n implements ActiveRecordInterface $this->modifiedColumns[ProfileI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ProfileI18n implements ActiveRecordInterface $this->modifiedColumns[ProfileI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ProfileI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProfileI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ProfileI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProfileI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ProfileI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ProfileI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ProfileI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ProfileI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ProfileI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ProfileI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ProfileI18n implements ActiveRecordInterface if ($this->isColumnModified(ProfileI18nTableMap::DESCRIPTION)) $criteria->add(ProfileI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ProfileI18nTableMap::CHAPO)) $criteria->add(ProfileI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ProfileI18nTableMap::POSTSCRIPTUM)) $criteria->add(ProfileI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ProfileI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ProfileI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProfileI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProfileI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ProfileI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProfileI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProfileI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ProfileI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildProfile object. * - * @param ChildProfile $v - * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) + * @param ChildProfile $v + * @return \Thelia\Model\ProfileI18n The current object (for fluent API support) * @throws PropelException */ public function setProfile(ChildProfile $v = null) @@ -1231,14 +1247,16 @@ abstract class ProfileI18n implements ActiveRecordInterface $v->addProfileI18n($this); } + return $this; } + /** * Get the associated ChildProfile object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProfile The associated ChildProfile object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProfile The associated ChildProfile object. * @throws PropelException */ public function getProfile(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ProfileI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ProfileI18nQuery.php b/core/lib/Thelia/Model/Base/ProfileI18nQuery.php index 1eba19874..79a5510df 100644 --- a/core/lib/Thelia/Model/Base/ProfileI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ProfileI18nQuery.php @@ -67,9 +67,9 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProfileI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProfileI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Returns a new ChildProfileI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProfileI18nQuery */ @@ -140,10 +140,10 @@ abstract class ProfileI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProfileI18n A model object, or null if the key is not found + * @return ChildProfileI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProfileI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ProfileI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ProfileI18nQuery extends ModelCriteria * * @see filterByProfile() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ProfileI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ProfileI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ProfileI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ProfileI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ProfileI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Profile object * - * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Profile relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ProfileI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query */ public function useProfileQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProfileI18n $profileI18n Object to remove from the list of results + * @param ChildProfileI18n $profileI18n Object to remove from the list of results * * @return ChildProfileI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Deletes all rows from the profile_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ProfileI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProfileI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProfileI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProfileI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ProfileI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProfileI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ProfileModule.php b/core/lib/Thelia/Model/Base/ProfileModule.php index e513b30d0..ef7394f11 100644 --- a/core/lib/Thelia/Model/Base/ProfileModule.php +++ b/core/lib/Thelia/Model/Base/ProfileModule.php @@ -31,6 +31,7 @@ abstract class ProfileModule implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProfileModuleTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -328,9 +329,9 @@ abstract class ProfileModule implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProfileModule The current object, for fluid interface */ @@ -380,30 +381,33 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Get the [profile_id] column value. * - * @return int + * @return int */ public function getProfileId() { + return $this->profile_id; } /** * Get the [module_id] column value. * - * @return int + * @return int */ public function getModuleId() { + return $this->module_id; } /** * Get the [access] column value. * - * @return int + * @return int */ public function getAccess() { + return $this->access; } @@ -411,8 +415,8 @@ abstract class ProfileModule implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -431,8 +435,8 @@ abstract class ProfileModule implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -450,8 +454,8 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Set the value of [profile_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProfileModule The current object (for fluent API support) */ public function setProfileId($v) { @@ -468,14 +472,15 @@ abstract class ProfileModule implements ActiveRecordInterface $this->aProfile = null; } + return $this; } // setProfileId() /** * Set the value of [module_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProfileModule The current object (for fluent API support) */ public function setModuleId($v) { @@ -492,14 +497,15 @@ abstract class ProfileModule implements ActiveRecordInterface $this->aModule = null; } + return $this; } // setModuleId() /** * Set the value of [access] column. * - * @param int $v new value - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProfileModule The current object (for fluent API support) */ public function setAccess($v) { @@ -512,15 +518,16 @@ abstract class ProfileModule implements ActiveRecordInterface $this->modifiedColumns[ProfileModuleTableMap::ACCESS] = true; } + return $this; } // setAccess() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProfileModule The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -532,15 +539,16 @@ abstract class ProfileModule implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProfileModule The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -552,6 +560,7 @@ abstract class ProfileModule implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -595,6 +604,7 @@ abstract class ProfileModule implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProfileModuleTableMap::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)]; $this->profile_id = (null !== $col) ? (int) $col : null; @@ -658,10 +668,10 @@ abstract class ProfileModule implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -698,7 +708,7 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProfileModule::setDeleted() @@ -741,8 +751,8 @@ abstract class ProfileModule implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -803,8 +813,8 @@ abstract class ProfileModule implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -854,7 +864,7 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -921,7 +931,7 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -937,12 +947,12 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -956,7 +966,7 @@ abstract class ProfileModule implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -989,12 +999,12 @@ abstract class ProfileModule implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1032,12 +1042,12 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1051,8 +1061,8 @@ abstract class ProfileModule implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1089,8 +1099,8 @@ abstract class ProfileModule implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1118,6 +1128,7 @@ abstract class ProfileModule implements ActiveRecordInterface if ($this->isColumnModified(ProfileModuleTableMap::ACCESS)) $criteria->add(ProfileModuleTableMap::ACCESS, $this->access); if ($this->isColumnModified(ProfileModuleTableMap::CREATED_AT)) $criteria->add(ProfileModuleTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProfileModuleTableMap::UPDATED_AT)) $criteria->add(ProfileModuleTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1155,7 +1166,7 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1170,6 +1181,7 @@ abstract class ProfileModule implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getProfileId()) && (null === $this->getModuleId()); } @@ -1179,9 +1191,9 @@ abstract class ProfileModule implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProfileModule (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProfileModule (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1204,8 +1216,8 @@ abstract class ProfileModule implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProfileModule Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProfileModule Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1221,8 +1233,8 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Declares an association between this object and a ChildProfile object. * - * @param ChildProfile $v - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) + * @param ChildProfile $v + * @return \Thelia\Model\ProfileModule The current object (for fluent API support) * @throws PropelException */ public function setProfile(ChildProfile $v = null) @@ -1241,14 +1253,16 @@ abstract class ProfileModule implements ActiveRecordInterface $v->addProfileModule($this); } + return $this; } + /** * Get the associated ChildProfile object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProfile The associated ChildProfile object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProfile The associated ChildProfile object. * @throws PropelException */ public function getProfile(ConnectionInterface $con = null) @@ -1270,8 +1284,8 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Declares an association between this object and a ChildModule object. * - * @param ChildModule $v - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) + * @param ChildModule $v + * @return \Thelia\Model\ProfileModule The current object (for fluent API support) * @throws PropelException */ public function setModule(ChildModule $v = null) @@ -1290,14 +1304,16 @@ abstract class ProfileModule implements ActiveRecordInterface $v->addProfileModule($this); } + return $this; } + /** * Get the associated ChildModule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildModule The associated ChildModule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildModule The associated ChildModule object. * @throws PropelException */ public function getModule(ConnectionInterface $con = null) @@ -1341,7 +1357,7 @@ abstract class ProfileModule implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1367,7 +1383,7 @@ abstract class ProfileModule implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProfileModule The current object (for fluent API support) + * @return ChildProfileModule The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1452,6 +1468,7 @@ abstract class ProfileModule implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ProfileModuleQuery.php b/core/lib/Thelia/Model/Base/ProfileModuleQuery.php index 716f28802..4f49ccb2f 100644 --- a/core/lib/Thelia/Model/Base/ProfileModuleQuery.php +++ b/core/lib/Thelia/Model/Base/ProfileModuleQuery.php @@ -67,9 +67,9 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProfileModuleQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProfileModule', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Returns a new ChildProfileModuleQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProfileModuleQuery */ @@ -140,10 +140,10 @@ abstract class ProfileModuleQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProfileModule A model object, or null if the key is not found + * @return ChildProfileModule A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProfileModule|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ProfileModuleQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ProfileModuleQuery extends ModelCriteria * * @see filterByProfile() * - * @param mixed $profileId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $profileId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -303,11 +303,11 @@ abstract class ProfileModuleQuery extends ModelCriteria * * @see filterByModule() * - * @param mixed $moduleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $moduleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -344,11 +344,11 @@ abstract class ProfileModuleQuery extends ModelCriteria * $query->filterByAccess(array('min' => 12)); // WHERE access > 12 * * - * @param mixed $access The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $access The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -385,13 +385,13 @@ abstract class ProfileModuleQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -428,13 +428,13 @@ abstract class ProfileModuleQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Profile object * - * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -489,8 +489,8 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Profile relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -523,11 +523,11 @@ abstract class ProfileModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query */ public function useProfileQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -539,8 +539,8 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Module object * - * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -564,8 +564,8 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Module relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -598,11 +598,11 @@ abstract class ProfileModuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query */ public function useModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -614,7 +614,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProfileModule $profileModule Object to remove from the list of results + * @param ChildProfileModule $profileModule Object to remove from the list of results * * @return ChildProfileModuleQuery The current query, for fluid interface */ @@ -632,8 +632,8 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Deletes all rows from the profile_module table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -664,13 +664,13 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProfileModule or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProfileModule object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProfileModule object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -690,6 +690,7 @@ abstract class ProfileModuleQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProfileModuleTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -708,9 +709,9 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProfileModuleQuery The current query, for fluid interface + * @return ChildProfileModuleQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -720,9 +721,9 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProfileModuleQuery The current query, for fluid interface + * @return ChildProfileModuleQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -732,7 +733,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProfileModuleQuery The current query, for fluid interface + * @return ChildProfileModuleQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -742,7 +743,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProfileModuleQuery The current query, for fluid interface + * @return ChildProfileModuleQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -752,7 +753,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProfileModuleQuery The current query, for fluid interface + * @return ChildProfileModuleQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -762,7 +763,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProfileModuleQuery The current query, for fluid interface + * @return ChildProfileModuleQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/ProfileQuery.php b/core/lib/Thelia/Model/Base/ProfileQuery.php index 4b1d939ff..ad778a354 100644 --- a/core/lib/Thelia/Model/Base/ProfileQuery.php +++ b/core/lib/Thelia/Model/Base/ProfileQuery.php @@ -72,9 +72,9 @@ abstract class ProfileQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProfileQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Profile', $modelAlias = null) { @@ -84,8 +84,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Returns a new ChildProfileQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProfileQuery */ @@ -114,7 +114,7 @@ abstract class ProfileQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProfile|array|mixed the result, formatted by the current formatter @@ -145,10 +145,10 @@ abstract class ProfileQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProfile A model object, or null if the key is not found + * @return ChildProfile A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -175,8 +175,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProfile|array|mixed the result, formatted by the current formatter */ @@ -196,8 +196,8 @@ abstract class ProfileQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -218,24 +218,26 @@ abstract class ProfileQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProfileQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ProfileTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProfileQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ProfileTableMap::ID, $keys, Criteria::IN); } @@ -249,11 +251,11 @@ abstract class ProfileQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -289,9 +291,9 @@ abstract class ProfileQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -319,13 +321,13 @@ abstract class ProfileQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -362,13 +364,13 @@ abstract class ProfileQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -398,8 +400,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Admin object * - * @param \Thelia\Model\Admin|ObjectCollection $admin the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Admin|ObjectCollection $admin the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -421,8 +423,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Admin relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileQuery The current query, for fluid interface */ @@ -455,11 +457,11 @@ abstract class ProfileQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AdminQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AdminQuery A secondary query class using the current class as primary query */ public function useAdminQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -471,8 +473,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProfileResource object * - * @param \Thelia\Model\ProfileResource|ObjectCollection $profileResource the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProfileResource|ObjectCollection $profileResource the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -494,8 +496,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProfileResource relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileQuery The current query, for fluid interface */ @@ -528,11 +530,11 @@ abstract class ProfileQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileResourceQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileResourceQuery A secondary query class using the current class as primary query */ public function useProfileResourceQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -544,8 +546,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProfileModule object * - * @param \Thelia\Model\ProfileModule|ObjectCollection $profileModule the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProfileModule|ObjectCollection $profileModule the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -567,8 +569,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProfileModule relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileQuery The current query, for fluid interface */ @@ -601,11 +603,11 @@ abstract class ProfileQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileModuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileModuleQuery A secondary query class using the current class as primary query */ public function useProfileModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -617,8 +619,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProfileI18n object * - * @param \Thelia\Model\ProfileI18n|ObjectCollection $profileI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProfileI18n|ObjectCollection $profileI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -640,8 +642,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProfileI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileQuery The current query, for fluid interface */ @@ -674,11 +676,11 @@ abstract class ProfileQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileI18nQuery A secondary query class using the current class as primary query */ public function useProfileI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -691,8 +693,8 @@ abstract class ProfileQuery extends ModelCriteria * Filter the query by a related Resource object * using the profile_resource table as cross reference * - * @param Resource $resource the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Resource $resource the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ @@ -707,7 +709,7 @@ abstract class ProfileQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProfile $profile Object to remove from the list of results + * @param ChildProfile $profile Object to remove from the list of results * * @return ChildProfileQuery The current query, for fluid interface */ @@ -723,8 +725,8 @@ abstract class ProfileQuery extends ModelCriteria /** * Deletes all rows from the profile table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -755,13 +757,13 @@ abstract class ProfileQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProfile or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProfile object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProfile object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -781,6 +783,7 @@ abstract class ProfileQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProfileTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -799,9 +802,9 @@ abstract class ProfileQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -811,9 +814,9 @@ abstract class ProfileQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -823,7 +826,7 @@ abstract class ProfileQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -833,7 +836,7 @@ abstract class ProfileQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -843,7 +846,7 @@ abstract class ProfileQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -853,7 +856,7 @@ abstract class ProfileQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -865,11 +868,11 @@ abstract class ProfileQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -884,10 +887,10 @@ abstract class ProfileQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProfileQuery The current query, for fluid interface + * @return ChildProfileQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -904,11 +907,11 @@ abstract class ProfileQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildProfileI18nQuery A secondary query class using the current class as primary query + * @return ChildProfileI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/ProfileResource.php b/core/lib/Thelia/Model/Base/ProfileResource.php index 9a57fc085..eac774015 100644 --- a/core/lib/Thelia/Model/Base/ProfileResource.php +++ b/core/lib/Thelia/Model/Base/ProfileResource.php @@ -31,6 +31,7 @@ abstract class ProfileResource implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ProfileResourceTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -328,9 +329,9 @@ abstract class ProfileResource implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ProfileResource The current object, for fluid interface */ @@ -380,30 +381,33 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Get the [profile_id] column value. * - * @return int + * @return int */ public function getProfileId() { + return $this->profile_id; } /** * Get the [resource_id] column value. * - * @return int + * @return int */ public function getResourceId() { + return $this->resource_id; } /** * Get the [access] column value. * - * @return int + * @return int */ public function getAccess() { + return $this->access; } @@ -411,8 +415,8 @@ abstract class ProfileResource implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -431,8 +435,8 @@ abstract class ProfileResource implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -450,8 +454,8 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Set the value of [profile_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProfileResource The current object (for fluent API support) */ public function setProfileId($v) { @@ -468,14 +472,15 @@ abstract class ProfileResource implements ActiveRecordInterface $this->aProfile = null; } + return $this; } // setProfileId() /** * Set the value of [resource_id] column. * - * @param int $v new value - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProfileResource The current object (for fluent API support) */ public function setResourceId($v) { @@ -492,14 +497,15 @@ abstract class ProfileResource implements ActiveRecordInterface $this->aResource = null; } + return $this; } // setResourceId() /** * Set the value of [access] column. * - * @param int $v new value - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ProfileResource The current object (for fluent API support) */ public function setAccess($v) { @@ -512,15 +518,16 @@ abstract class ProfileResource implements ActiveRecordInterface $this->modifiedColumns[ProfileResourceTableMap::ACCESS] = true; } + return $this; } // setAccess() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProfileResource The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -532,15 +539,16 @@ abstract class ProfileResource implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\ProfileResource The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -552,6 +560,7 @@ abstract class ProfileResource implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -595,6 +604,7 @@ abstract class ProfileResource implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProfileResourceTableMap::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)]; $this->profile_id = (null !== $col) ? (int) $col : null; @@ -658,10 +668,10 @@ abstract class ProfileResource implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -698,7 +708,7 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ProfileResource::setDeleted() @@ -741,8 +751,8 @@ abstract class ProfileResource implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -803,8 +813,8 @@ abstract class ProfileResource implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -854,7 +864,7 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -921,7 +931,7 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -937,12 +947,12 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -956,7 +966,7 @@ abstract class ProfileResource implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -989,12 +999,12 @@ abstract class ProfileResource implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1032,12 +1042,12 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1051,8 +1061,8 @@ abstract class ProfileResource implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1089,8 +1099,8 @@ abstract class ProfileResource implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1118,6 +1128,7 @@ abstract class ProfileResource implements ActiveRecordInterface if ($this->isColumnModified(ProfileResourceTableMap::ACCESS)) $criteria->add(ProfileResourceTableMap::ACCESS, $this->access); if ($this->isColumnModified(ProfileResourceTableMap::CREATED_AT)) $criteria->add(ProfileResourceTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProfileResourceTableMap::UPDATED_AT)) $criteria->add(ProfileResourceTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1155,7 +1166,7 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1170,6 +1181,7 @@ abstract class ProfileResource implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getProfileId()) && (null === $this->getResourceId()); } @@ -1179,9 +1191,9 @@ abstract class ProfileResource implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ProfileResource (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ProfileResource (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1204,8 +1216,8 @@ abstract class ProfileResource implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ProfileResource Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ProfileResource Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1221,8 +1233,8 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Declares an association between this object and a ChildProfile object. * - * @param ChildProfile $v - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) + * @param ChildProfile $v + * @return \Thelia\Model\ProfileResource The current object (for fluent API support) * @throws PropelException */ public function setProfile(ChildProfile $v = null) @@ -1241,14 +1253,16 @@ abstract class ProfileResource implements ActiveRecordInterface $v->addProfileResource($this); } + return $this; } + /** * Get the associated ChildProfile object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildProfile The associated ChildProfile object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildProfile The associated ChildProfile object. * @throws PropelException */ public function getProfile(ConnectionInterface $con = null) @@ -1270,8 +1284,8 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Declares an association between this object and a ChildResource object. * - * @param ChildResource $v - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) + * @param ChildResource $v + * @return \Thelia\Model\ProfileResource The current object (for fluent API support) * @throws PropelException */ public function setResource(ChildResource $v = null) @@ -1290,14 +1304,16 @@ abstract class ProfileResource implements ActiveRecordInterface $v->addProfileResource($this); } + return $this; } + /** * Get the associated ChildResource object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildResource The associated ChildResource object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildResource The associated ChildResource object. * @throws PropelException */ public function getResource(ConnectionInterface $con = null) @@ -1341,7 +1357,7 @@ abstract class ProfileResource implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1367,7 +1383,7 @@ abstract class ProfileResource implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildProfileResource The current object (for fluent API support) + * @return ChildProfileResource The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1452,6 +1468,7 @@ abstract class ProfileResource implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ProfileResourceQuery.php b/core/lib/Thelia/Model/Base/ProfileResourceQuery.php index 41cb08da2..e836ec5e0 100644 --- a/core/lib/Thelia/Model/Base/ProfileResourceQuery.php +++ b/core/lib/Thelia/Model/Base/ProfileResourceQuery.php @@ -67,9 +67,9 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ProfileResourceQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ProfileResource', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Returns a new ChildProfileResourceQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildProfileResourceQuery */ @@ -140,10 +140,10 @@ abstract class ProfileResourceQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildProfileResource A model object, or null if the key is not found + * @return ChildProfileResource A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildProfileResource|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ProfileResourceQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ProfileResourceQuery extends ModelCriteria * * @see filterByProfile() * - * @param mixed $profileId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $profileId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -303,11 +303,11 @@ abstract class ProfileResourceQuery extends ModelCriteria * * @see filterByResource() * - * @param mixed $resourceId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $resourceId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -344,11 +344,11 @@ abstract class ProfileResourceQuery extends ModelCriteria * $query->filterByAccess(array('min' => 12)); // WHERE access > 12 * * - * @param mixed $access The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $access The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -385,13 +385,13 @@ abstract class ProfileResourceQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -428,13 +428,13 @@ abstract class ProfileResourceQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Profile object * - * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Profile|ObjectCollection $profile The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -489,8 +489,8 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Profile relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -523,11 +523,11 @@ abstract class ProfileResourceQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileQuery A secondary query class using the current class as primary query */ public function useProfileQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -539,8 +539,8 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Resource object * - * @param \Thelia\Model\Resource|ObjectCollection $resource The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Resource|ObjectCollection $resource The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -564,8 +564,8 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Resource relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -598,11 +598,11 @@ abstract class ProfileResourceQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ResourceQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ResourceQuery A secondary query class using the current class as primary query */ public function useResourceQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -614,7 +614,7 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildProfileResource $profileResource Object to remove from the list of results + * @param ChildProfileResource $profileResource Object to remove from the list of results * * @return ChildProfileResourceQuery The current query, for fluid interface */ @@ -632,8 +632,8 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Deletes all rows from the profile_resource table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -664,13 +664,13 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildProfileResource or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildProfileResource object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildProfileResource object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -690,6 +690,7 @@ abstract class ProfileResourceQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ProfileResourceTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -708,9 +709,9 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildProfileResourceQuery The current query, for fluid interface + * @return ChildProfileResourceQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -720,9 +721,9 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildProfileResourceQuery The current query, for fluid interface + * @return ChildProfileResourceQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -732,7 +733,7 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildProfileResourceQuery The current query, for fluid interface + * @return ChildProfileResourceQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -742,7 +743,7 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildProfileResourceQuery The current query, for fluid interface + * @return ChildProfileResourceQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -752,7 +753,7 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildProfileResourceQuery The current query, for fluid interface + * @return ChildProfileResourceQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -762,7 +763,7 @@ abstract class ProfileResourceQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildProfileResourceQuery The current query, for fluid interface + * @return ChildProfileResourceQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Resource.php b/core/lib/Thelia/Model/Base/Resource.php index 15b477d7e..2744edb78 100644 --- a/core/lib/Thelia/Model/Base/Resource.php +++ b/core/lib/Thelia/Model/Base/Resource.php @@ -34,6 +34,7 @@ abstract class Resource implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ResourceTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -350,9 +351,9 @@ abstract class Resource implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Resource The current object, for fluid interface */ @@ -402,20 +403,22 @@ abstract class Resource implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [code] column value. * - * @return string + * @return string */ public function getCode() { + return $this->code; } @@ -423,8 +426,8 @@ abstract class Resource implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -443,8 +446,8 @@ abstract class Resource implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -462,8 +465,8 @@ abstract class Resource implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Resource The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Resource The current object (for fluent API support) */ public function setId($v) { @@ -476,14 +479,15 @@ abstract class Resource implements ActiveRecordInterface $this->modifiedColumns[ResourceTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [code] column. * - * @param string $v new value - * @return \Thelia\Model\Resource The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Resource The current object (for fluent API support) */ public function setCode($v) { @@ -496,15 +500,16 @@ abstract class Resource implements ActiveRecordInterface $this->modifiedColumns[ResourceTableMap::CODE] = true; } + return $this; } // setCode() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Resource The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Resource The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -516,15 +521,16 @@ abstract class Resource implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Resource The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Resource The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -536,6 +542,7 @@ abstract class Resource implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -630,10 +637,10 @@ abstract class Resource implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -673,7 +680,7 @@ abstract class Resource implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Resource::setDeleted() @@ -716,8 +723,8 @@ abstract class Resource implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -778,8 +785,8 @@ abstract class Resource implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -871,7 +878,7 @@ abstract class Resource implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -943,7 +950,7 @@ abstract class Resource implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -959,12 +966,12 @@ abstract class Resource implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -978,7 +985,7 @@ abstract class Resource implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1008,12 +1015,12 @@ abstract class Resource implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1050,12 +1057,12 @@ abstract class Resource implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1069,8 +1076,8 @@ abstract class Resource implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1104,8 +1111,8 @@ abstract class Resource implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1131,6 +1138,7 @@ abstract class Resource implements ActiveRecordInterface if ($this->isColumnModified(ResourceTableMap::CODE)) $criteria->add(ResourceTableMap::CODE, $this->code); if ($this->isColumnModified(ResourceTableMap::CREATED_AT)) $criteria->add(ResourceTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ResourceTableMap::UPDATED_AT)) $criteria->add(ResourceTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1152,7 +1160,7 @@ abstract class Resource implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1162,7 +1170,7 @@ abstract class Resource implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1176,6 +1184,7 @@ abstract class Resource implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1185,9 +1194,9 @@ abstract class Resource implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Resource (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Resource (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1229,8 +1238,8 @@ abstract class Resource implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Resource Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Resource Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1249,7 +1258,7 @@ abstract class Resource implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1291,8 +1300,8 @@ abstract class Resource implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1314,8 +1323,8 @@ abstract class Resource implements ActiveRecordInterface * If this ChildResource is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProfileResource[] List of ChildProfileResource objects * @throws PropelException */ @@ -1371,14 +1380,15 @@ abstract class Resource implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $profileResources A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildResource The current object (for fluent API support) + * @param Collection $profileResources A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildResource The current object (for fluent API support) */ public function setProfileResources(Collection $profileResources, ConnectionInterface $con = null) { $profileResourcesToDelete = $this->getProfileResources(new Criteria(), $con)->diff($profileResources); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1402,10 +1412,10 @@ abstract class Resource implements ActiveRecordInterface /** * Returns the number of related ProfileResource objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ProfileResource objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ProfileResource objects. * @throws PropelException */ public function countProfileResources(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1437,8 +1447,8 @@ abstract class Resource implements ActiveRecordInterface * Method called to associate a ChildProfileResource object to this object * through the ChildProfileResource foreign key attribute. * - * @param ChildProfileResource $l ChildProfileResource - * @return \Thelia\Model\Resource The current object (for fluent API support) + * @param ChildProfileResource $l ChildProfileResource + * @return \Thelia\Model\Resource The current object (for fluent API support) */ public function addProfileResource(ChildProfileResource $l) { @@ -1465,7 +1475,7 @@ abstract class Resource implements ActiveRecordInterface /** * @param ProfileResource $profileResource The profileResource object to remove. - * @return ChildResource The current object (for fluent API support) + * @return ChildResource The current object (for fluent API support) */ public function removeProfileResource($profileResource) { @@ -1482,6 +1492,7 @@ abstract class Resource implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1493,9 +1504,9 @@ abstract class Resource implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Resource. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProfileResource[] List of ChildProfileResource objects */ public function getProfileResourcesJoinProfile($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1535,8 +1546,8 @@ abstract class Resource implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1558,8 +1569,8 @@ abstract class Resource implements ActiveRecordInterface * If this ChildResource is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildResourceI18n[] List of ChildResourceI18n objects * @throws PropelException */ @@ -1615,14 +1626,15 @@ abstract class Resource implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $resourceI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildResource The current object (for fluent API support) + * @param Collection $resourceI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildResource The current object (for fluent API support) */ public function setResourceI18ns(Collection $resourceI18ns, ConnectionInterface $con = null) { $resourceI18nsToDelete = $this->getResourceI18ns(new Criteria(), $con)->diff($resourceI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1646,10 +1658,10 @@ abstract class Resource implements ActiveRecordInterface /** * Returns the number of related ResourceI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related ResourceI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related ResourceI18n objects. * @throws PropelException */ public function countResourceI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1681,8 +1693,8 @@ abstract class Resource implements ActiveRecordInterface * Method called to associate a ChildResourceI18n object to this object * through the ChildResourceI18n foreign key attribute. * - * @param ChildResourceI18n $l ChildResourceI18n - * @return \Thelia\Model\Resource The current object (for fluent API support) + * @param ChildResourceI18n $l ChildResourceI18n + * @return \Thelia\Model\Resource The current object (for fluent API support) */ public function addResourceI18n(ChildResourceI18n $l) { @@ -1712,7 +1724,7 @@ abstract class Resource implements ActiveRecordInterface } /** - * @param ResourceI18n $resourceI18n The resourceI18n object to remove. + * @param ResourceI18n $resourceI18n The resourceI18n object to remove. * @return ChildResource The current object (for fluent API support) */ public function removeResourceI18n($resourceI18n) @@ -1770,8 +1782,8 @@ abstract class Resource implements ActiveRecordInterface * If this ChildResource is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildProfile[] List of ChildProfile objects */ @@ -1801,9 +1813,9 @@ abstract class Resource implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $profiles A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildResource The current object (for fluent API support) + * @param Collection $profiles A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildResource The current object (for fluent API support) */ public function setProfiles(Collection $profiles, ConnectionInterface $con = null) { @@ -1827,9 +1839,9 @@ abstract class Resource implements ActiveRecordInterface * Gets the number of ChildProfile objects related by a many-to-many relationship * to the current object by way of the profile_resource cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildProfile objects */ @@ -1857,7 +1869,7 @@ abstract class Resource implements ActiveRecordInterface * Associate a ChildProfile object to this object * through the profile_resource cross reference table. * - * @param ChildProfile $profile The ChildProfileResource object to relate + * @param ChildProfile $profile The ChildProfileResource object to relate * @return ChildResource The current object (for fluent API support) */ public function addProfile(ChildProfile $profile) @@ -1875,7 +1887,7 @@ abstract class Resource implements ActiveRecordInterface } /** - * @param Profile $profile The profile object to add. + * @param Profile $profile The profile object to add. */ protected function doAddProfile($profile) { @@ -1894,7 +1906,7 @@ abstract class Resource implements ActiveRecordInterface * Remove a ChildProfile object to this object * through the profile_resource cross reference table. * - * @param ChildProfile $profile The ChildProfileResource object to relate + * @param ChildProfile $profile The ChildProfileResource object to relate * @return ChildResource The current object (for fluent API support) */ public function removeProfile(ChildProfile $profile) @@ -1936,7 +1948,7 @@ abstract class Resource implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1982,7 +1994,7 @@ abstract class Resource implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildResource The current object (for fluent API support) + * @return ChildResource The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1996,9 +2008,9 @@ abstract class Resource implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildResource The current object (for fluent API support) + * @return ChildResource The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2010,7 +2022,7 @@ abstract class Resource implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2020,8 +2032,8 @@ abstract class Resource implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildResourceI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2054,10 +2066,10 @@ abstract class Resource implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildResource The current object (for fluent API support) + * @return ChildResource The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2082,7 +2094,7 @@ abstract class Resource implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildResourceI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2090,6 +2102,7 @@ abstract class Resource implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2100,6 +2113,7 @@ abstract class Resource implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2112,6 +2126,7 @@ abstract class Resource implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2122,6 +2137,7 @@ abstract class Resource implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2134,6 +2150,7 @@ abstract class Resource implements ActiveRecordInterface return $this; } + /** * Get the [chapo] column value. * @@ -2144,6 +2161,7 @@ abstract class Resource implements ActiveRecordInterface return $this->getCurrentTranslation()->getChapo(); } + /** * Set the value of [chapo] column. * @@ -2156,6 +2174,7 @@ abstract class Resource implements ActiveRecordInterface return $this; } + /** * Get the [postscriptum] column value. * @@ -2166,6 +2185,7 @@ abstract class Resource implements ActiveRecordInterface return $this->getCurrentTranslation()->getPostscriptum(); } + /** * Set the value of [postscriptum] column. * @@ -2254,6 +2274,7 @@ abstract class Resource implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/ResourceI18n.php b/core/lib/Thelia/Model/Base/ResourceI18n.php index 9a099b5e3..7a52829a8 100644 --- a/core/lib/Thelia/Model/Base/ResourceI18n.php +++ b/core/lib/Thelia/Model/Base/ResourceI18n.php @@ -26,6 +26,7 @@ abstract class ResourceI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\ResourceI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -324,9 +325,9 @@ abstract class ResourceI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return ResourceI18n The current object, for fluid interface */ @@ -376,68 +377,74 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Get the [chapo] column value. * - * @return string + * @return string */ public function getChapo() { + return $this->chapo; } /** * Get the [postscriptum] column value. * - * @return string + * @return string */ public function getPostscriptum() { + return $this->postscriptum; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) */ public function setId($v) { @@ -454,14 +461,15 @@ abstract class ResourceI18n implements ActiveRecordInterface $this->aResource = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -474,14 +482,15 @@ abstract class ResourceI18n implements ActiveRecordInterface $this->modifiedColumns[ResourceI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -494,14 +503,15 @@ abstract class ResourceI18n implements ActiveRecordInterface $this->modifiedColumns[ResourceI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -514,14 +524,15 @@ abstract class ResourceI18n implements ActiveRecordInterface $this->modifiedColumns[ResourceI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() /** * Set the value of [chapo] column. * - * @param string $v new value - * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) */ public function setChapo($v) { @@ -534,14 +545,15 @@ abstract class ResourceI18n implements ActiveRecordInterface $this->modifiedColumns[ResourceI18nTableMap::CHAPO] = true; } + return $this; } // setChapo() /** * Set the value of [postscriptum] column. * - * @param string $v new value - * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) */ public function setPostscriptum($v) { @@ -554,6 +566,7 @@ abstract class ResourceI18n implements ActiveRecordInterface $this->modifiedColumns[ResourceI18nTableMap::POSTSCRIPTUM] = true; } + return $this; } // setPostscriptum() @@ -597,6 +610,7 @@ abstract class ResourceI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ResourceI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -654,10 +668,10 @@ abstract class ResourceI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -693,7 +707,7 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see ResourceI18n::setDeleted() @@ -736,8 +750,8 @@ abstract class ResourceI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -787,8 +801,8 @@ abstract class ResourceI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -831,7 +845,7 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -904,7 +918,7 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -920,12 +934,12 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -939,7 +953,7 @@ abstract class ResourceI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -975,12 +989,12 @@ abstract class ResourceI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1016,12 +1030,12 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1035,8 +1049,8 @@ abstract class ResourceI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1076,8 +1090,8 @@ abstract class ResourceI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1107,6 +1121,7 @@ abstract class ResourceI18n implements ActiveRecordInterface if ($this->isColumnModified(ResourceI18nTableMap::DESCRIPTION)) $criteria->add(ResourceI18nTableMap::DESCRIPTION, $this->description); if ($this->isColumnModified(ResourceI18nTableMap::CHAPO)) $criteria->add(ResourceI18nTableMap::CHAPO, $this->chapo); if ($this->isColumnModified(ResourceI18nTableMap::POSTSCRIPTUM)) $criteria->add(ResourceI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + return $criteria; } @@ -1144,7 +1159,7 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1159,6 +1174,7 @@ abstract class ResourceI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1168,9 +1184,9 @@ abstract class ResourceI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\ResourceI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\ResourceI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1194,8 +1210,8 @@ abstract class ResourceI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\ResourceI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\ResourceI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1211,8 +1227,8 @@ abstract class ResourceI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildResource object. * - * @param ChildResource $v - * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) + * @param ChildResource $v + * @return \Thelia\Model\ResourceI18n The current object (for fluent API support) * @throws PropelException */ public function setResource(ChildResource $v = null) @@ -1231,14 +1247,16 @@ abstract class ResourceI18n implements ActiveRecordInterface $v->addResourceI18n($this); } + return $this; } + /** * Get the associated ChildResource object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildResource The associated ChildResource object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildResource The associated ChildResource object. * @throws PropelException */ public function getResource(ConnectionInterface $con = null) @@ -1283,7 +1301,7 @@ abstract class ResourceI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/ResourceI18nQuery.php b/core/lib/Thelia/Model/Base/ResourceI18nQuery.php index 210f2e092..839d212dc 100644 --- a/core/lib/Thelia/Model/Base/ResourceI18nQuery.php +++ b/core/lib/Thelia/Model/Base/ResourceI18nQuery.php @@ -67,9 +67,9 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ResourceI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ResourceI18n', $modelAlias = null) { @@ -79,8 +79,8 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Returns a new ChildResourceI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildResourceI18nQuery */ @@ -140,10 +140,10 @@ abstract class ResourceI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildResourceI18n A model object, or null if the key is not found + * @return ChildResourceI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildResourceI18n|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class ResourceI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,7 +214,7 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -229,7 +229,7 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class ResourceI18nQuery extends ModelCriteria * * @see filterByResource() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class ResourceI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class ResourceI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -358,9 +358,9 @@ abstract class ResourceI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -387,9 +387,9 @@ abstract class ResourceI18nQuery extends ModelCriteria * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' * * - * @param string $chapo The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -416,9 +416,9 @@ abstract class ResourceI18nQuery extends ModelCriteria * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' * * - * @param string $postscriptum The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -439,8 +439,8 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Resource object * - * @param \Thelia\Model\Resource|ObjectCollection $resource The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Resource|ObjectCollection $resource The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -464,8 +464,8 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Resource relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -498,11 +498,11 @@ abstract class ResourceI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ResourceQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ResourceQuery A secondary query class using the current class as primary query */ public function useResourceQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -514,7 +514,7 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildResourceI18n $resourceI18n Object to remove from the list of results + * @param ChildResourceI18n $resourceI18n Object to remove from the list of results * * @return ChildResourceI18nQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Deletes all rows from the resource_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class ResourceI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildResourceI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildResourceI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildResourceI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class ResourceI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ResourceI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/ResourceQuery.php b/core/lib/Thelia/Model/Base/ResourceQuery.php index 8bea0889e..613ab700a 100644 --- a/core/lib/Thelia/Model/Base/ResourceQuery.php +++ b/core/lib/Thelia/Model/Base/ResourceQuery.php @@ -64,9 +64,9 @@ abstract class ResourceQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\ResourceQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Resource', $modelAlias = null) { @@ -76,8 +76,8 @@ abstract class ResourceQuery extends ModelCriteria /** * Returns a new ChildResourceQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildResourceQuery */ @@ -106,7 +106,7 @@ abstract class ResourceQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildResource|array|mixed the result, formatted by the current formatter @@ -137,10 +137,10 @@ abstract class ResourceQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildResource A model object, or null if the key is not found + * @return ChildResource A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -167,8 +167,8 @@ abstract class ResourceQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildResource|array|mixed the result, formatted by the current formatter */ @@ -188,8 +188,8 @@ abstract class ResourceQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -210,24 +210,26 @@ abstract class ResourceQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildResourceQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(ResourceTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildResourceQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(ResourceTableMap::ID, $keys, Criteria::IN); } @@ -241,11 +243,11 @@ abstract class ResourceQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ @@ -281,9 +283,9 @@ abstract class ResourceQuery extends ModelCriteria * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' * * - * @param string $code The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ @@ -311,13 +313,13 @@ abstract class ResourceQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ @@ -354,13 +356,13 @@ abstract class ResourceQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ @@ -390,8 +392,8 @@ abstract class ResourceQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ProfileResource object * - * @param \Thelia\Model\ProfileResource|ObjectCollection $profileResource the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ProfileResource|ObjectCollection $profileResource the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ @@ -413,8 +415,8 @@ abstract class ResourceQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ProfileResource relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildResourceQuery The current query, for fluid interface */ @@ -447,11 +449,11 @@ abstract class ResourceQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProfileResourceQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProfileResourceQuery A secondary query class using the current class as primary query */ public function useProfileResourceQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -463,8 +465,8 @@ abstract class ResourceQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\ResourceI18n object * - * @param \Thelia\Model\ResourceI18n|ObjectCollection $resourceI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\ResourceI18n|ObjectCollection $resourceI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ @@ -486,8 +488,8 @@ abstract class ResourceQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the ResourceI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildResourceQuery The current query, for fluid interface */ @@ -520,11 +522,11 @@ abstract class ResourceQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ResourceI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ResourceI18nQuery A secondary query class using the current class as primary query */ public function useResourceI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -537,8 +539,8 @@ abstract class ResourceQuery extends ModelCriteria * Filter the query by a related Profile object * using the profile_resource table as cross reference * - * @param Profile $profile the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Profile $profile the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ @@ -553,7 +555,7 @@ abstract class ResourceQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildResource $resource Object to remove from the list of results + * @param ChildResource $resource Object to remove from the list of results * * @return ChildResourceQuery The current query, for fluid interface */ @@ -569,8 +571,8 @@ abstract class ResourceQuery extends ModelCriteria /** * Deletes all rows from the resource table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -601,13 +603,13 @@ abstract class ResourceQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildResource or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildResource object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildResource object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -627,6 +629,7 @@ abstract class ResourceQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + ResourceTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -645,9 +648,9 @@ abstract class ResourceQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -657,9 +660,9 @@ abstract class ResourceQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -669,7 +672,7 @@ abstract class ResourceQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -679,7 +682,7 @@ abstract class ResourceQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -689,7 +692,7 @@ abstract class ResourceQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -699,7 +702,7 @@ abstract class ResourceQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -711,11 +714,11 @@ abstract class ResourceQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -730,10 +733,10 @@ abstract class ResourceQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildResourceQuery The current query, for fluid interface + * @return ChildResourceQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -750,11 +753,11 @@ abstract class ResourceQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildResourceI18nQuery A secondary query class using the current class as primary query + * @return ChildResourceI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/RewritingArgument.php b/core/lib/Thelia/Model/Base/RewritingArgument.php index cef658c6f..82f326d40 100644 --- a/core/lib/Thelia/Model/Base/RewritingArgument.php +++ b/core/lib/Thelia/Model/Base/RewritingArgument.php @@ -29,6 +29,7 @@ abstract class RewritingArgument implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\RewritingArgumentTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -307,9 +308,9 @@ abstract class RewritingArgument implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return RewritingArgument The current object, for fluid interface */ @@ -359,30 +360,33 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Get the [rewriting_url_id] column value. * - * @return int + * @return int */ public function getRewritingUrlId() { + return $this->rewriting_url_id; } /** * Get the [parameter] column value. * - * @return string + * @return string */ public function getParameter() { + return $this->parameter; } /** * Get the [value] column value. * - * @return string + * @return string */ public function getValue() { + return $this->value; } @@ -390,8 +394,8 @@ abstract class RewritingArgument implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -410,8 +414,8 @@ abstract class RewritingArgument implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -429,8 +433,8 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Set the value of [rewriting_url_id] column. * - * @param int $v new value - * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) */ public function setRewritingUrlId($v) { @@ -447,14 +451,15 @@ abstract class RewritingArgument implements ActiveRecordInterface $this->aRewritingUrl = null; } + return $this; } // setRewritingUrlId() /** * Set the value of [parameter] column. * - * @param string $v new value - * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) */ public function setParameter($v) { @@ -467,14 +472,15 @@ abstract class RewritingArgument implements ActiveRecordInterface $this->modifiedColumns[RewritingArgumentTableMap::PARAMETER] = true; } + return $this; } // setParameter() /** * Set the value of [value] column. * - * @param string $v new value - * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) */ public function setValue($v) { @@ -487,15 +493,16 @@ abstract class RewritingArgument implements ActiveRecordInterface $this->modifiedColumns[RewritingArgumentTableMap::VALUE] = true; } + return $this; } // setValue() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -507,15 +514,16 @@ abstract class RewritingArgument implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -527,6 +535,7 @@ abstract class RewritingArgument implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -627,10 +636,10 @@ abstract class RewritingArgument implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -666,7 +675,7 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see RewritingArgument::setDeleted() @@ -709,8 +718,8 @@ abstract class RewritingArgument implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -771,8 +780,8 @@ abstract class RewritingArgument implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -815,7 +824,7 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -825,6 +834,7 @@ abstract class RewritingArgument implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; + // check the columns in natural order for more readable SQL queries if ($this->isColumnModified(RewritingArgumentTableMap::REWRITING_URL_ID)) { $modifiedColumns[':p' . $index++] = '`REWRITING_URL_ID`'; @@ -881,7 +891,7 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -897,12 +907,12 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -916,7 +926,7 @@ abstract class RewritingArgument implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -949,12 +959,12 @@ abstract class RewritingArgument implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -989,12 +999,12 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1008,8 +1018,8 @@ abstract class RewritingArgument implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1046,8 +1056,8 @@ abstract class RewritingArgument implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1075,6 +1085,7 @@ abstract class RewritingArgument implements ActiveRecordInterface if ($this->isColumnModified(RewritingArgumentTableMap::VALUE)) $criteria->add(RewritingArgumentTableMap::VALUE, $this->value); if ($this->isColumnModified(RewritingArgumentTableMap::CREATED_AT)) $criteria->add(RewritingArgumentTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(RewritingArgumentTableMap::UPDATED_AT)) $criteria->add(RewritingArgumentTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1114,7 +1125,7 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1130,6 +1141,7 @@ abstract class RewritingArgument implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getRewritingUrlId()) && (null === $this->getParameter()) && (null === $this->getValue()); } @@ -1139,9 +1151,9 @@ abstract class RewritingArgument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\RewritingArgument (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\RewritingArgument (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1164,8 +1176,8 @@ abstract class RewritingArgument implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\RewritingArgument Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\RewritingArgument Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1181,8 +1193,8 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Declares an association between this object and a ChildRewritingUrl object. * - * @param ChildRewritingUrl $v - * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) + * @param ChildRewritingUrl $v + * @return \Thelia\Model\RewritingArgument The current object (for fluent API support) * @throws PropelException */ public function setRewritingUrl(ChildRewritingUrl $v = null) @@ -1201,6 +1213,7 @@ abstract class RewritingArgument implements ActiveRecordInterface $v->addRewritingArgument($this); } + return $this; } @@ -1208,8 +1221,8 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Get the associated ChildRewritingUrl object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildRewritingUrl The associated ChildRewritingUrl object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildRewritingUrl The associated ChildRewritingUrl object. * @throws PropelException */ public function getRewritingUrl(ConnectionInterface $con = null) @@ -1252,7 +1265,7 @@ abstract class RewritingArgument implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1277,7 +1290,7 @@ abstract class RewritingArgument implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildRewritingArgument The current object (for fluent API support) + * @return ChildRewritingArgument The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/RewritingArgumentQuery.php b/core/lib/Thelia/Model/Base/RewritingArgumentQuery.php index 0654af49c..bb4dd9a6d 100644 --- a/core/lib/Thelia/Model/Base/RewritingArgumentQuery.php +++ b/core/lib/Thelia/Model/Base/RewritingArgumentQuery.php @@ -63,9 +63,9 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\RewritingArgumentQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\RewritingArgument', $modelAlias = null) { @@ -75,8 +75,8 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Returns a new ChildRewritingArgumentQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildRewritingArgumentQuery */ @@ -136,10 +136,10 @@ abstract class RewritingArgumentQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildRewritingArgument A model object, or null if the key is not found + * @return ChildRewritingArgument A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -168,8 +168,8 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildRewritingArgument|array|mixed the result, formatted by the current formatter */ @@ -189,8 +189,8 @@ abstract class RewritingArgumentQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -211,7 +211,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -227,7 +227,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -260,11 +260,11 @@ abstract class RewritingArgumentQuery extends ModelCriteria * * @see filterByRewritingUrl() * - * @param mixed $rewritingUrlId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $rewritingUrlId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -300,9 +300,9 @@ abstract class RewritingArgumentQuery extends ModelCriteria * $query->filterByParameter('%fooValue%'); // WHERE parameter LIKE '%fooValue%' * * - * @param string $parameter The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $parameter The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -329,9 +329,9 @@ abstract class RewritingArgumentQuery extends ModelCriteria * $query->filterByValue('%fooValue%'); // WHERE value LIKE '%fooValue%' * * - * @param string $value The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $value The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -359,13 +359,13 @@ abstract class RewritingArgumentQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -402,13 +402,13 @@ abstract class RewritingArgumentQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -439,7 +439,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\RewritingUrl object * * @param \Thelia\Model\RewritingUrl|ObjectCollection $rewritingUrl The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -463,8 +463,8 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the RewritingUrl relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -497,11 +497,11 @@ abstract class RewritingArgumentQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\RewritingUrlQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\RewritingUrlQuery A secondary query class using the current class as primary query */ public function useRewritingUrlQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -513,7 +513,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildRewritingArgument $rewritingArgument Object to remove from the list of results + * @param ChildRewritingArgument $rewritingArgument Object to remove from the list of results * * @return ChildRewritingArgumentQuery The current query, for fluid interface */ @@ -532,8 +532,8 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Deletes all rows from the rewriting_argument table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -564,13 +564,13 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildRewritingArgument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildRewritingArgument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildRewritingArgument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -590,6 +590,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + RewritingArgumentTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -608,9 +609,9 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildRewritingArgumentQuery The current query, for fluid interface + * @return ChildRewritingArgumentQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -620,9 +621,9 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildRewritingArgumentQuery The current query, for fluid interface + * @return ChildRewritingArgumentQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -632,7 +633,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildRewritingArgumentQuery The current query, for fluid interface + * @return ChildRewritingArgumentQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -642,7 +643,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildRewritingArgumentQuery The current query, for fluid interface + * @return ChildRewritingArgumentQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -652,7 +653,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildRewritingArgumentQuery The current query, for fluid interface + * @return ChildRewritingArgumentQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -662,7 +663,7 @@ abstract class RewritingArgumentQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildRewritingArgumentQuery The current query, for fluid interface + * @return ChildRewritingArgumentQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/RewritingUrl.php b/core/lib/Thelia/Model/Base/RewritingUrl.php index 9f81b33d9..6791c25fe 100644 --- a/core/lib/Thelia/Model/Base/RewritingUrl.php +++ b/core/lib/Thelia/Model/Base/RewritingUrl.php @@ -30,6 +30,7 @@ abstract class RewritingUrl implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\RewritingUrlTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -350,9 +351,9 @@ abstract class RewritingUrl implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return RewritingUrl The current object, for fluid interface */ @@ -402,60 +403,66 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [url] column value. * - * @return string + * @return string */ public function getUrl() { + return $this->url; } /** * Get the [view] column value. * - * @return string + * @return string */ public function getView() { + return $this->view; } /** * Get the [view_id] column value. * - * @return string + * @return string */ public function getViewId() { + return $this->view_id; } /** * Get the [view_locale] column value. * - * @return string + * @return string */ public function getViewLocale() { + return $this->view_locale; } /** * Get the [redirected] column value. * - * @return int + * @return int */ public function getRedirected() { + return $this->redirected; } @@ -463,8 +470,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -483,8 +490,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -502,8 +509,8 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setId($v) { @@ -516,14 +523,15 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->modifiedColumns[RewritingUrlTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [url] column. * - * @param string $v new value - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setUrl($v) { @@ -536,14 +544,15 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->modifiedColumns[RewritingUrlTableMap::URL] = true; } + return $this; } // setUrl() /** * Set the value of [view] column. * - * @param string $v new value - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setView($v) { @@ -556,14 +565,15 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->modifiedColumns[RewritingUrlTableMap::VIEW] = true; } + return $this; } // setView() /** * Set the value of [view_id] column. * - * @param string $v new value - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setViewId($v) { @@ -576,14 +586,15 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->modifiedColumns[RewritingUrlTableMap::VIEW_ID] = true; } + return $this; } // setViewId() /** * Set the value of [view_locale] column. * - * @param string $v new value - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setViewLocale($v) { @@ -596,14 +607,15 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->modifiedColumns[RewritingUrlTableMap::VIEW_LOCALE] = true; } + return $this; } // setViewLocale() /** * Set the value of [redirected] column. * - * @param int $v new value - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setRedirected($v) { @@ -620,15 +632,16 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->aRewritingUrlRelatedByRedirected = null; } + return $this; } // setRedirected() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -640,15 +653,16 @@ abstract class RewritingUrl implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -660,6 +674,7 @@ abstract class RewritingUrl implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -769,10 +784,10 @@ abstract class RewritingUrl implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -812,7 +827,7 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see RewritingUrl::setDeleted() @@ -855,8 +870,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -917,8 +932,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -996,7 +1011,7 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1092,7 +1107,7 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1108,12 +1123,12 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1127,7 +1142,7 @@ abstract class RewritingUrl implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1169,12 +1184,12 @@ abstract class RewritingUrl implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1218,12 +1233,12 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1237,8 +1252,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1284,8 +1299,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1319,6 +1334,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->isColumnModified(RewritingUrlTableMap::REDIRECTED)) $criteria->add(RewritingUrlTableMap::REDIRECTED, $this->redirected); if ($this->isColumnModified(RewritingUrlTableMap::CREATED_AT)) $criteria->add(RewritingUrlTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(RewritingUrlTableMap::UPDATED_AT)) $criteria->add(RewritingUrlTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1340,7 +1356,7 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1350,7 +1366,7 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1364,6 +1380,7 @@ abstract class RewritingUrl implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1373,9 +1390,9 @@ abstract class RewritingUrl implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\RewritingUrl (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\RewritingUrl (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1421,8 +1438,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\RewritingUrl Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\RewritingUrl Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1438,8 +1455,8 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Declares an association between this object and a ChildRewritingUrl object. * - * @param ChildRewritingUrl $v - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param ChildRewritingUrl $v + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) * @throws PropelException */ public function setRewritingUrlRelatedByRedirected(ChildRewritingUrl $v = null) @@ -1458,6 +1475,7 @@ abstract class RewritingUrl implements ActiveRecordInterface $v->addRewritingUrlRelatedById($this); } + return $this; } @@ -1465,8 +1483,8 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Get the associated ChildRewritingUrl object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildRewritingUrl The associated ChildRewritingUrl object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildRewritingUrl The associated ChildRewritingUrl object. * @throws PropelException */ public function getRewritingUrlRelatedByRedirected(ConnectionInterface $con = null) @@ -1491,7 +1509,7 @@ abstract class RewritingUrl implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1533,8 +1551,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1556,8 +1574,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * If this ChildRewritingUrl is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildRewritingUrl[] List of ChildRewritingUrl objects * @throws PropelException */ @@ -1613,14 +1631,15 @@ abstract class RewritingUrl implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $rewritingUrlsRelatedById A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildRewritingUrl The current object (for fluent API support) + * @param Collection $rewritingUrlsRelatedById A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildRewritingUrl The current object (for fluent API support) */ public function setRewritingUrlsRelatedById(Collection $rewritingUrlsRelatedById, ConnectionInterface $con = null) { $rewritingUrlsRelatedByIdToDelete = $this->getRewritingUrlsRelatedById(new Criteria(), $con)->diff($rewritingUrlsRelatedById); + $this->rewritingUrlsRelatedByIdScheduledForDeletion = $rewritingUrlsRelatedByIdToDelete; foreach ($rewritingUrlsRelatedByIdToDelete as $rewritingUrlRelatedByIdRemoved) { @@ -1641,10 +1660,10 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Returns the number of related RewritingUrl objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related RewritingUrl objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related RewritingUrl objects. * @throws PropelException */ public function countRewritingUrlsRelatedById(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1676,8 +1695,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * Method called to associate a ChildRewritingUrl object to this object * through the ChildRewritingUrl foreign key attribute. * - * @param ChildRewritingUrl $l ChildRewritingUrl - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param ChildRewritingUrl $l ChildRewritingUrl + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function addRewritingUrlRelatedById(ChildRewritingUrl $l) { @@ -1704,7 +1723,7 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * @param RewritingUrlRelatedById $rewritingUrlRelatedById The rewritingUrlRelatedById object to remove. - * @return ChildRewritingUrl The current object (for fluent API support) + * @return ChildRewritingUrl The current object (for fluent API support) */ public function removeRewritingUrlRelatedById($rewritingUrlRelatedById) { @@ -1750,8 +1769,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1773,8 +1792,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * If this ChildRewritingUrl is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildRewritingArgument[] List of ChildRewritingArgument objects * @throws PropelException */ @@ -1830,14 +1849,15 @@ abstract class RewritingUrl implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $rewritingArguments A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildRewritingUrl The current object (for fluent API support) + * @param Collection $rewritingArguments A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildRewritingUrl The current object (for fluent API support) */ public function setRewritingArguments(Collection $rewritingArguments, ConnectionInterface $con = null) { $rewritingArgumentsToDelete = $this->getRewritingArguments(new Criteria(), $con)->diff($rewritingArguments); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1861,10 +1881,10 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Returns the number of related RewritingArgument objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related RewritingArgument objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related RewritingArgument objects. * @throws PropelException */ public function countRewritingArguments(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1896,8 +1916,8 @@ abstract class RewritingUrl implements ActiveRecordInterface * Method called to associate a ChildRewritingArgument object to this object * through the ChildRewritingArgument foreign key attribute. * - * @param ChildRewritingArgument $l ChildRewritingArgument - * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) + * @param ChildRewritingArgument $l ChildRewritingArgument + * @return \Thelia\Model\RewritingUrl The current object (for fluent API support) */ public function addRewritingArgument(ChildRewritingArgument $l) { @@ -1968,7 +1988,7 @@ abstract class RewritingUrl implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2005,7 +2025,7 @@ abstract class RewritingUrl implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildRewritingUrl The current object (for fluent API support) + * @return ChildRewritingUrl The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2090,6 +2110,7 @@ abstract class RewritingUrl implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/RewritingUrlQuery.php b/core/lib/Thelia/Model/Base/RewritingUrlQuery.php index 8f33539cc..9c6a0450b 100644 --- a/core/lib/Thelia/Model/Base/RewritingUrlQuery.php +++ b/core/lib/Thelia/Model/Base/RewritingUrlQuery.php @@ -83,9 +83,9 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\RewritingUrlQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\RewritingUrl', $modelAlias = null) { @@ -95,8 +95,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Returns a new ChildRewritingUrlQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildRewritingUrlQuery */ @@ -125,7 +125,7 @@ abstract class RewritingUrlQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildRewritingUrl|array|mixed the result, formatted by the current formatter @@ -156,10 +156,10 @@ abstract class RewritingUrlQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildRewritingUrl A model object, or null if the key is not found + * @return ChildRewritingUrl A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -186,8 +186,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildRewritingUrl|array|mixed the result, formatted by the current formatter */ @@ -207,8 +207,8 @@ abstract class RewritingUrlQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -229,24 +229,26 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(RewritingUrlTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(RewritingUrlTableMap::ID, $keys, Criteria::IN); } @@ -260,11 +262,11 @@ abstract class RewritingUrlQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -300,9 +302,9 @@ abstract class RewritingUrlQuery extends ModelCriteria * $query->filterByUrl('%fooValue%'); // WHERE url LIKE '%fooValue%' * * - * @param string $url The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $url The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -329,9 +331,9 @@ abstract class RewritingUrlQuery extends ModelCriteria * $query->filterByView('%fooValue%'); // WHERE view LIKE '%fooValue%' * * - * @param string $view The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $view The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -358,9 +360,9 @@ abstract class RewritingUrlQuery extends ModelCriteria * $query->filterByViewId('%fooValue%'); // WHERE view_id LIKE '%fooValue%' * * - * @param string $viewId The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $viewId The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -387,9 +389,9 @@ abstract class RewritingUrlQuery extends ModelCriteria * $query->filterByViewLocale('%fooValue%'); // WHERE view_locale LIKE '%fooValue%' * * - * @param string $viewLocale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $viewLocale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -419,11 +421,11 @@ abstract class RewritingUrlQuery extends ModelCriteria * * @see filterByRewritingUrlRelatedByRedirected() * - * @param mixed $redirected The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $redirected The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -460,13 +462,13 @@ abstract class RewritingUrlQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -503,13 +505,13 @@ abstract class RewritingUrlQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -540,7 +542,7 @@ abstract class RewritingUrlQuery extends ModelCriteria * Filter the query by a related \Thelia\Model\RewritingUrl object * * @param \Thelia\Model\RewritingUrl|ObjectCollection $rewritingUrl The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -564,8 +566,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the RewritingUrlRelatedByRedirected relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -598,11 +600,11 @@ abstract class RewritingUrlQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\RewritingUrlQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\RewritingUrlQuery A secondary query class using the current class as primary query */ public function useRewritingUrlRelatedByRedirectedQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -614,8 +616,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\RewritingUrl object * - * @param \Thelia\Model\RewritingUrl|ObjectCollection $rewritingUrl the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\RewritingUrl|ObjectCollection $rewritingUrl the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -637,8 +639,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the RewritingUrlRelatedById relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -671,11 +673,11 @@ abstract class RewritingUrlQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\RewritingUrlQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\RewritingUrlQuery A secondary query class using the current class as primary query */ public function useRewritingUrlRelatedByIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -687,8 +689,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\RewritingArgument object * - * @param \Thelia\Model\RewritingArgument|ObjectCollection $rewritingArgument the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\RewritingArgument|ObjectCollection $rewritingArgument the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -710,8 +712,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the RewritingArgument relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -744,11 +746,11 @@ abstract class RewritingUrlQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\RewritingArgumentQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\RewritingArgumentQuery A secondary query class using the current class as primary query */ public function useRewritingArgumentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -760,7 +762,7 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildRewritingUrl $rewritingUrl Object to remove from the list of results + * @param ChildRewritingUrl $rewritingUrl Object to remove from the list of results * * @return ChildRewritingUrlQuery The current query, for fluid interface */ @@ -776,8 +778,8 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Deletes all rows from the rewriting_url table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -808,13 +810,13 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildRewritingUrl or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildRewritingUrl object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildRewritingUrl object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -834,6 +836,7 @@ abstract class RewritingUrlQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + RewritingUrlTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -852,9 +855,9 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildRewritingUrlQuery The current query, for fluid interface + * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -864,9 +867,9 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildRewritingUrlQuery The current query, for fluid interface + * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -876,7 +879,7 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildRewritingUrlQuery The current query, for fluid interface + * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -886,7 +889,7 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildRewritingUrlQuery The current query, for fluid interface + * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -896,7 +899,7 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildRewritingUrlQuery The current query, for fluid interface + * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -906,7 +909,7 @@ abstract class RewritingUrlQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildRewritingUrlQuery The current query, for fluid interface + * @return ChildRewritingUrlQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/Tax.php b/core/lib/Thelia/Model/Base/Tax.php index e6603abda..d2d3ea76d 100644 --- a/core/lib/Thelia/Model/Base/Tax.php +++ b/core/lib/Thelia/Model/Base/Tax.php @@ -32,6 +32,7 @@ abstract class Tax implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\TaxTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -343,9 +344,9 @@ abstract class Tax implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Tax The current object, for fluid interface */ @@ -395,30 +396,33 @@ abstract class Tax implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [type] column value. * - * @return string + * @return string */ public function getType() { + return $this->type; } /** * Get the [serialized_requirements] column value. * - * @return string + * @return string */ public function getSerializedRequirements() { + return $this->serialized_requirements; } @@ -426,8 +430,8 @@ abstract class Tax implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -446,8 +450,8 @@ abstract class Tax implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -465,8 +469,8 @@ abstract class Tax implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Tax The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Tax The current object (for fluent API support) */ public function setId($v) { @@ -479,14 +483,15 @@ abstract class Tax implements ActiveRecordInterface $this->modifiedColumns[TaxTableMap::ID] = true; } + return $this; } // setId() /** * Set the value of [type] column. * - * @param string $v new value - * @return \Thelia\Model\Tax The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Tax The current object (for fluent API support) */ public function setType($v) { @@ -499,14 +504,15 @@ abstract class Tax implements ActiveRecordInterface $this->modifiedColumns[TaxTableMap::TYPE] = true; } + return $this; } // setType() /** * Set the value of [serialized_requirements] column. * - * @param string $v new value - * @return \Thelia\Model\Tax The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\Tax The current object (for fluent API support) */ public function setSerializedRequirements($v) { @@ -519,15 +525,16 @@ abstract class Tax implements ActiveRecordInterface $this->modifiedColumns[TaxTableMap::SERIALIZED_REQUIREMENTS] = true; } + return $this; } // setSerializedRequirements() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Tax The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Tax The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -539,15 +546,16 @@ abstract class Tax implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Tax The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Tax The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -559,6 +567,7 @@ abstract class Tax implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -656,10 +665,10 @@ abstract class Tax implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -698,7 +707,7 @@ abstract class Tax implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Tax::setDeleted() @@ -741,8 +750,8 @@ abstract class Tax implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -803,8 +812,8 @@ abstract class Tax implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -869,7 +878,7 @@ abstract class Tax implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -947,7 +956,7 @@ abstract class Tax implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -963,12 +972,12 @@ abstract class Tax implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -982,7 +991,7 @@ abstract class Tax implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1015,12 +1024,12 @@ abstract class Tax implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1058,12 +1067,12 @@ abstract class Tax implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1077,8 +1086,8 @@ abstract class Tax implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1115,8 +1124,8 @@ abstract class Tax implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1144,6 +1153,7 @@ abstract class Tax implements ActiveRecordInterface if ($this->isColumnModified(TaxTableMap::SERIALIZED_REQUIREMENTS)) $criteria->add(TaxTableMap::SERIALIZED_REQUIREMENTS, $this->serialized_requirements); if ($this->isColumnModified(TaxTableMap::CREATED_AT)) $criteria->add(TaxTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(TaxTableMap::UPDATED_AT)) $criteria->add(TaxTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1165,7 +1175,7 @@ abstract class Tax implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1175,7 +1185,7 @@ abstract class Tax implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1189,6 +1199,7 @@ abstract class Tax implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1198,9 +1209,9 @@ abstract class Tax implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Tax (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Tax (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1243,8 +1254,8 @@ abstract class Tax implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Tax Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Tax Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1263,7 +1274,7 @@ abstract class Tax implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1305,8 +1316,8 @@ abstract class Tax implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1328,8 +1339,8 @@ abstract class Tax implements ActiveRecordInterface * If this ChildTax is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects * @throws PropelException */ @@ -1385,14 +1396,15 @@ abstract class Tax implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $taxRuleCountries A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTax The current object (for fluent API support) + * @param Collection $taxRuleCountries A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTax The current object (for fluent API support) */ public function setTaxRuleCountries(Collection $taxRuleCountries, ConnectionInterface $con = null) { $taxRuleCountriesToDelete = $this->getTaxRuleCountries(new Criteria(), $con)->diff($taxRuleCountries); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1416,10 +1428,10 @@ abstract class Tax implements ActiveRecordInterface /** * Returns the number of related TaxRuleCountry objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related TaxRuleCountry objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related TaxRuleCountry objects. * @throws PropelException */ public function countTaxRuleCountries(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1451,8 +1463,8 @@ abstract class Tax implements ActiveRecordInterface * Method called to associate a ChildTaxRuleCountry object to this object * through the ChildTaxRuleCountry foreign key attribute. * - * @param ChildTaxRuleCountry $l ChildTaxRuleCountry - * @return \Thelia\Model\Tax The current object (for fluent API support) + * @param ChildTaxRuleCountry $l ChildTaxRuleCountry + * @return \Thelia\Model\Tax The current object (for fluent API support) */ public function addTaxRuleCountry(ChildTaxRuleCountry $l) { @@ -1479,7 +1491,7 @@ abstract class Tax implements ActiveRecordInterface /** * @param TaxRuleCountry $taxRuleCountry The taxRuleCountry object to remove. - * @return ChildTax The current object (for fluent API support) + * @return ChildTax The current object (for fluent API support) */ public function removeTaxRuleCountry($taxRuleCountry) { @@ -1496,6 +1508,7 @@ abstract class Tax implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1507,9 +1520,9 @@ abstract class Tax implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Tax. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects */ public function getTaxRuleCountriesJoinTaxRule($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1520,6 +1533,7 @@ abstract class Tax implements ActiveRecordInterface return $this->getTaxRuleCountries($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1531,9 +1545,9 @@ abstract class Tax implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Tax. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects */ public function getTaxRuleCountriesJoinCountry($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1573,8 +1587,8 @@ abstract class Tax implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1596,8 +1610,8 @@ abstract class Tax implements ActiveRecordInterface * If this ChildTax is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildTaxI18n[] List of ChildTaxI18n objects * @throws PropelException */ @@ -1653,14 +1667,15 @@ abstract class Tax implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $taxI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTax The current object (for fluent API support) + * @param Collection $taxI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTax The current object (for fluent API support) */ public function setTaxI18ns(Collection $taxI18ns, ConnectionInterface $con = null) { $taxI18nsToDelete = $this->getTaxI18ns(new Criteria(), $con)->diff($taxI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1684,10 +1699,10 @@ abstract class Tax implements ActiveRecordInterface /** * Returns the number of related TaxI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related TaxI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related TaxI18n objects. * @throws PropelException */ public function countTaxI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1719,8 +1734,8 @@ abstract class Tax implements ActiveRecordInterface * Method called to associate a ChildTaxI18n object to this object * through the ChildTaxI18n foreign key attribute. * - * @param ChildTaxI18n $l ChildTaxI18n - * @return \Thelia\Model\Tax The current object (for fluent API support) + * @param ChildTaxI18n $l ChildTaxI18n + * @return \Thelia\Model\Tax The current object (for fluent API support) */ public function addTaxI18n(ChildTaxI18n $l) { @@ -1750,7 +1765,7 @@ abstract class Tax implements ActiveRecordInterface } /** - * @param TaxI18n $taxI18n The taxI18n object to remove. + * @param TaxI18n $taxI18n The taxI18n object to remove. * @return ChildTax The current object (for fluent API support) */ public function removeTaxI18n($taxI18n) @@ -1792,7 +1807,7 @@ abstract class Tax implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1832,7 +1847,7 @@ abstract class Tax implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildTax The current object (for fluent API support) + * @return ChildTax The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -1846,9 +1861,9 @@ abstract class Tax implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildTax The current object (for fluent API support) + * @return ChildTax The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -1860,7 +1875,7 @@ abstract class Tax implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -1870,8 +1885,8 @@ abstract class Tax implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildTaxI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -1904,10 +1919,10 @@ abstract class Tax implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildTax The current object (for fluent API support) + * @return ChildTax The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -1932,7 +1947,7 @@ abstract class Tax implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildTaxI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -1940,6 +1955,7 @@ abstract class Tax implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -1950,6 +1966,7 @@ abstract class Tax implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -1962,6 +1979,7 @@ abstract class Tax implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -1972,6 +1990,7 @@ abstract class Tax implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2060,6 +2079,7 @@ abstract class Tax implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/TaxI18n.php b/core/lib/Thelia/Model/Base/TaxI18n.php index c48090d85..611394f06 100644 --- a/core/lib/Thelia/Model/Base/TaxI18n.php +++ b/core/lib/Thelia/Model/Base/TaxI18n.php @@ -26,6 +26,7 @@ abstract class TaxI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\TaxI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -312,9 +313,9 @@ abstract class TaxI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return TaxI18n The current object, for fluid interface */ @@ -364,48 +365,52 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\TaxI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TaxI18n The current object (for fluent API support) */ public function setId($v) { @@ -422,14 +427,15 @@ abstract class TaxI18n implements ActiveRecordInterface $this->aTax = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\TaxI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TaxI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -442,14 +448,15 @@ abstract class TaxI18n implements ActiveRecordInterface $this->modifiedColumns[TaxI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\TaxI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TaxI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -462,14 +469,15 @@ abstract class TaxI18n implements ActiveRecordInterface $this->modifiedColumns[TaxI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\TaxI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TaxI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -482,6 +490,7 @@ abstract class TaxI18n implements ActiveRecordInterface $this->modifiedColumns[TaxI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() @@ -525,6 +534,7 @@ abstract class TaxI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : TaxI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -576,10 +586,10 @@ abstract class TaxI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -615,7 +625,7 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see TaxI18n::setDeleted() @@ -658,8 +668,8 @@ abstract class TaxI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -709,8 +719,8 @@ abstract class TaxI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -753,7 +763,7 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -814,7 +824,7 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -830,12 +840,12 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -849,7 +859,7 @@ abstract class TaxI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -879,12 +889,12 @@ abstract class TaxI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -918,12 +928,12 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -937,8 +947,8 @@ abstract class TaxI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -972,8 +982,8 @@ abstract class TaxI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -999,6 +1009,7 @@ abstract class TaxI18n implements ActiveRecordInterface if ($this->isColumnModified(TaxI18nTableMap::LOCALE)) $criteria->add(TaxI18nTableMap::LOCALE, $this->locale); if ($this->isColumnModified(TaxI18nTableMap::TITLE)) $criteria->add(TaxI18nTableMap::TITLE, $this->title); if ($this->isColumnModified(TaxI18nTableMap::DESCRIPTION)) $criteria->add(TaxI18nTableMap::DESCRIPTION, $this->description); + return $criteria; } @@ -1036,7 +1047,7 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1051,6 +1062,7 @@ abstract class TaxI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1060,9 +1072,9 @@ abstract class TaxI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\TaxI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\TaxI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1084,8 +1096,8 @@ abstract class TaxI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\TaxI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\TaxI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1101,8 +1113,8 @@ abstract class TaxI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildTax object. * - * @param ChildTax $v - * @return \Thelia\Model\TaxI18n The current object (for fluent API support) + * @param ChildTax $v + * @return \Thelia\Model\TaxI18n The current object (for fluent API support) * @throws PropelException */ public function setTax(ChildTax $v = null) @@ -1121,14 +1133,16 @@ abstract class TaxI18n implements ActiveRecordInterface $v->addTaxI18n($this); } + return $this; } + /** * Get the associated ChildTax object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTax The associated ChildTax object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTax The associated ChildTax object. * @throws PropelException */ public function getTax(ConnectionInterface $con = null) @@ -1171,7 +1185,7 @@ abstract class TaxI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/TaxI18nQuery.php b/core/lib/Thelia/Model/Base/TaxI18nQuery.php index 80c34d0a1..7514a394a 100644 --- a/core/lib/Thelia/Model/Base/TaxI18nQuery.php +++ b/core/lib/Thelia/Model/Base/TaxI18nQuery.php @@ -59,9 +59,9 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\TaxI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\TaxI18n', $modelAlias = null) { @@ -71,8 +71,8 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Returns a new ChildTaxI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildTaxI18nQuery */ @@ -132,10 +132,10 @@ abstract class TaxI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildTaxI18n A model object, or null if the key is not found + * @return ChildTaxI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -163,8 +163,8 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildTaxI18n|array|mixed the result, formatted by the current formatter */ @@ -184,8 +184,8 @@ abstract class TaxI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -206,7 +206,7 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -221,7 +221,7 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -252,11 +252,11 @@ abstract class TaxI18nQuery extends ModelCriteria * * @see filterByTax() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -292,9 +292,9 @@ abstract class TaxI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -321,9 +321,9 @@ abstract class TaxI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -350,9 +350,9 @@ abstract class TaxI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -373,8 +373,8 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Tax object * - * @param \Thelia\Model\Tax|ObjectCollection $tax The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Tax|ObjectCollection $tax The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -398,8 +398,8 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Tax relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -432,11 +432,11 @@ abstract class TaxI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxQuery A secondary query class using the current class as primary query */ public function useTaxQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -448,7 +448,7 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildTaxI18n $taxI18n Object to remove from the list of results + * @param ChildTaxI18n $taxI18n Object to remove from the list of results * * @return ChildTaxI18nQuery The current query, for fluid interface */ @@ -466,8 +466,8 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Deletes all rows from the tax_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -498,13 +498,13 @@ abstract class TaxI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildTaxI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildTaxI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildTaxI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -524,6 +524,7 @@ abstract class TaxI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + TaxI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/TaxQuery.php b/core/lib/Thelia/Model/Base/TaxQuery.php index b30f5f4e5..67fc3a3ec 100644 --- a/core/lib/Thelia/Model/Base/TaxQuery.php +++ b/core/lib/Thelia/Model/Base/TaxQuery.php @@ -68,9 +68,9 @@ abstract class TaxQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\TaxQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Tax', $modelAlias = null) { @@ -80,8 +80,8 @@ abstract class TaxQuery extends ModelCriteria /** * Returns a new ChildTaxQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildTaxQuery */ @@ -110,7 +110,7 @@ abstract class TaxQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildTax|array|mixed the result, formatted by the current formatter @@ -141,10 +141,10 @@ abstract class TaxQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildTax A model object, or null if the key is not found + * @return ChildTax A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class TaxQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildTax|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class TaxQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,24 +214,26 @@ abstract class TaxQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildTaxQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(TaxTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildTaxQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(TaxTableMap::ID, $keys, Criteria::IN); } @@ -245,11 +247,11 @@ abstract class TaxQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxQuery The current query, for fluid interface */ @@ -285,9 +287,9 @@ abstract class TaxQuery extends ModelCriteria * $query->filterByType('%fooValue%'); // WHERE type LIKE '%fooValue%' * * - * @param string $type The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $type The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxQuery The current query, for fluid interface */ @@ -314,9 +316,9 @@ abstract class TaxQuery extends ModelCriteria * $query->filterBySerializedRequirements('%fooValue%'); // WHERE serialized_requirements LIKE '%fooValue%' * * - * @param string $serializedRequirements The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $serializedRequirements The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxQuery The current query, for fluid interface */ @@ -344,13 +346,13 @@ abstract class TaxQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxQuery The current query, for fluid interface */ @@ -387,13 +389,13 @@ abstract class TaxQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxQuery The current query, for fluid interface */ @@ -423,8 +425,8 @@ abstract class TaxQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxRuleCountry object * - * @param \Thelia\Model\TaxRuleCountry|ObjectCollection $taxRuleCountry the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxRuleCountry|ObjectCollection $taxRuleCountry the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxQuery The current query, for fluid interface */ @@ -446,8 +448,8 @@ abstract class TaxQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxRuleCountry relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxQuery The current query, for fluid interface */ @@ -480,11 +482,11 @@ abstract class TaxQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxRuleCountryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxRuleCountryQuery A secondary query class using the current class as primary query */ public function useTaxRuleCountryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -496,8 +498,8 @@ abstract class TaxQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxI18n object * - * @param \Thelia\Model\TaxI18n|ObjectCollection $taxI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxI18n|ObjectCollection $taxI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxQuery The current query, for fluid interface */ @@ -519,8 +521,8 @@ abstract class TaxQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxQuery The current query, for fluid interface */ @@ -553,11 +555,11 @@ abstract class TaxQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxI18nQuery A secondary query class using the current class as primary query */ public function useTaxI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -569,7 +571,7 @@ abstract class TaxQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildTax $tax Object to remove from the list of results + * @param ChildTax $tax Object to remove from the list of results * * @return ChildTaxQuery The current query, for fluid interface */ @@ -585,8 +587,8 @@ abstract class TaxQuery extends ModelCriteria /** * Deletes all rows from the tax table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -617,13 +619,13 @@ abstract class TaxQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildTax or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildTax object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildTax object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -643,6 +645,7 @@ abstract class TaxQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + TaxTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -661,9 +664,9 @@ abstract class TaxQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -673,9 +676,9 @@ abstract class TaxQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -685,7 +688,7 @@ abstract class TaxQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -695,7 +698,7 @@ abstract class TaxQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -705,7 +708,7 @@ abstract class TaxQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -715,7 +718,7 @@ abstract class TaxQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -727,11 +730,11 @@ abstract class TaxQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -746,10 +749,10 @@ abstract class TaxQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTaxQuery The current query, for fluid interface + * @return ChildTaxQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -766,11 +769,11 @@ abstract class TaxQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTaxI18nQuery A secondary query class using the current class as primary query + * @return ChildTaxI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/TaxRule.php b/core/lib/Thelia/Model/Base/TaxRule.php index 1dbe9180b..971a8192f 100644 --- a/core/lib/Thelia/Model/Base/TaxRule.php +++ b/core/lib/Thelia/Model/Base/TaxRule.php @@ -34,6 +34,7 @@ abstract class TaxRule implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\TaxRuleTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -365,9 +366,9 @@ abstract class TaxRule implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return TaxRule The current object, for fluid interface */ @@ -417,20 +418,22 @@ abstract class TaxRule implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [is_default] column value. * - * @return boolean + * @return boolean */ public function getIsDefault() { + return $this->is_default; } @@ -438,8 +441,8 @@ abstract class TaxRule implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -458,8 +461,8 @@ abstract class TaxRule implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -477,8 +480,8 @@ abstract class TaxRule implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\TaxRule The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TaxRule The current object (for fluent API support) */ public function setId($v) { @@ -491,6 +494,7 @@ abstract class TaxRule implements ActiveRecordInterface $this->modifiedColumns[TaxRuleTableMap::ID] = true; } + return $this; } // setId() @@ -501,8 +505,8 @@ abstract class TaxRule implements ActiveRecordInterface * * 0, '0', 'false', 'off', and 'no' are converted to boolean false * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). * - * @param boolean|integer|string $v The new value - * @return \Thelia\Model\TaxRule The current object (for fluent API support) + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\TaxRule The current object (for fluent API support) */ public function setIsDefault($v) { @@ -519,15 +523,16 @@ abstract class TaxRule implements ActiveRecordInterface $this->modifiedColumns[TaxRuleTableMap::IS_DEFAULT] = true; } + return $this; } // setIsDefault() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\TaxRule The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\TaxRule The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -539,15 +544,16 @@ abstract class TaxRule implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\TaxRule The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\TaxRule The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -559,6 +565,7 @@ abstract class TaxRule implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -602,6 +609,7 @@ abstract class TaxRule implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : TaxRuleTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -656,10 +664,10 @@ abstract class TaxRule implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -700,7 +708,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see TaxRule::setDeleted() @@ -743,8 +751,8 @@ abstract class TaxRule implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -805,8 +813,8 @@ abstract class TaxRule implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -889,7 +897,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -961,7 +969,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -977,12 +985,12 @@ abstract class TaxRule implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -996,7 +1004,7 @@ abstract class TaxRule implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1026,12 +1034,12 @@ abstract class TaxRule implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1071,12 +1079,12 @@ abstract class TaxRule implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1090,8 +1098,8 @@ abstract class TaxRule implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1125,8 +1133,8 @@ abstract class TaxRule implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1152,6 +1160,7 @@ abstract class TaxRule implements ActiveRecordInterface if ($this->isColumnModified(TaxRuleTableMap::IS_DEFAULT)) $criteria->add(TaxRuleTableMap::IS_DEFAULT, $this->is_default); if ($this->isColumnModified(TaxRuleTableMap::CREATED_AT)) $criteria->add(TaxRuleTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(TaxRuleTableMap::UPDATED_AT)) $criteria->add(TaxRuleTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1173,7 +1182,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1183,7 +1192,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1197,6 +1206,7 @@ abstract class TaxRule implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1206,9 +1216,9 @@ abstract class TaxRule implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\TaxRule (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\TaxRule (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1256,8 +1266,8 @@ abstract class TaxRule implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\TaxRule Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\TaxRule Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1276,7 +1286,7 @@ abstract class TaxRule implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1321,8 +1331,8 @@ abstract class TaxRule implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1344,8 +1354,8 @@ abstract class TaxRule implements ActiveRecordInterface * If this ChildTaxRule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProduct[] List of ChildProduct objects * @throws PropelException */ @@ -1401,14 +1411,15 @@ abstract class TaxRule implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $products A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTaxRule The current object (for fluent API support) + * @param Collection $products A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTaxRule The current object (for fluent API support) */ public function setProducts(Collection $products, ConnectionInterface $con = null) { $productsToDelete = $this->getProducts(new Criteria(), $con)->diff($products); + $this->productsScheduledForDeletion = $productsToDelete; foreach ($productsToDelete as $productRemoved) { @@ -1429,10 +1440,10 @@ abstract class TaxRule implements ActiveRecordInterface /** * Returns the number of related Product objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Product objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Product objects. * @throws PropelException */ public function countProducts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1464,8 +1475,8 @@ abstract class TaxRule implements ActiveRecordInterface * Method called to associate a ChildProduct object to this object * through the ChildProduct foreign key attribute. * - * @param ChildProduct $l ChildProduct - * @return \Thelia\Model\TaxRule The current object (for fluent API support) + * @param ChildProduct $l ChildProduct + * @return \Thelia\Model\TaxRule The current object (for fluent API support) */ public function addProduct(ChildProduct $l) { @@ -1491,7 +1502,7 @@ abstract class TaxRule implements ActiveRecordInterface } /** - * @param Product $product The product object to remove. + * @param Product $product The product object to remove. * @return ChildTaxRule The current object (for fluent API support) */ public function removeProduct($product) @@ -1509,6 +1520,7 @@ abstract class TaxRule implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1520,9 +1532,9 @@ abstract class TaxRule implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in TaxRule. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProduct[] List of ChildProduct objects */ public function getProductsJoinTemplate($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1562,8 +1574,8 @@ abstract class TaxRule implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1585,8 +1597,8 @@ abstract class TaxRule implements ActiveRecordInterface * If this ChildTaxRule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects * @throws PropelException */ @@ -1642,14 +1654,15 @@ abstract class TaxRule implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $taxRuleCountries A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTaxRule The current object (for fluent API support) + * @param Collection $taxRuleCountries A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTaxRule The current object (for fluent API support) */ public function setTaxRuleCountries(Collection $taxRuleCountries, ConnectionInterface $con = null) { $taxRuleCountriesToDelete = $this->getTaxRuleCountries(new Criteria(), $con)->diff($taxRuleCountries); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1673,10 +1686,10 @@ abstract class TaxRule implements ActiveRecordInterface /** * Returns the number of related TaxRuleCountry objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related TaxRuleCountry objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related TaxRuleCountry objects. * @throws PropelException */ public function countTaxRuleCountries(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1708,8 +1721,8 @@ abstract class TaxRule implements ActiveRecordInterface * Method called to associate a ChildTaxRuleCountry object to this object * through the ChildTaxRuleCountry foreign key attribute. * - * @param ChildTaxRuleCountry $l ChildTaxRuleCountry - * @return \Thelia\Model\TaxRule The current object (for fluent API support) + * @param ChildTaxRuleCountry $l ChildTaxRuleCountry + * @return \Thelia\Model\TaxRule The current object (for fluent API support) */ public function addTaxRuleCountry(ChildTaxRuleCountry $l) { @@ -1736,7 +1749,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * @param TaxRuleCountry $taxRuleCountry The taxRuleCountry object to remove. - * @return ChildTaxRule The current object (for fluent API support) + * @return ChildTaxRule The current object (for fluent API support) */ public function removeTaxRuleCountry($taxRuleCountry) { @@ -1753,6 +1766,7 @@ abstract class TaxRule implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1764,9 +1778,9 @@ abstract class TaxRule implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in TaxRule. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects */ public function getTaxRuleCountriesJoinTax($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1777,6 +1791,7 @@ abstract class TaxRule implements ActiveRecordInterface return $this->getTaxRuleCountries($query, $con); } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1788,9 +1803,9 @@ abstract class TaxRule implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in TaxRule. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildTaxRuleCountry[] List of ChildTaxRuleCountry objects */ public function getTaxRuleCountriesJoinCountry($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1830,8 +1845,8 @@ abstract class TaxRule implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1853,8 +1868,8 @@ abstract class TaxRule implements ActiveRecordInterface * If this ChildTaxRule is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildTaxRuleI18n[] List of ChildTaxRuleI18n objects * @throws PropelException */ @@ -1910,14 +1925,15 @@ abstract class TaxRule implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $taxRuleI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTaxRule The current object (for fluent API support) + * @param Collection $taxRuleI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTaxRule The current object (for fluent API support) */ public function setTaxRuleI18ns(Collection $taxRuleI18ns, ConnectionInterface $con = null) { $taxRuleI18nsToDelete = $this->getTaxRuleI18ns(new Criteria(), $con)->diff($taxRuleI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -1941,10 +1957,10 @@ abstract class TaxRule implements ActiveRecordInterface /** * Returns the number of related TaxRuleI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related TaxRuleI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related TaxRuleI18n objects. * @throws PropelException */ public function countTaxRuleI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1976,8 +1992,8 @@ abstract class TaxRule implements ActiveRecordInterface * Method called to associate a ChildTaxRuleI18n object to this object * through the ChildTaxRuleI18n foreign key attribute. * - * @param ChildTaxRuleI18n $l ChildTaxRuleI18n - * @return \Thelia\Model\TaxRule The current object (for fluent API support) + * @param ChildTaxRuleI18n $l ChildTaxRuleI18n + * @return \Thelia\Model\TaxRule The current object (for fluent API support) */ public function addTaxRuleI18n(ChildTaxRuleI18n $l) { @@ -2007,7 +2023,7 @@ abstract class TaxRule implements ActiveRecordInterface } /** - * @param TaxRuleI18n $taxRuleI18n The taxRuleI18n object to remove. + * @param TaxRuleI18n $taxRuleI18n The taxRuleI18n object to remove. * @return ChildTaxRule The current object (for fluent API support) */ public function removeTaxRuleI18n($taxRuleI18n) @@ -2049,7 +2065,7 @@ abstract class TaxRule implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2095,7 +2111,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildTaxRule The current object (for fluent API support) + * @return ChildTaxRule The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2109,9 +2125,9 @@ abstract class TaxRule implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildTaxRule The current object (for fluent API support) + * @return ChildTaxRule The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2123,7 +2139,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2133,8 +2149,8 @@ abstract class TaxRule implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildTaxRuleI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2167,10 +2183,10 @@ abstract class TaxRule implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildTaxRule The current object (for fluent API support) + * @return ChildTaxRule The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2195,7 +2211,7 @@ abstract class TaxRule implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildTaxRuleI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2203,6 +2219,7 @@ abstract class TaxRule implements ActiveRecordInterface return $this->getTranslation($this->getLocale(), $con); } + /** * Get the [title] column value. * @@ -2213,6 +2230,7 @@ abstract class TaxRule implements ActiveRecordInterface return $this->getCurrentTranslation()->getTitle(); } + /** * Set the value of [title] column. * @@ -2225,6 +2243,7 @@ abstract class TaxRule implements ActiveRecordInterface return $this; } + /** * Get the [description] column value. * @@ -2235,6 +2254,7 @@ abstract class TaxRule implements ActiveRecordInterface return $this->getCurrentTranslation()->getDescription(); } + /** * Set the value of [description] column. * @@ -2323,6 +2343,7 @@ abstract class TaxRule implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/TaxRuleCountry.php b/core/lib/Thelia/Model/Base/TaxRuleCountry.php index d6d0298e8..1cf976873 100644 --- a/core/lib/Thelia/Model/Base/TaxRuleCountry.php +++ b/core/lib/Thelia/Model/Base/TaxRuleCountry.php @@ -33,6 +33,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\TaxRuleCountryTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -327,9 +328,9 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return TaxRuleCountry The current object, for fluid interface */ @@ -379,40 +380,44 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Get the [tax_rule_id] column value. * - * @return int + * @return int */ public function getTaxRuleId() { + return $this->tax_rule_id; } /** * Get the [country_id] column value. * - * @return int + * @return int */ public function getCountryId() { + return $this->country_id; } /** * Get the [tax_id] column value. * - * @return int + * @return int */ public function getTaxId() { + return $this->tax_id; } /** * Get the [position] column value. * - * @return int + * @return int */ public function getPosition() { + return $this->position; } @@ -420,8 +425,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -440,8 +445,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -459,8 +464,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Set the value of [tax_rule_id] column. * - * @param int $v new value - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) */ public function setTaxRuleId($v) { @@ -477,14 +482,15 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $this->aTaxRule = null; } + return $this; } // setTaxRuleId() /** * Set the value of [country_id] column. * - * @param int $v new value - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) */ public function setCountryId($v) { @@ -501,14 +507,15 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $this->aCountry = null; } + return $this; } // setCountryId() /** * Set the value of [tax_id] column. * - * @param int $v new value - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) */ public function setTaxId($v) { @@ -525,14 +532,15 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $this->aTax = null; } + return $this; } // setTaxId() /** * Set the value of [position] column. * - * @param int $v new value - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) */ public function setPosition($v) { @@ -545,15 +553,16 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $this->modifiedColumns[TaxRuleCountryTableMap::POSITION] = true; } + return $this; } // setPosition() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -565,15 +574,16 @@ abstract class TaxRuleCountry implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -585,6 +595,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -694,10 +705,10 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -735,7 +746,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see TaxRuleCountry::setDeleted() @@ -778,8 +789,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -840,8 +851,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -898,7 +909,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -908,6 +919,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; + // check the columns in natural order for more readable SQL queries if ($this->isColumnModified(TaxRuleCountryTableMap::TAX_RULE_ID)) { $modifiedColumns[':p' . $index++] = '`TAX_RULE_ID`'; @@ -970,7 +982,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -986,12 +998,12 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1005,7 +1017,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1041,12 +1053,12 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1088,12 +1100,12 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1107,8 +1119,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1148,8 +1160,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1179,6 +1191,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface if ($this->isColumnModified(TaxRuleCountryTableMap::POSITION)) $criteria->add(TaxRuleCountryTableMap::POSITION, $this->position); if ($this->isColumnModified(TaxRuleCountryTableMap::CREATED_AT)) $criteria->add(TaxRuleCountryTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(TaxRuleCountryTableMap::UPDATED_AT)) $criteria->add(TaxRuleCountryTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1218,7 +1231,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1234,6 +1247,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getTaxRuleId()) && (null === $this->getCountryId()) && (null === $this->getTaxId()); } @@ -1243,9 +1257,9 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\TaxRuleCountry (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\TaxRuleCountry (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1269,8 +1283,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\TaxRuleCountry Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\TaxRuleCountry Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1286,8 +1300,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Declares an association between this object and a ChildTax object. * - * @param ChildTax $v - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param ChildTax $v + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) * @throws PropelException */ public function setTax(ChildTax $v = null) @@ -1306,6 +1320,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $v->addTaxRuleCountry($this); } + return $this; } @@ -1313,8 +1328,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Get the associated ChildTax object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTax The associated ChildTax object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTax The associated ChildTax object. * @throws PropelException */ public function getTax(ConnectionInterface $con = null) @@ -1336,8 +1351,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Declares an association between this object and a ChildTaxRule object. * - * @param ChildTaxRule $v - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param ChildTaxRule $v + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) * @throws PropelException */ public function setTaxRule(ChildTaxRule $v = null) @@ -1356,6 +1371,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $v->addTaxRuleCountry($this); } + return $this; } @@ -1363,8 +1379,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Get the associated ChildTaxRule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTaxRule The associated ChildTaxRule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTaxRule The associated ChildTaxRule object. * @throws PropelException */ public function getTaxRule(ConnectionInterface $con = null) @@ -1386,8 +1402,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Declares an association between this object and a ChildCountry object. * - * @param ChildCountry $v - * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) + * @param ChildCountry $v + * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) * @throws PropelException */ public function setCountry(ChildCountry $v = null) @@ -1406,6 +1422,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface $v->addTaxRuleCountry($this); } + return $this; } @@ -1413,8 +1430,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Get the associated ChildCountry object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildCountry The associated ChildCountry object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCountry The associated ChildCountry object. * @throws PropelException */ public function getCountry(ConnectionInterface $con = null) @@ -1458,7 +1475,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -1485,7 +1502,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildTaxRuleCountry The current object (for fluent API support) + * @return ChildTaxRuleCountry The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { diff --git a/core/lib/Thelia/Model/Base/TaxRuleCountryQuery.php b/core/lib/Thelia/Model/Base/TaxRuleCountryQuery.php index eec8d4d77..02f5079af 100644 --- a/core/lib/Thelia/Model/Base/TaxRuleCountryQuery.php +++ b/core/lib/Thelia/Model/Base/TaxRuleCountryQuery.php @@ -75,9 +75,9 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\TaxRuleCountryQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\TaxRuleCountry', $modelAlias = null) { @@ -87,8 +87,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Returns a new ChildTaxRuleCountryQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildTaxRuleCountryQuery */ @@ -148,10 +148,10 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildTaxRuleCountry A model object, or null if the key is not found + * @return ChildTaxRuleCountry A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -180,8 +180,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildTaxRuleCountry|array|mixed the result, formatted by the current formatter */ @@ -201,8 +201,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -223,7 +223,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -239,7 +239,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -272,11 +272,11 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * * @see filterByTaxRule() * - * @param mixed $taxRuleId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $taxRuleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -315,11 +315,11 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * * @see filterByCountry() * - * @param mixed $countryId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $countryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -358,11 +358,11 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * * @see filterByTax() * - * @param mixed $taxId The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $taxId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -399,11 +399,11 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 * * - * @param mixed $position The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -440,13 +440,13 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -483,13 +483,13 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -519,8 +519,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Tax object * - * @param \Thelia\Model\Tax|ObjectCollection $tax The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Tax|ObjectCollection $tax The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -544,8 +544,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Tax relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -578,11 +578,11 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxQuery A secondary query class using the current class as primary query */ public function useTaxQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -594,8 +594,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxRule object * - * @param \Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -619,8 +619,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxRule relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -653,11 +653,11 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxRuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxRuleQuery A secondary query class using the current class as primary query */ public function useTaxRuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -669,8 +669,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Country object * - * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -694,8 +694,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Country relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -728,11 +728,11 @@ abstract class TaxRuleCountryQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query */ public function useCountryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -744,7 +744,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildTaxRuleCountry $taxRuleCountry Object to remove from the list of results + * @param ChildTaxRuleCountry $taxRuleCountry Object to remove from the list of results * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ @@ -763,8 +763,8 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Deletes all rows from the tax_rule_country table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -795,13 +795,13 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildTaxRuleCountry or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildTaxRuleCountry object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildTaxRuleCountry object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -821,6 +821,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + TaxRuleCountryTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -839,9 +840,9 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildTaxRuleCountryQuery The current query, for fluid interface + * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -851,9 +852,9 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildTaxRuleCountryQuery The current query, for fluid interface + * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -863,7 +864,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildTaxRuleCountryQuery The current query, for fluid interface + * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -873,7 +874,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildTaxRuleCountryQuery The current query, for fluid interface + * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -883,7 +884,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildTaxRuleCountryQuery The current query, for fluid interface + * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -893,7 +894,7 @@ abstract class TaxRuleCountryQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildTaxRuleCountryQuery The current query, for fluid interface + * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Base/TaxRuleI18n.php b/core/lib/Thelia/Model/Base/TaxRuleI18n.php index 8e77fd85c..cb9460331 100644 --- a/core/lib/Thelia/Model/Base/TaxRuleI18n.php +++ b/core/lib/Thelia/Model/Base/TaxRuleI18n.php @@ -26,6 +26,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\TaxRuleI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -312,9 +313,9 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return TaxRuleI18n The current object, for fluid interface */ @@ -364,48 +365,52 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [title] column value. * - * @return string + * @return string */ public function getTitle() { + return $this->title; } /** * Get the [description] column value. * - * @return string + * @return string */ public function getDescription() { + return $this->description; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) */ public function setId($v) { @@ -422,14 +427,15 @@ abstract class TaxRuleI18n implements ActiveRecordInterface $this->aTaxRule = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -442,14 +448,15 @@ abstract class TaxRuleI18n implements ActiveRecordInterface $this->modifiedColumns[TaxRuleI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [title] column. * - * @param string $v new value - * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) */ public function setTitle($v) { @@ -462,14 +469,15 @@ abstract class TaxRuleI18n implements ActiveRecordInterface $this->modifiedColumns[TaxRuleI18nTableMap::TITLE] = true; } + return $this; } // setTitle() /** * Set the value of [description] column. * - * @param string $v new value - * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) */ public function setDescription($v) { @@ -482,6 +490,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface $this->modifiedColumns[TaxRuleI18nTableMap::DESCRIPTION] = true; } + return $this; } // setDescription() @@ -525,6 +534,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : TaxRuleI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -576,10 +586,10 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -615,7 +625,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see TaxRuleI18n::setDeleted() @@ -658,8 +668,8 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -709,8 +719,8 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -753,7 +763,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -814,7 +824,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -830,12 +840,12 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -849,7 +859,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -879,12 +889,12 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -918,12 +928,12 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -937,8 +947,8 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -972,8 +982,8 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -999,6 +1009,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface if ($this->isColumnModified(TaxRuleI18nTableMap::LOCALE)) $criteria->add(TaxRuleI18nTableMap::LOCALE, $this->locale); if ($this->isColumnModified(TaxRuleI18nTableMap::TITLE)) $criteria->add(TaxRuleI18nTableMap::TITLE, $this->title); if ($this->isColumnModified(TaxRuleI18nTableMap::DESCRIPTION)) $criteria->add(TaxRuleI18nTableMap::DESCRIPTION, $this->description); + return $criteria; } @@ -1036,7 +1047,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -1051,6 +1062,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1060,9 +1072,9 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\TaxRuleI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\TaxRuleI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1084,8 +1096,8 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\TaxRuleI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\TaxRuleI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1101,8 +1113,8 @@ abstract class TaxRuleI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildTaxRule object. * - * @param ChildTaxRule $v - * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) + * @param ChildTaxRule $v + * @return \Thelia\Model\TaxRuleI18n The current object (for fluent API support) * @throws PropelException */ public function setTaxRule(ChildTaxRule $v = null) @@ -1121,14 +1133,16 @@ abstract class TaxRuleI18n implements ActiveRecordInterface $v->addTaxRuleI18n($this); } + return $this; } + /** * Get the associated ChildTaxRule object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTaxRule The associated ChildTaxRule object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTaxRule The associated ChildTaxRule object. * @throws PropelException */ public function getTaxRule(ConnectionInterface $con = null) @@ -1171,7 +1185,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/TaxRuleI18nQuery.php b/core/lib/Thelia/Model/Base/TaxRuleI18nQuery.php index 9e0452aa1..25ad51db5 100644 --- a/core/lib/Thelia/Model/Base/TaxRuleI18nQuery.php +++ b/core/lib/Thelia/Model/Base/TaxRuleI18nQuery.php @@ -59,9 +59,9 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\TaxRuleI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\TaxRuleI18n', $modelAlias = null) { @@ -71,8 +71,8 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Returns a new ChildTaxRuleI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildTaxRuleI18nQuery */ @@ -132,10 +132,10 @@ abstract class TaxRuleI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildTaxRuleI18n A model object, or null if the key is not found + * @return ChildTaxRuleI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -163,8 +163,8 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildTaxRuleI18n|array|mixed the result, formatted by the current formatter */ @@ -184,8 +184,8 @@ abstract class TaxRuleI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -206,7 +206,7 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -221,7 +221,7 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -252,11 +252,11 @@ abstract class TaxRuleI18nQuery extends ModelCriteria * * @see filterByTaxRule() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -292,9 +292,9 @@ abstract class TaxRuleI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -321,9 +321,9 @@ abstract class TaxRuleI18nQuery extends ModelCriteria * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' * * - * @param string $title The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -350,9 +350,9 @@ abstract class TaxRuleI18nQuery extends ModelCriteria * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' * * - * @param string $description The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -373,8 +373,8 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxRule object * - * @param \Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -398,8 +398,8 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxRule relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -432,11 +432,11 @@ abstract class TaxRuleI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxRuleQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxRuleQuery A secondary query class using the current class as primary query */ public function useTaxRuleQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -448,7 +448,7 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildTaxRuleI18n $taxRuleI18n Object to remove from the list of results + * @param ChildTaxRuleI18n $taxRuleI18n Object to remove from the list of results * * @return ChildTaxRuleI18nQuery The current query, for fluid interface */ @@ -466,8 +466,8 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Deletes all rows from the tax_rule_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -498,13 +498,13 @@ abstract class TaxRuleI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildTaxRuleI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildTaxRuleI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildTaxRuleI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -524,6 +524,7 @@ abstract class TaxRuleI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + TaxRuleI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/TaxRuleQuery.php b/core/lib/Thelia/Model/Base/TaxRuleQuery.php index 2a2a102ea..5d2743bfd 100644 --- a/core/lib/Thelia/Model/Base/TaxRuleQuery.php +++ b/core/lib/Thelia/Model/Base/TaxRuleQuery.php @@ -68,9 +68,9 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\TaxRuleQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\TaxRule', $modelAlias = null) { @@ -80,8 +80,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Returns a new ChildTaxRuleQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildTaxRuleQuery */ @@ -110,7 +110,7 @@ abstract class TaxRuleQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildTaxRule|array|mixed the result, formatted by the current formatter @@ -141,10 +141,10 @@ abstract class TaxRuleQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildTaxRule A model object, or null if the key is not found + * @return ChildTaxRule A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildTaxRule|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class TaxRuleQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,24 +214,26 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildTaxRuleQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(TaxRuleTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildTaxRuleQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(TaxRuleTableMap::ID, $keys, Criteria::IN); } @@ -245,11 +247,11 @@ abstract class TaxRuleQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -285,12 +287,12 @@ abstract class TaxRuleQuery extends ModelCriteria * $query->filterByIsDefault('yes'); // WHERE is_default = true * * - * @param boolean|string $isDefault The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param boolean|string $isDefault The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -313,13 +315,13 @@ abstract class TaxRuleQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -356,13 +358,13 @@ abstract class TaxRuleQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -392,8 +394,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -415,8 +417,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -449,11 +451,11 @@ abstract class TaxRuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -465,8 +467,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxRuleCountry object * - * @param \Thelia\Model\TaxRuleCountry|ObjectCollection $taxRuleCountry the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxRuleCountry|ObjectCollection $taxRuleCountry the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -488,8 +490,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxRuleCountry relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -522,11 +524,11 @@ abstract class TaxRuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxRuleCountryQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxRuleCountryQuery A secondary query class using the current class as primary query */ public function useTaxRuleCountryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -538,8 +540,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TaxRuleI18n object * - * @param \Thelia\Model\TaxRuleI18n|ObjectCollection $taxRuleI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TaxRuleI18n|ObjectCollection $taxRuleI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -561,8 +563,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TaxRuleI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -595,11 +597,11 @@ abstract class TaxRuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TaxRuleI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TaxRuleI18nQuery A secondary query class using the current class as primary query */ public function useTaxRuleI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -611,7 +613,7 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildTaxRule $taxRule Object to remove from the list of results + * @param ChildTaxRule $taxRule Object to remove from the list of results * * @return ChildTaxRuleQuery The current query, for fluid interface */ @@ -627,8 +629,8 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Deletes all rows from the tax_rule table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -659,13 +661,13 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildTaxRule or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildTaxRule object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildTaxRule object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -685,6 +687,7 @@ abstract class TaxRuleQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + TaxRuleTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -703,9 +706,9 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -715,9 +718,9 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -727,7 +730,7 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -737,7 +740,7 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -747,7 +750,7 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -757,7 +760,7 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function firstCreatedFirst() { @@ -769,11 +772,11 @@ abstract class TaxRuleQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -788,10 +791,10 @@ abstract class TaxRuleQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTaxRuleQuery The current query, for fluid interface + * @return ChildTaxRuleQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -808,11 +811,11 @@ abstract class TaxRuleQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTaxRuleI18nQuery A secondary query class using the current class as primary query + * @return ChildTaxRuleI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { diff --git a/core/lib/Thelia/Model/Base/Template.php b/core/lib/Thelia/Model/Base/Template.php index bf85e3d90..88b44a7a2 100644 --- a/core/lib/Thelia/Model/Base/Template.php +++ b/core/lib/Thelia/Model/Base/Template.php @@ -40,6 +40,7 @@ abstract class Template implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\TemplateTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -385,9 +386,9 @@ abstract class Template implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return Template The current object, for fluid interface */ @@ -437,10 +438,11 @@ abstract class Template implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } @@ -448,8 +450,8 @@ abstract class Template implements ActiveRecordInterface * Get the [optionally formatted] temporal [created_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -468,8 +470,8 @@ abstract class Template implements ActiveRecordInterface * Get the [optionally formatted] temporal [updated_at] column value. * * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. * * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 * @@ -487,8 +489,8 @@ abstract class Template implements ActiveRecordInterface /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\Template The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\Template The current object (for fluent API support) */ public function setId($v) { @@ -501,15 +503,16 @@ abstract class Template implements ActiveRecordInterface $this->modifiedColumns[TemplateTableMap::ID] = true; } + return $this; } // setId() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Template The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Template The current object (for fluent API support) */ public function setCreatedAt($v) { @@ -521,15 +524,16 @@ abstract class Template implements ActiveRecordInterface } } // if either are not null + return $this; } // setCreatedAt() /** * Sets the value of [updated_at] column to a normalized version of the date/time value specified. * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Template The current object (for fluent API support) + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \Thelia\Model\Template The current object (for fluent API support) */ public function setUpdatedAt($v) { @@ -541,6 +545,7 @@ abstract class Template implements ActiveRecordInterface } } // if either are not null + return $this; } // setUpdatedAt() @@ -632,10 +637,10 @@ abstract class Template implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -680,7 +685,7 @@ abstract class Template implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see Template::setDeleted() @@ -723,8 +728,8 @@ abstract class Template implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -785,8 +790,8 @@ abstract class Template implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -940,7 +945,7 @@ abstract class Template implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -1006,7 +1011,7 @@ abstract class Template implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -1022,12 +1027,12 @@ abstract class Template implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -1041,7 +1046,7 @@ abstract class Template implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -1068,12 +1073,12 @@ abstract class Template implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -1115,12 +1120,12 @@ abstract class Template implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -1134,8 +1139,8 @@ abstract class Template implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -1166,8 +1171,8 @@ abstract class Template implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -1191,6 +1196,7 @@ abstract class Template implements ActiveRecordInterface if ($this->isColumnModified(TemplateTableMap::ID)) $criteria->add(TemplateTableMap::ID, $this->id); if ($this->isColumnModified(TemplateTableMap::CREATED_AT)) $criteria->add(TemplateTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(TemplateTableMap::UPDATED_AT)) $criteria->add(TemplateTableMap::UPDATED_AT, $this->updated_at); + return $criteria; } @@ -1212,7 +1218,7 @@ abstract class Template implements ActiveRecordInterface /** * Returns the primary key for this object (row). - * @return int + * @return int */ public function getPrimaryKey() { @@ -1222,7 +1228,7 @@ abstract class Template implements ActiveRecordInterface /** * Generic method to set the primary key (id column). * - * @param int $key Primary key. + * @param int $key Primary key. * @return void */ public function setPrimaryKey($key) @@ -1236,6 +1242,7 @@ abstract class Template implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return null === $this->getId(); } @@ -1245,9 +1252,9 @@ abstract class Template implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\Template (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\Template (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1300,8 +1307,8 @@ abstract class Template implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\Template Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\Template Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1320,7 +1327,7 @@ abstract class Template implements ActiveRecordInterface * Avoids crafting an 'init[$relationName]s' method name * that wouldn't work when StandardEnglishPluralizer is used. * - * @param string $relationName The name of the relation to initialize + * @param string $relationName The name of the relation to initialize * @return void */ public function initRelation($relationName) @@ -1368,8 +1375,8 @@ abstract class Template implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1391,8 +1398,8 @@ abstract class Template implements ActiveRecordInterface * If this ChildTemplate is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildProduct[] List of ChildProduct objects * @throws PropelException */ @@ -1448,14 +1455,15 @@ abstract class Template implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $products A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTemplate The current object (for fluent API support) + * @param Collection $products A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTemplate The current object (for fluent API support) */ public function setProducts(Collection $products, ConnectionInterface $con = null) { $productsToDelete = $this->getProducts(new Criteria(), $con)->diff($products); + $this->productsScheduledForDeletion = $productsToDelete; foreach ($productsToDelete as $productRemoved) { @@ -1476,10 +1484,10 @@ abstract class Template implements ActiveRecordInterface /** * Returns the number of related Product objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related Product objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related Product objects. * @throws PropelException */ public function countProducts(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1511,8 +1519,8 @@ abstract class Template implements ActiveRecordInterface * Method called to associate a ChildProduct object to this object * through the ChildProduct foreign key attribute. * - * @param ChildProduct $l ChildProduct - * @return \Thelia\Model\Template The current object (for fluent API support) + * @param ChildProduct $l ChildProduct + * @return \Thelia\Model\Template The current object (for fluent API support) */ public function addProduct(ChildProduct $l) { @@ -1538,7 +1546,7 @@ abstract class Template implements ActiveRecordInterface } /** - * @param Product $product The product object to remove. + * @param Product $product The product object to remove. * @return ChildTemplate The current object (for fluent API support) */ public function removeProduct($product) @@ -1556,6 +1564,7 @@ abstract class Template implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1567,9 +1576,9 @@ abstract class Template implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Template. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildProduct[] List of ChildProduct objects */ public function getProductsJoinTaxRule($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1609,8 +1618,8 @@ abstract class Template implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1632,8 +1641,8 @@ abstract class Template implements ActiveRecordInterface * If this ChildTemplate is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildFeatureTemplate[] List of ChildFeatureTemplate objects * @throws PropelException */ @@ -1689,14 +1698,15 @@ abstract class Template implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $featureTemplates A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTemplate The current object (for fluent API support) + * @param Collection $featureTemplates A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTemplate The current object (for fluent API support) */ public function setFeatureTemplates(Collection $featureTemplates, ConnectionInterface $con = null) { $featureTemplatesToDelete = $this->getFeatureTemplates(new Criteria(), $con)->diff($featureTemplates); + $this->featureTemplatesScheduledForDeletion = $featureTemplatesToDelete; foreach ($featureTemplatesToDelete as $featureTemplateRemoved) { @@ -1717,10 +1727,10 @@ abstract class Template implements ActiveRecordInterface /** * Returns the number of related FeatureTemplate objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related FeatureTemplate objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related FeatureTemplate objects. * @throws PropelException */ public function countFeatureTemplates(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1752,8 +1762,8 @@ abstract class Template implements ActiveRecordInterface * Method called to associate a ChildFeatureTemplate object to this object * through the ChildFeatureTemplate foreign key attribute. * - * @param ChildFeatureTemplate $l ChildFeatureTemplate - * @return \Thelia\Model\Template The current object (for fluent API support) + * @param ChildFeatureTemplate $l ChildFeatureTemplate + * @return \Thelia\Model\Template The current object (for fluent API support) */ public function addFeatureTemplate(ChildFeatureTemplate $l) { @@ -1780,7 +1790,7 @@ abstract class Template implements ActiveRecordInterface /** * @param FeatureTemplate $featureTemplate The featureTemplate object to remove. - * @return ChildTemplate The current object (for fluent API support) + * @return ChildTemplate The current object (for fluent API support) */ public function removeFeatureTemplate($featureTemplate) { @@ -1797,6 +1807,7 @@ abstract class Template implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -1808,9 +1819,9 @@ abstract class Template implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Template. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildFeatureTemplate[] List of ChildFeatureTemplate objects */ public function getFeatureTemplatesJoinFeature($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -1850,8 +1861,8 @@ abstract class Template implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -1873,8 +1884,8 @@ abstract class Template implements ActiveRecordInterface * If this ChildTemplate is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildAttributeTemplate[] List of ChildAttributeTemplate objects * @throws PropelException */ @@ -1930,14 +1941,15 @@ abstract class Template implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributeTemplates A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTemplate The current object (for fluent API support) + * @param Collection $attributeTemplates A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTemplate The current object (for fluent API support) */ public function setAttributeTemplates(Collection $attributeTemplates, ConnectionInterface $con = null) { $attributeTemplatesToDelete = $this->getAttributeTemplates(new Criteria(), $con)->diff($attributeTemplates); + $this->attributeTemplatesScheduledForDeletion = $attributeTemplatesToDelete; foreach ($attributeTemplatesToDelete as $attributeTemplateRemoved) { @@ -1958,10 +1970,10 @@ abstract class Template implements ActiveRecordInterface /** * Returns the number of related AttributeTemplate objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related AttributeTemplate objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related AttributeTemplate objects. * @throws PropelException */ public function countAttributeTemplates(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -1993,8 +2005,8 @@ abstract class Template implements ActiveRecordInterface * Method called to associate a ChildAttributeTemplate object to this object * through the ChildAttributeTemplate foreign key attribute. * - * @param ChildAttributeTemplate $l ChildAttributeTemplate - * @return \Thelia\Model\Template The current object (for fluent API support) + * @param ChildAttributeTemplate $l ChildAttributeTemplate + * @return \Thelia\Model\Template The current object (for fluent API support) */ public function addAttributeTemplate(ChildAttributeTemplate $l) { @@ -2021,7 +2033,7 @@ abstract class Template implements ActiveRecordInterface /** * @param AttributeTemplate $attributeTemplate The attributeTemplate object to remove. - * @return ChildTemplate The current object (for fluent API support) + * @return ChildTemplate The current object (for fluent API support) */ public function removeAttributeTemplate($attributeTemplate) { @@ -2038,6 +2050,7 @@ abstract class Template implements ActiveRecordInterface return $this; } + /** * If this collection has already been initialized with * an identical criteria, it returns the collection. @@ -2049,9 +2062,9 @@ abstract class Template implements ActiveRecordInterface * api reasonable. You can provide public methods for those you * actually need in Template. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object - * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return Collection|ChildAttributeTemplate[] List of ChildAttributeTemplate objects */ public function getAttributeTemplatesJoinAttribute($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) @@ -2091,8 +2104,8 @@ abstract class Template implements ActiveRecordInterface * however, you may wish to override this method in your stub class to provide setting appropriate * to your application -- for example, setting the initial array to the values stored in database. * - * @param boolean $overrideExisting If set to true, the method call initializes - * the collection even if it is not empty + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty * * @return void */ @@ -2114,8 +2127,8 @@ abstract class Template implements ActiveRecordInterface * If this ChildTemplate is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param ConnectionInterface $con optional connection object + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object * @return Collection|ChildTemplateI18n[] List of ChildTemplateI18n objects * @throws PropelException */ @@ -2171,14 +2184,15 @@ abstract class Template implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $templateI18ns A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTemplate The current object (for fluent API support) + * @param Collection $templateI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTemplate The current object (for fluent API support) */ public function setTemplateI18ns(Collection $templateI18ns, ConnectionInterface $con = null) { $templateI18nsToDelete = $this->getTemplateI18ns(new Criteria(), $con)->diff($templateI18ns); + //since at least one column in the foreign key is at the same time a PK //we can not just set a PK to NULL in the lines below. We have to store //a backup of all values, so we are able to manipulate these items based on the onDelete value later. @@ -2202,10 +2216,10 @@ abstract class Template implements ActiveRecordInterface /** * Returns the number of related TemplateI18n objects. * - * @param Criteria $criteria - * @param boolean $distinct - * @param ConnectionInterface $con - * @return int Count of related TemplateI18n objects. + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related TemplateI18n objects. * @throws PropelException */ public function countTemplateI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) @@ -2237,8 +2251,8 @@ abstract class Template implements ActiveRecordInterface * Method called to associate a ChildTemplateI18n object to this object * through the ChildTemplateI18n foreign key attribute. * - * @param ChildTemplateI18n $l ChildTemplateI18n - * @return \Thelia\Model\Template The current object (for fluent API support) + * @param ChildTemplateI18n $l ChildTemplateI18n + * @return \Thelia\Model\Template The current object (for fluent API support) */ public function addTemplateI18n(ChildTemplateI18n $l) { @@ -2268,7 +2282,7 @@ abstract class Template implements ActiveRecordInterface } /** - * @param TemplateI18n $templateI18n The templateI18n object to remove. + * @param TemplateI18n $templateI18n The templateI18n object to remove. * @return ChildTemplate The current object (for fluent API support) */ public function removeTemplateI18n($templateI18n) @@ -2326,8 +2340,8 @@ abstract class Template implements ActiveRecordInterface * If this ChildTemplate is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildFeature[] List of ChildFeature objects */ @@ -2357,9 +2371,9 @@ abstract class Template implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $features A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTemplate The current object (for fluent API support) + * @param Collection $features A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTemplate The current object (for fluent API support) */ public function setFeatures(Collection $features, ConnectionInterface $con = null) { @@ -2383,9 +2397,9 @@ abstract class Template implements ActiveRecordInterface * Gets the number of ChildFeature objects related by a many-to-many relationship * to the current object by way of the feature_template cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildFeature objects */ @@ -2413,7 +2427,7 @@ abstract class Template implements ActiveRecordInterface * Associate a ChildFeature object to this object * through the feature_template cross reference table. * - * @param ChildFeature $feature The ChildFeatureTemplate object to relate + * @param ChildFeature $feature The ChildFeatureTemplate object to relate * @return ChildTemplate The current object (for fluent API support) */ public function addFeature(ChildFeature $feature) @@ -2431,7 +2445,7 @@ abstract class Template implements ActiveRecordInterface } /** - * @param Feature $feature The feature object to add. + * @param Feature $feature The feature object to add. */ protected function doAddFeature($feature) { @@ -2450,7 +2464,7 @@ abstract class Template implements ActiveRecordInterface * Remove a ChildFeature object to this object * through the feature_template cross reference table. * - * @param ChildFeature $feature The ChildFeatureTemplate object to relate + * @param ChildFeature $feature The ChildFeatureTemplate object to relate * @return ChildTemplate The current object (for fluent API support) */ public function removeFeature(ChildFeature $feature) @@ -2509,8 +2523,8 @@ abstract class Template implements ActiveRecordInterface * If this ChildTemplate is new, it will return * an empty collection or the current collection; the criteria is ignored on a new object. * - * @param Criteria $criteria Optional query object to filter the query - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param ConnectionInterface $con Optional connection object * * @return ObjectCollection|ChildAttribute[] List of ChildAttribute objects */ @@ -2540,9 +2554,9 @@ abstract class Template implements ActiveRecordInterface * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param Collection $attributes A Propel collection. - * @param ConnectionInterface $con Optional connection object - * @return ChildTemplate The current object (for fluent API support) + * @param Collection $attributes A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildTemplate The current object (for fluent API support) */ public function setAttributes(Collection $attributes, ConnectionInterface $con = null) { @@ -2566,9 +2580,9 @@ abstract class Template implements ActiveRecordInterface * Gets the number of ChildAttribute objects related by a many-to-many relationship * to the current object by way of the attribute_template cross-reference table. * - * @param Criteria $criteria Optional query object to filter the query - * @param boolean $distinct Set to true to force count distinct - * @param ConnectionInterface $con Optional connection object + * @param Criteria $criteria Optional query object to filter the query + * @param boolean $distinct Set to true to force count distinct + * @param ConnectionInterface $con Optional connection object * * @return int the number of related ChildAttribute objects */ @@ -2597,7 +2611,7 @@ abstract class Template implements ActiveRecordInterface * through the attribute_template cross reference table. * * @param ChildAttribute $attribute The ChildAttributeTemplate object to relate - * @return ChildTemplate The current object (for fluent API support) + * @return ChildTemplate The current object (for fluent API support) */ public function addAttribute(ChildAttribute $attribute) { @@ -2614,7 +2628,7 @@ abstract class Template implements ActiveRecordInterface } /** - * @param Attribute $attribute The attribute object to add. + * @param Attribute $attribute The attribute object to add. */ protected function doAddAttribute($attribute) { @@ -2633,8 +2647,8 @@ abstract class Template implements ActiveRecordInterface * Remove a ChildAttribute object to this object * through the attribute_template cross reference table. * - * @param ChildAttribute $attribute The ChildAttributeTemplate object to relate - * @return ChildTemplate The current object (for fluent API support) + * @param ChildAttribute $attribute The ChildAttributeTemplate object to relate + * @return ChildTemplate The current object (for fluent API support) */ public function removeAttribute(ChildAttribute $attribute) { @@ -2674,7 +2688,7 @@ abstract class Template implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { @@ -2738,9 +2752,9 @@ abstract class Template implements ActiveRecordInterface /** * Sets the locale for translations * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * - * @return ChildTemplate The current object (for fluent API support) + * @return ChildTemplate The current object (for fluent API support) */ public function setLocale($locale = 'en_US') { @@ -2752,7 +2766,7 @@ abstract class Template implements ActiveRecordInterface /** * Gets the locale for translations * - * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' */ public function getLocale() { @@ -2762,8 +2776,8 @@ abstract class Template implements ActiveRecordInterface /** * Returns the current translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * * @return ChildTemplateI18n */ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) @@ -2796,10 +2810,10 @@ abstract class Template implements ActiveRecordInterface /** * Remove the translation for a given locale * - * @param string $locale Locale to use for the translation, e.g. 'fr_FR' - * @param ConnectionInterface $con an optional connection object + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object * - * @return ChildTemplate The current object (for fluent API support) + * @return ChildTemplate The current object (for fluent API support) */ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) { @@ -2824,7 +2838,7 @@ abstract class Template implements ActiveRecordInterface /** * Returns the current translation * - * @param ConnectionInterface $con an optional connection object + * @param ConnectionInterface $con an optional connection object * * @return ChildTemplateI18n */ public function getCurrentTranslation(ConnectionInterface $con = null) @@ -2861,7 +2875,7 @@ abstract class Template implements ActiveRecordInterface /** * Mark the current object so that the update date doesn't get updated during next save * - * @return ChildTemplate The current object (for fluent API support) + * @return ChildTemplate The current object (for fluent API support) */ public function keepUpdateDateUnchanged() { @@ -2946,6 +2960,7 @@ abstract class Template implements ActiveRecordInterface } + /** * Derived method to catches calls to undefined methods. * diff --git a/core/lib/Thelia/Model/Base/TemplateI18n.php b/core/lib/Thelia/Model/Base/TemplateI18n.php index 12d365f60..f6a0ba085 100644 --- a/core/lib/Thelia/Model/Base/TemplateI18n.php +++ b/core/lib/Thelia/Model/Base/TemplateI18n.php @@ -26,6 +26,7 @@ abstract class TemplateI18n implements ActiveRecordInterface */ const TABLE_MAP = '\\Thelia\\Model\\Map\\TemplateI18nTableMap'; + /** * attribute to determine if this object has previously been saved. * @var boolean @@ -306,9 +307,9 @@ abstract class TemplateI18n implements ActiveRecordInterface * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); * * - * @param mixed $parser A AbstractParser instance, + * @param mixed $parser A AbstractParser instance, * or a format name ('XML', 'YAML', 'JSON', 'CSV') - * @param string $data The source data to import from + * @param string $data The source data to import from * * @return TemplateI18n The current object, for fluid interface */ @@ -358,38 +359,41 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Get the [id] column value. * - * @return int + * @return int */ public function getId() { + return $this->id; } /** * Get the [locale] column value. * - * @return string + * @return string */ public function getLocale() { + return $this->locale; } /** * Get the [name] column value. * - * @return string + * @return string */ public function getName() { + return $this->name; } /** * Set the value of [id] column. * - * @param int $v new value - * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) + * @param int $v new value + * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) */ public function setId($v) { @@ -406,14 +410,15 @@ abstract class TemplateI18n implements ActiveRecordInterface $this->aTemplate = null; } + return $this; } // setId() /** * Set the value of [locale] column. * - * @param string $v new value - * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) */ public function setLocale($v) { @@ -426,14 +431,15 @@ abstract class TemplateI18n implements ActiveRecordInterface $this->modifiedColumns[TemplateI18nTableMap::LOCALE] = true; } + return $this; } // setLocale() /** * Set the value of [name] column. * - * @param string $v new value - * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) + * @param string $v new value + * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) */ public function setName($v) { @@ -446,6 +452,7 @@ abstract class TemplateI18n implements ActiveRecordInterface $this->modifiedColumns[TemplateI18nTableMap::NAME] = true; } + return $this; } // setName() @@ -489,6 +496,7 @@ abstract class TemplateI18n implements ActiveRecordInterface { try { + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : TemplateI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; $this->id = (null !== $col) ? (int) $col : null; @@ -537,10 +545,10 @@ abstract class TemplateI18n implements ActiveRecordInterface * * This will only work if the object has been saved and has a valid primary key set. * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db */ public function reload($deep = false, ConnectionInterface $con = null) { @@ -576,7 +584,7 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Removes this object from datastore and sets delete attribute. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * @return void * @throws PropelException * @see TemplateI18n::setDeleted() @@ -619,8 +627,8 @@ abstract class TemplateI18n implements ActiveRecordInterface * method. This method wraps all precipitate database operations in a * single transaction. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see doSave() */ @@ -670,8 +678,8 @@ abstract class TemplateI18n implements ActiveRecordInterface * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param ConnectionInterface $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @throws PropelException * @see save() */ @@ -714,7 +722,7 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Insert the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @throws PropelException * @see doSave() @@ -769,7 +777,7 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Update the row in the database. * - * @param ConnectionInterface $con + * @param ConnectionInterface $con * * @return Integer Number of updated rows * @see doSave() @@ -785,12 +793,12 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. */ public function getByName($name, $type = TableMap::TYPE_PHPNAME) { @@ -804,7 +812,7 @@ abstract class TemplateI18n implements ActiveRecordInterface * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema + * @param int $pos position in xml schema * @return mixed Value of field at $pos */ public function getByPosition($pos) @@ -831,12 +839,12 @@ abstract class TemplateI18n implements ActiveRecordInterface * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. * * @return array an associative array containing the field names (as keys) and field values */ @@ -869,12 +877,12 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Sets a field from the object by name passed in as a string. * - * @param string $name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. - * Defaults to TableMap::TYPE_PHPNAME. + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. * @return void */ public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) @@ -888,8 +896,8 @@ abstract class TemplateI18n implements ActiveRecordInterface * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value + * @param int $pos position in xml schema + * @param mixed $value field value * @return void */ public function setByPosition($pos, $value) @@ -920,8 +928,8 @@ abstract class TemplateI18n implements ActiveRecordInterface * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * The default key type is the column's TableMap::TYPE_PHPNAME. * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) @@ -945,6 +953,7 @@ abstract class TemplateI18n implements ActiveRecordInterface if ($this->isColumnModified(TemplateI18nTableMap::ID)) $criteria->add(TemplateI18nTableMap::ID, $this->id); if ($this->isColumnModified(TemplateI18nTableMap::LOCALE)) $criteria->add(TemplateI18nTableMap::LOCALE, $this->locale); if ($this->isColumnModified(TemplateI18nTableMap::NAME)) $criteria->add(TemplateI18nTableMap::NAME, $this->name); + return $criteria; } @@ -982,7 +991,7 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ public function setPrimaryKey($keys) @@ -997,6 +1006,7 @@ abstract class TemplateI18n implements ActiveRecordInterface */ public function isPrimaryKeyNull() { + return (null === $this->getId()) && (null === $this->getLocale()); } @@ -1006,9 +1016,9 @@ abstract class TemplateI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of \Thelia\Model\TemplateI18n (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @param object $copyObj An object of \Thelia\Model\TemplateI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) @@ -1029,8 +1039,8 @@ abstract class TemplateI18n implements ActiveRecordInterface * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return \Thelia\Model\TemplateI18n Clone of current object. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \Thelia\Model\TemplateI18n Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -1046,8 +1056,8 @@ abstract class TemplateI18n implements ActiveRecordInterface /** * Declares an association between this object and a ChildTemplate object. * - * @param ChildTemplate $v - * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) + * @param ChildTemplate $v + * @return \Thelia\Model\TemplateI18n The current object (for fluent API support) * @throws PropelException */ public function setTemplate(ChildTemplate $v = null) @@ -1066,14 +1076,16 @@ abstract class TemplateI18n implements ActiveRecordInterface $v->addTemplateI18n($this); } + return $this; } + /** * Get the associated ChildTemplate object * - * @param ConnectionInterface $con Optional Connection object. - * @return ChildTemplate The associated ChildTemplate object. + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTemplate The associated ChildTemplate object. * @throws PropelException */ public function getTemplate(ConnectionInterface $con = null) @@ -1115,7 +1127,7 @@ abstract class TemplateI18n implements ActiveRecordInterface * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * - * @param boolean $deep Whether to also clear the references on all referrer objects. + * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { diff --git a/core/lib/Thelia/Model/Base/TemplateI18nQuery.php b/core/lib/Thelia/Model/Base/TemplateI18nQuery.php index 8c897ef21..2607e770f 100644 --- a/core/lib/Thelia/Model/Base/TemplateI18nQuery.php +++ b/core/lib/Thelia/Model/Base/TemplateI18nQuery.php @@ -55,9 +55,9 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\TemplateI18nQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\TemplateI18n', $modelAlias = null) { @@ -67,8 +67,8 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Returns a new ChildTemplateI18nQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildTemplateI18nQuery */ @@ -128,10 +128,10 @@ abstract class TemplateI18nQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildTemplateI18n A model object, or null if the key is not found + * @return ChildTemplateI18n A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -159,8 +159,8 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildTemplateI18n|array|mixed the result, formatted by the current formatter */ @@ -180,8 +180,8 @@ abstract class TemplateI18nQuery extends ModelCriteria * * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -202,7 +202,7 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -217,7 +217,7 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -248,11 +248,11 @@ abstract class TemplateI18nQuery extends ModelCriteria * * @see filterByTemplate() * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -288,9 +288,9 @@ abstract class TemplateI18nQuery extends ModelCriteria * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' * * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -317,9 +317,9 @@ abstract class TemplateI18nQuery extends ModelCriteria * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%' * * - * @param string $name The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param string $name The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -340,8 +340,8 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Template object * - * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Template|ObjectCollection $template The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -365,8 +365,8 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Template relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -399,11 +399,11 @@ abstract class TemplateI18nQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TemplateQuery A secondary query class using the current class as primary query */ public function useTemplateQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -415,7 +415,7 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildTemplateI18n $templateI18n Object to remove from the list of results + * @param ChildTemplateI18n $templateI18n Object to remove from the list of results * * @return ChildTemplateI18nQuery The current query, for fluid interface */ @@ -433,8 +433,8 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Deletes all rows from the template_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -465,13 +465,13 @@ abstract class TemplateI18nQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildTemplateI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildTemplateI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildTemplateI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -491,6 +491,7 @@ abstract class TemplateI18nQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + TemplateI18nTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); diff --git a/core/lib/Thelia/Model/Base/TemplateQuery.php b/core/lib/Thelia/Model/Base/TemplateQuery.php index 3b2637e6e..f6821b35d 100644 --- a/core/lib/Thelia/Model/Base/TemplateQuery.php +++ b/core/lib/Thelia/Model/Base/TemplateQuery.php @@ -68,9 +68,9 @@ abstract class TemplateQuery extends ModelCriteria /** * Initializes internal state of \Thelia\Model\Base\TemplateQuery object. * - * @param string $dbName The database name - * @param string $modelName The phpName of a model, e.g. 'Book' - * @param string $modelAlias The alias for the model in this query, e.g. 'b' + * @param string $dbName The database name + * @param string $modelName The phpName of a model, e.g. 'Book' + * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Template', $modelAlias = null) { @@ -80,8 +80,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Returns a new ChildTemplateQuery object. * - * @param string $modelAlias The alias of a model in the query - * @param Criteria $criteria Optional Criteria to build the query from + * @param string $modelAlias The alias of a model in the query + * @param Criteria $criteria Optional Criteria to build the query from * * @return ChildTemplateQuery */ @@ -110,7 +110,7 @@ abstract class TemplateQuery extends ModelCriteria * $obj = $c->findPk(12, $con); * * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildTemplate|array|mixed the result, formatted by the current formatter @@ -141,10 +141,10 @@ abstract class TemplateQuery extends ModelCriteria * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * - * @return ChildTemplate A model object, or null if the key is not found + * @return ChildTemplate A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { @@ -171,8 +171,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Find object by primary key. * - * @param mixed $key Primary key to use for the query - * @param ConnectionInterface $con A connection object + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object * * @return ChildTemplate|array|mixed the result, formatted by the current formatter */ @@ -192,8 +192,8 @@ abstract class TemplateQuery extends ModelCriteria * * $objs = $c->findPks(array(12, 56, 832), $con); * - * @param array $keys Primary keys to use for the query - * @param ConnectionInterface $con an optional connection object + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ @@ -214,24 +214,26 @@ abstract class TemplateQuery extends ModelCriteria /** * Filter the query by primary key * - * @param mixed $key Primary key to use for the query + * @param mixed $key Primary key to use for the query * * @return ChildTemplateQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { + return $this->addUsingAlias(TemplateTableMap::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * - * @param array $keys The list of primary key to use for the query + * @param array $keys The list of primary key to use for the query * * @return ChildTemplateQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { + return $this->addUsingAlias(TemplateTableMap::ID, $keys, Criteria::IN); } @@ -245,11 +247,11 @@ abstract class TemplateQuery extends ModelCriteria * $query->filterById(array('min' => 12)); // WHERE id > 12 * * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -286,13 +288,13 @@ abstract class TemplateQuery extends ModelCriteria * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' * * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -329,13 +331,13 @@ abstract class TemplateQuery extends ModelCriteria * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' * * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -365,8 +367,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\Product object * - * @param \Thelia\Model\Product|ObjectCollection $product the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\Product|ObjectCollection $product the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -388,8 +390,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the Product relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -422,11 +424,11 @@ abstract class TemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\ProductQuery A secondary query class using the current class as primary query */ public function useProductQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -438,8 +440,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\FeatureTemplate object * - * @param \Thelia\Model\FeatureTemplate|ObjectCollection $featureTemplate the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\FeatureTemplate|ObjectCollection $featureTemplate the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -461,8 +463,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the FeatureTemplate relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -495,11 +497,11 @@ abstract class TemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\FeatureTemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\FeatureTemplateQuery A secondary query class using the current class as primary query */ public function useFeatureTemplateQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -511,8 +513,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\AttributeTemplate object * - * @param \Thelia\Model\AttributeTemplate|ObjectCollection $attributeTemplate the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\AttributeTemplate|ObjectCollection $attributeTemplate the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -534,8 +536,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the AttributeTemplate relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -568,11 +570,11 @@ abstract class TemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\AttributeTemplateQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\AttributeTemplateQuery A secondary query class using the current class as primary query */ public function useAttributeTemplateQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -584,8 +586,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Filter the query by a related \Thelia\Model\TemplateI18n object * - * @param \Thelia\Model\TemplateI18n|ObjectCollection $templateI18n the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param \Thelia\Model\TemplateI18n|ObjectCollection $templateI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -607,8 +609,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the TemplateI18n relation * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -641,11 +643,11 @@ abstract class TemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return \Thelia\Model\TemplateI18nQuery A secondary query class using the current class as primary query + * @return \Thelia\Model\TemplateI18nQuery A secondary query class using the current class as primary query */ public function useTemplateI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') { @@ -658,8 +660,8 @@ abstract class TemplateQuery extends ModelCriteria * Filter the query by a related Feature object * using the feature_template table as cross reference * - * @param Feature $feature the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Feature $feature the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -675,8 +677,8 @@ abstract class TemplateQuery extends ModelCriteria * Filter the query by a related Attribute object * using the attribute_template table as cross reference * - * @param Attribute $attribute the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * @param Attribute $attribute the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -691,7 +693,7 @@ abstract class TemplateQuery extends ModelCriteria /** * Exclude object from result * - * @param ChildTemplate $template Object to remove from the list of results + * @param ChildTemplate $template Object to remove from the list of results * * @return ChildTemplateQuery The current query, for fluid interface */ @@ -707,8 +709,8 @@ abstract class TemplateQuery extends ModelCriteria /** * Deletes all rows from the template table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public function doDeleteAll(ConnectionInterface $con = null) { @@ -739,13 +741,13 @@ abstract class TemplateQuery extends ModelCriteria /** * Performs a DELETE on the database, given a ChildTemplate or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ChildTemplate object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ChildTemplate object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public function delete(ConnectionInterface $con = null) { @@ -765,6 +767,7 @@ abstract class TemplateQuery extends ModelCriteria // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); + TemplateTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); @@ -783,11 +786,11 @@ abstract class TemplateQuery extends ModelCriteria /** * Adds a JOIN clause to the query using the i18n relation * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -802,10 +805,10 @@ abstract class TemplateQuery extends ModelCriteria * Adds a JOIN clause to the query and hydrates the related I18n object. * Shortcut for $c->joinI18n($locale)->with() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) { @@ -822,11 +825,11 @@ abstract class TemplateQuery extends ModelCriteria * * @see useQuery() * - * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. * - * @return ChildTemplateI18nQuery A secondary query class using the current class as primary query + * @return ChildTemplateI18nQuery A secondary query class using the current class as primary query */ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) { @@ -840,9 +843,9 @@ abstract class TemplateQuery extends ModelCriteria /** * Filter by the latest updated * - * @param int $nbDays Maximum age of the latest update in days + * @param int $nbDays Maximum age of the latest update in days * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function recentlyUpdated($nbDays = 7) { @@ -852,9 +855,9 @@ abstract class TemplateQuery extends ModelCriteria /** * Filter by the latest created * - * @param int $nbDays Maximum age of in days + * @param int $nbDays Maximum age of in days * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function recentlyCreated($nbDays = 7) { @@ -864,7 +867,7 @@ abstract class TemplateQuery extends ModelCriteria /** * Order by update date desc * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function lastUpdatedFirst() { @@ -874,7 +877,7 @@ abstract class TemplateQuery extends ModelCriteria /** * Order by update date asc * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function firstUpdatedFirst() { @@ -884,7 +887,7 @@ abstract class TemplateQuery extends ModelCriteria /** * Order by create date desc * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function lastCreatedFirst() { @@ -894,7 +897,7 @@ abstract class TemplateQuery extends ModelCriteria /** * Order by create date asc * - * @return ChildTemplateQuery The current query, for fluid interface + * @return ChildTemplateQuery The current query, for fluid interface */ public function firstCreatedFirst() { diff --git a/core/lib/Thelia/Model/Map/AccessoryTableMap.php b/core/lib/Thelia/Model/Map/AccessoryTableMap.php index d2b6b6d90..8f32fa987 100644 --- a/core/lib/Thelia/Model/Map/AccessoryTableMap.php +++ b/core/lib/Thelia/Model/Map/AccessoryTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Accessory; use Thelia\Model\AccessoryQuery; + /** * This class defines the structure of the 'accessory' table. * @@ -190,7 +191,7 @@ class AccessoryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -210,12 +211,13 @@ class AccessoryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -231,8 +233,8 @@ class AccessoryTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -249,8 +251,8 @@ class AccessoryTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Accessory object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Accessory object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -274,10 +276,10 @@ class AccessoryTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -310,10 +312,10 @@ class AccessoryTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -339,7 +341,7 @@ class AccessoryTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -360,13 +362,13 @@ class AccessoryTableMap extends TableMap /** * Performs a DELETE on the database, given a Accessory or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Accessory object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Accessory object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -399,8 +401,8 @@ class AccessoryTableMap extends TableMap /** * Deletes all rows from the accessory table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -410,11 +412,11 @@ class AccessoryTableMap extends TableMap /** * Performs an INSERT on the database, given a Accessory or Criteria object. * - * @param mixed $criteria Criteria or Accessory object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Accessory object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -432,6 +434,7 @@ class AccessoryTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AccessoryTableMap::ID.')'); } + // Set the correct dbName $query = AccessoryQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AddressTableMap.php b/core/lib/Thelia/Model/Map/AddressTableMap.php index a1bbbee59..a85353a10 100644 --- a/core/lib/Thelia/Model/Map/AddressTableMap.php +++ b/core/lib/Thelia/Model/Map/AddressTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Address; use Thelia\Model\AddressQuery; + /** * This class defines the structure of the 'address' table. * @@ -264,7 +265,7 @@ class AddressTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -284,12 +285,13 @@ class AddressTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -305,8 +307,8 @@ class AddressTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -323,8 +325,8 @@ class AddressTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Address object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Address object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -348,10 +350,10 @@ class AddressTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -384,10 +386,10 @@ class AddressTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -437,7 +439,7 @@ class AddressTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -458,13 +460,13 @@ class AddressTableMap extends TableMap /** * Performs a DELETE on the database, given a Address or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Address object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Address object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -497,8 +499,8 @@ class AddressTableMap extends TableMap /** * Deletes all rows from the address table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -508,11 +510,11 @@ class AddressTableMap extends TableMap /** * Performs an INSERT on the database, given a Address or Criteria object. * - * @param mixed $criteria Criteria or Address object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Address object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -530,6 +532,7 @@ class AddressTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AddressTableMap::ID.')'); } + // Set the correct dbName $query = AddressQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AdminLogTableMap.php b/core/lib/Thelia/Model/Map/AdminLogTableMap.php index db2b22b0a..5da91b3ee 100644 --- a/core/lib/Thelia/Model/Map/AdminLogTableMap.php +++ b/core/lib/Thelia/Model/Map/AdminLogTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\AdminLog; use Thelia\Model\AdminLogQuery; + /** * This class defines the structure of the 'admin_log' table. * @@ -211,7 +212,7 @@ class AdminLogTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -231,12 +232,13 @@ class AdminLogTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -252,8 +254,8 @@ class AdminLogTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -270,8 +272,8 @@ class AdminLogTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (AdminLog object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (AdminLog object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -295,10 +297,10 @@ class AdminLogTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -331,10 +333,10 @@ class AdminLogTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -368,7 +370,7 @@ class AdminLogTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -389,13 +391,13 @@ class AdminLogTableMap extends TableMap /** * Performs a DELETE on the database, given a AdminLog or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AdminLog object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AdminLog object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -428,8 +430,8 @@ class AdminLogTableMap extends TableMap /** * Deletes all rows from the admin_log table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -439,11 +441,11 @@ class AdminLogTableMap extends TableMap /** * Performs an INSERT on the database, given a AdminLog or Criteria object. * - * @param mixed $criteria Criteria or AdminLog object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or AdminLog object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -461,6 +463,7 @@ class AdminLogTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AdminLogTableMap::ID.')'); } + // Set the correct dbName $query = AdminLogQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AdminTableMap.php b/core/lib/Thelia/Model/Map/AdminTableMap.php index 5191e1315..2010f9a9c 100644 --- a/core/lib/Thelia/Model/Map/AdminTableMap.php +++ b/core/lib/Thelia/Model/Map/AdminTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Admin; use Thelia\Model\AdminQuery; + /** * This class defines the structure of the 'admin' table. * @@ -230,7 +231,7 @@ class AdminTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -250,12 +251,13 @@ class AdminTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -271,8 +273,8 @@ class AdminTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -289,8 +291,8 @@ class AdminTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Admin object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Admin object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -314,10 +316,10 @@ class AdminTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -350,10 +352,10 @@ class AdminTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -393,7 +395,7 @@ class AdminTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -414,13 +416,13 @@ class AdminTableMap extends TableMap /** * Performs a DELETE on the database, given a Admin or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Admin object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Admin object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -453,8 +455,8 @@ class AdminTableMap extends TableMap /** * Deletes all rows from the admin table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -464,11 +466,11 @@ class AdminTableMap extends TableMap /** * Performs an INSERT on the database, given a Admin or Criteria object. * - * @param mixed $criteria Criteria or Admin object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Admin object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -486,6 +488,7 @@ class AdminTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AdminTableMap::ID.')'); } + // Set the correct dbName $query = AdminQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php b/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php index 7ebfe43db..ac064bc17 100644 --- a/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php +++ b/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\AreaDeliveryModule; use Thelia\Model\AreaDeliveryModuleQuery; + /** * This class defines the structure of the 'area_delivery_module' table. * @@ -183,7 +184,7 @@ class AreaDeliveryModuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -203,12 +204,13 @@ class AreaDeliveryModuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -224,8 +226,8 @@ class AreaDeliveryModuleTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -242,8 +244,8 @@ class AreaDeliveryModuleTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (AreaDeliveryModule object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (AreaDeliveryModule object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -267,10 +269,10 @@ class AreaDeliveryModuleTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -303,10 +305,10 @@ class AreaDeliveryModuleTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -330,7 +332,7 @@ class AreaDeliveryModuleTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -351,13 +353,13 @@ class AreaDeliveryModuleTableMap extends TableMap /** * Performs a DELETE on the database, given a AreaDeliveryModule or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AreaDeliveryModule object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AreaDeliveryModule object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -390,8 +392,8 @@ class AreaDeliveryModuleTableMap extends TableMap /** * Deletes all rows from the area_delivery_module table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -401,11 +403,11 @@ class AreaDeliveryModuleTableMap extends TableMap /** * Performs an INSERT on the database, given a AreaDeliveryModule or Criteria object. * - * @param mixed $criteria Criteria or AreaDeliveryModule object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or AreaDeliveryModule object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -423,6 +425,7 @@ class AreaDeliveryModuleTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AreaDeliveryModuleTableMap::ID.')'); } + // Set the correct dbName $query = AreaDeliveryModuleQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AreaTableMap.php b/core/lib/Thelia/Model/Map/AreaTableMap.php index 90557587a..1c0bfee4f 100644 --- a/core/lib/Thelia/Model/Map/AreaTableMap.php +++ b/core/lib/Thelia/Model/Map/AreaTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Area; use Thelia\Model\AreaQuery; + /** * This class defines the structure of the 'area' table. * @@ -193,7 +194,7 @@ class AreaTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -213,12 +214,13 @@ class AreaTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -234,8 +236,8 @@ class AreaTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -252,8 +254,8 @@ class AreaTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Area object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Area object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -277,10 +279,10 @@ class AreaTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -313,10 +315,10 @@ class AreaTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -340,7 +342,7 @@ class AreaTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -361,13 +363,13 @@ class AreaTableMap extends TableMap /** * Performs a DELETE on the database, given a Area or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Area object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Area object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -400,8 +402,8 @@ class AreaTableMap extends TableMap /** * Deletes all rows from the area table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -411,11 +413,11 @@ class AreaTableMap extends TableMap /** * Performs an INSERT on the database, given a Area or Criteria object. * - * @param mixed $criteria Criteria or Area object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Area object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -433,6 +435,7 @@ class AreaTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AreaTableMap::ID.')'); } + // Set the correct dbName $query = AreaQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php b/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php index d0eb59dc8..041fa5b07 100644 --- a/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\AttributeAvI18n; use Thelia\Model\AttributeAvI18nQuery; + /** * This class defines the structure of the 'attribute_av_i18n' table. * @@ -175,7 +176,7 @@ class AttributeAvI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\AttributeAvI18n $obj A \Thelia\Model\AttributeAvI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class AttributeAvI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class AttributeAvI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class AttributeAvI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class AttributeAvI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (AttributeAvI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (AttributeAvI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class AttributeAvI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class AttributeAvI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class AttributeAvI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class AttributeAvI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a AttributeAvI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AttributeAvI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AttributeAvI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class AttributeAvI18nTableMap extends TableMap /** * Deletes all rows from the attribute_av_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class AttributeAvI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a AttributeAvI18n or Criteria object. * - * @param mixed $criteria Criteria or AttributeAvI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or AttributeAvI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class AttributeAvI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from AttributeAvI18n object } + // Set the correct dbName $query = AttributeAvI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AttributeAvTableMap.php b/core/lib/Thelia/Model/Map/AttributeAvTableMap.php index 88cd17550..1064fb94b 100644 --- a/core/lib/Thelia/Model/Map/AttributeAvTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeAvTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\AttributeAv; use Thelia\Model\AttributeAvQuery; + /** * This class defines the structure of the 'attribute_av' table. * @@ -204,7 +205,7 @@ class AttributeAvTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -224,12 +225,13 @@ class AttributeAvTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -245,8 +247,8 @@ class AttributeAvTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -263,8 +265,8 @@ class AttributeAvTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (AttributeAv object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (AttributeAv object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -288,10 +290,10 @@ class AttributeAvTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -324,10 +326,10 @@ class AttributeAvTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -351,7 +353,7 @@ class AttributeAvTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -372,13 +374,13 @@ class AttributeAvTableMap extends TableMap /** * Performs a DELETE on the database, given a AttributeAv or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AttributeAv object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AttributeAv object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -411,8 +413,8 @@ class AttributeAvTableMap extends TableMap /** * Deletes all rows from the attribute_av table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -422,11 +424,11 @@ class AttributeAvTableMap extends TableMap /** * Performs an INSERT on the database, given a AttributeAv or Criteria object. * - * @param mixed $criteria Criteria or AttributeAv object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or AttributeAv object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -444,6 +446,7 @@ class AttributeAvTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AttributeAvTableMap::ID.')'); } + // Set the correct dbName $query = AttributeAvQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php b/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php index cc8dfd655..0881dccc4 100644 --- a/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\AttributeCombination; use Thelia\Model\AttributeCombinationQuery; + /** * This class defines the structure of the 'attribute_combination' table. * @@ -184,7 +185,7 @@ class AttributeCombinationTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\AttributeCombination $obj A \Thelia\Model\AttributeCombination object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -237,7 +238,7 @@ class AttributeCombinationTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -257,12 +258,13 @@ class AttributeCombinationTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -274,8 +276,8 @@ class AttributeCombinationTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -292,8 +294,8 @@ class AttributeCombinationTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (AttributeCombination object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (AttributeCombination object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -317,10 +319,10 @@ class AttributeCombinationTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -353,10 +355,10 @@ class AttributeCombinationTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -380,7 +382,7 @@ class AttributeCombinationTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -401,13 +403,13 @@ class AttributeCombinationTableMap extends TableMap /** * Performs a DELETE on the database, given a AttributeCombination or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AttributeCombination object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AttributeCombination object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -451,8 +453,8 @@ class AttributeCombinationTableMap extends TableMap /** * Deletes all rows from the attribute_combination table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -462,11 +464,11 @@ class AttributeCombinationTableMap extends TableMap /** * Performs an INSERT on the database, given a AttributeCombination or Criteria object. * - * @param mixed $criteria Criteria or AttributeCombination object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or AttributeCombination object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -480,6 +482,7 @@ class AttributeCombinationTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from AttributeCombination object } + // Set the correct dbName $query = AttributeCombinationQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php b/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php index c392f9e56..1b4059076 100644 --- a/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\AttributeI18n; use Thelia\Model\AttributeI18nQuery; + /** * This class defines the structure of the 'attribute_i18n' table. * @@ -175,7 +176,7 @@ class AttributeI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\AttributeI18n $obj A \Thelia\Model\AttributeI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class AttributeI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class AttributeI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class AttributeI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class AttributeI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (AttributeI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (AttributeI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class AttributeI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class AttributeI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class AttributeI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class AttributeI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a AttributeI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AttributeI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AttributeI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class AttributeI18nTableMap extends TableMap /** * Deletes all rows from the attribute_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class AttributeI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a AttributeI18n or Criteria object. * - * @param mixed $criteria Criteria or AttributeI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or AttributeI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class AttributeI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from AttributeI18n object } + // Set the correct dbName $query = AttributeI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AttributeTableMap.php b/core/lib/Thelia/Model/Map/AttributeTableMap.php index 828c93680..e7aae7f83 100644 --- a/core/lib/Thelia/Model/Map/AttributeTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Attribute; use Thelia\Model\AttributeQuery; + /** * This class defines the structure of the 'attribute' table. * @@ -202,7 +203,7 @@ class AttributeTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -222,12 +223,13 @@ class AttributeTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -243,8 +245,8 @@ class AttributeTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -261,8 +263,8 @@ class AttributeTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Attribute object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Attribute object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -286,10 +288,10 @@ class AttributeTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -322,10 +324,10 @@ class AttributeTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -347,7 +349,7 @@ class AttributeTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -368,13 +370,13 @@ class AttributeTableMap extends TableMap /** * Performs a DELETE on the database, given a Attribute or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Attribute object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Attribute object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -407,8 +409,8 @@ class AttributeTableMap extends TableMap /** * Deletes all rows from the attribute table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -418,11 +420,11 @@ class AttributeTableMap extends TableMap /** * Performs an INSERT on the database, given a Attribute or Criteria object. * - * @param mixed $criteria Criteria or Attribute object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Attribute object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -440,6 +442,7 @@ class AttributeTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AttributeTableMap::ID.')'); } + // Set the correct dbName $query = AttributeQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php b/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php index 49e2bf16f..f3a6823ea 100644 --- a/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\AttributeTemplate; use Thelia\Model\AttributeTemplateQuery; + /** * This class defines the structure of the 'attribute_template' table. * @@ -190,7 +191,7 @@ class AttributeTemplateTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -210,12 +211,13 @@ class AttributeTemplateTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -231,8 +233,8 @@ class AttributeTemplateTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -249,8 +251,8 @@ class AttributeTemplateTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (AttributeTemplate object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (AttributeTemplate object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -274,10 +276,10 @@ class AttributeTemplateTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -310,10 +312,10 @@ class AttributeTemplateTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -339,7 +341,7 @@ class AttributeTemplateTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -360,13 +362,13 @@ class AttributeTemplateTableMap extends TableMap /** * Performs a DELETE on the database, given a AttributeTemplate or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AttributeTemplate object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AttributeTemplate object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -399,8 +401,8 @@ class AttributeTemplateTableMap extends TableMap /** * Deletes all rows from the attribute_template table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -410,11 +412,11 @@ class AttributeTemplateTableMap extends TableMap /** * Performs an INSERT on the database, given a AttributeTemplate or Criteria object. * - * @param mixed $criteria Criteria or AttributeTemplate object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or AttributeTemplate object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -432,6 +434,7 @@ class AttributeTemplateTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.AttributeTemplateTableMap::ID.')'); } + // Set the correct dbName $query = AttributeTemplateQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CartItemTableMap.php b/core/lib/Thelia/Model/Map/CartItemTableMap.php index 246b919b5..ab5a188da 100644 --- a/core/lib/Thelia/Model/Map/CartItemTableMap.php +++ b/core/lib/Thelia/Model/Map/CartItemTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CartItem; use Thelia\Model\CartItemQuery; + /** * This class defines the structure of the 'cart_item' table. * @@ -220,7 +221,7 @@ class CartItemTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -240,12 +241,13 @@ class CartItemTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -261,8 +263,8 @@ class CartItemTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -279,8 +281,8 @@ class CartItemTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CartItem object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CartItem object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -304,10 +306,10 @@ class CartItemTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -340,10 +342,10 @@ class CartItemTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -379,7 +381,7 @@ class CartItemTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -400,13 +402,13 @@ class CartItemTableMap extends TableMap /** * Performs a DELETE on the database, given a CartItem or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CartItem object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CartItem object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -439,8 +441,8 @@ class CartItemTableMap extends TableMap /** * Deletes all rows from the cart_item table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -450,11 +452,11 @@ class CartItemTableMap extends TableMap /** * Performs an INSERT on the database, given a CartItem or Criteria object. * - * @param mixed $criteria Criteria or CartItem object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CartItem object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class CartItemTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CartItemTableMap::ID.')'); } + // Set the correct dbName $query = CartItemQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CartTableMap.php b/core/lib/Thelia/Model/Map/CartTableMap.php index 56b12ad81..7769c721e 100644 --- a/core/lib/Thelia/Model/Map/CartTableMap.php +++ b/core/lib/Thelia/Model/Map/CartTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Cart; use Thelia\Model\CartQuery; + /** * This class defines the structure of the 'cart' table. * @@ -219,7 +220,7 @@ class CartTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -239,12 +240,13 @@ class CartTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -260,8 +262,8 @@ class CartTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -278,8 +280,8 @@ class CartTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Cart object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Cart object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -303,10 +305,10 @@ class CartTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -339,10 +341,10 @@ class CartTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -374,7 +376,7 @@ class CartTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -395,13 +397,13 @@ class CartTableMap extends TableMap /** * Performs a DELETE on the database, given a Cart or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Cart object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Cart object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -434,8 +436,8 @@ class CartTableMap extends TableMap /** * Deletes all rows from the cart table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -445,11 +447,11 @@ class CartTableMap extends TableMap /** * Performs an INSERT on the database, given a Cart or Criteria object. * - * @param mixed $criteria Criteria or Cart object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Cart object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -467,6 +469,7 @@ class CartTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CartTableMap::ID.')'); } + // Set the correct dbName $query = CartQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php b/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php index 20726e88b..f761d3a54 100644 --- a/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CategoryAssociatedContent; use Thelia\Model\CategoryAssociatedContentQuery; + /** * This class defines the structure of the 'category_associated_content' table. * @@ -189,7 +190,7 @@ class CategoryAssociatedContentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -209,12 +210,13 @@ class CategoryAssociatedContentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -230,8 +232,8 @@ class CategoryAssociatedContentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -248,8 +250,8 @@ class CategoryAssociatedContentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CategoryAssociatedContent object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CategoryAssociatedContent object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -273,10 +275,10 @@ class CategoryAssociatedContentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -309,10 +311,10 @@ class CategoryAssociatedContentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -338,7 +340,7 @@ class CategoryAssociatedContentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -359,13 +361,13 @@ class CategoryAssociatedContentTableMap extends TableMap /** * Performs a DELETE on the database, given a CategoryAssociatedContent or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CategoryAssociatedContent object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CategoryAssociatedContent object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -398,8 +400,8 @@ class CategoryAssociatedContentTableMap extends TableMap /** * Deletes all rows from the category_associated_content table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -409,11 +411,11 @@ class CategoryAssociatedContentTableMap extends TableMap /** * Performs an INSERT on the database, given a CategoryAssociatedContent or Criteria object. * - * @param mixed $criteria Criteria or CategoryAssociatedContent object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CategoryAssociatedContent object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -431,6 +433,7 @@ class CategoryAssociatedContentTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CategoryAssociatedContentTableMap::ID.')'); } + // Set the correct dbName $query = CategoryAssociatedContentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php index c41d4a943..3ba1d060f 100644 --- a/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CategoryDocumentI18n; use Thelia\Model\CategoryDocumentI18nQuery; + /** * This class defines the structure of the 'category_document_i18n' table. * @@ -175,7 +176,7 @@ class CategoryDocumentI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CategoryDocumentI18n $obj A \Thelia\Model\CategoryDocumentI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class CategoryDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class CategoryDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class CategoryDocumentI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class CategoryDocumentI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CategoryDocumentI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CategoryDocumentI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class CategoryDocumentI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class CategoryDocumentI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class CategoryDocumentI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class CategoryDocumentI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a CategoryDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CategoryDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CategoryDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class CategoryDocumentI18nTableMap extends TableMap /** * Deletes all rows from the category_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class CategoryDocumentI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a CategoryDocumentI18n or Criteria object. * - * @param mixed $criteria Criteria or CategoryDocumentI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CategoryDocumentI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class CategoryDocumentI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CategoryDocumentI18n object } + // Set the correct dbName $query = CategoryDocumentI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php b/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php index 97c903299..c0e1970c3 100644 --- a/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CategoryDocument; use Thelia\Model\CategoryDocumentQuery; + /** * This class defines the structure of the 'category_document' table. * @@ -208,7 +209,7 @@ class CategoryDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class CategoryDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class CategoryDocumentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class CategoryDocumentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CategoryDocument object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CategoryDocument object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class CategoryDocumentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class CategoryDocumentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class CategoryDocumentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class CategoryDocumentTableMap extends TableMap /** * Performs a DELETE on the database, given a CategoryDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CategoryDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CategoryDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class CategoryDocumentTableMap extends TableMap /** * Deletes all rows from the category_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class CategoryDocumentTableMap extends TableMap /** * Performs an INSERT on the database, given a CategoryDocument or Criteria object. * - * @param mixed $criteria Criteria or CategoryDocument object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CategoryDocument object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class CategoryDocumentTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CategoryDocumentTableMap::ID.')'); } + // Set the correct dbName $query = CategoryDocumentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php index 3431d5703..ebfdefbcd 100644 --- a/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CategoryI18n; use Thelia\Model\CategoryI18nQuery; + /** * This class defines the structure of the 'category_i18n' table. * @@ -193,7 +194,7 @@ class CategoryI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CategoryI18n $obj A \Thelia\Model\CategoryI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -246,7 +247,7 @@ class CategoryI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -266,12 +267,13 @@ class CategoryI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -283,8 +285,8 @@ class CategoryI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class CategoryI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CategoryI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CategoryI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class CategoryI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class CategoryI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -397,7 +399,7 @@ class CategoryI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -418,13 +420,13 @@ class CategoryI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a CategoryI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CategoryI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CategoryI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -467,8 +469,8 @@ class CategoryI18nTableMap extends TableMap /** * Deletes all rows from the category_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -478,11 +480,11 @@ class CategoryI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a CategoryI18n or Criteria object. * - * @param mixed $criteria Criteria or CategoryI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CategoryI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -496,6 +498,7 @@ class CategoryI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CategoryI18n object } + // Set the correct dbName $query = CategoryI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php index 1faea04f8..38c456f46 100644 --- a/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CategoryImageI18n; use Thelia\Model\CategoryImageI18nQuery; + /** * This class defines the structure of the 'category_image_i18n' table. * @@ -175,7 +176,7 @@ class CategoryImageI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CategoryImageI18n $obj A \Thelia\Model\CategoryImageI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class CategoryImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class CategoryImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class CategoryImageI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class CategoryImageI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CategoryImageI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CategoryImageI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class CategoryImageI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class CategoryImageI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class CategoryImageI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class CategoryImageI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a CategoryImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CategoryImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CategoryImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class CategoryImageI18nTableMap extends TableMap /** * Deletes all rows from the category_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class CategoryImageI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a CategoryImageI18n or Criteria object. * - * @param mixed $criteria Criteria or CategoryImageI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CategoryImageI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class CategoryImageI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CategoryImageI18n object } + // Set the correct dbName $query = CategoryImageI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryImageTableMap.php b/core/lib/Thelia/Model/Map/CategoryImageTableMap.php index 2de7ffdb4..c6199c978 100644 --- a/core/lib/Thelia/Model/Map/CategoryImageTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryImageTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CategoryImage; use Thelia\Model\CategoryImageQuery; + /** * This class defines the structure of the 'category_image' table. * @@ -208,7 +209,7 @@ class CategoryImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class CategoryImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class CategoryImageTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class CategoryImageTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CategoryImage object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CategoryImage object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class CategoryImageTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class CategoryImageTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class CategoryImageTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class CategoryImageTableMap extends TableMap /** * Performs a DELETE on the database, given a CategoryImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CategoryImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CategoryImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class CategoryImageTableMap extends TableMap /** * Deletes all rows from the category_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class CategoryImageTableMap extends TableMap /** * Performs an INSERT on the database, given a CategoryImage or Criteria object. * - * @param mixed $criteria Criteria or CategoryImage object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CategoryImage object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class CategoryImageTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CategoryImageTableMap::ID.')'); } + // Set the correct dbName $query = CategoryImageQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryTableMap.php b/core/lib/Thelia/Model/Map/CategoryTableMap.php index 62665baac..19c7486cb 100644 --- a/core/lib/Thelia/Model/Map/CategoryTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Category; use Thelia\Model\CategoryQuery; + /** * This class defines the structure of the 'category' table. * @@ -237,7 +238,7 @@ class CategoryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -257,12 +258,13 @@ class CategoryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -278,8 +280,8 @@ class CategoryTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -296,8 +298,8 @@ class CategoryTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Category object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Category object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -321,10 +323,10 @@ class CategoryTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -357,10 +359,10 @@ class CategoryTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -392,7 +394,7 @@ class CategoryTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -413,13 +415,13 @@ class CategoryTableMap extends TableMap /** * Performs a DELETE on the database, given a Category or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Category object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Category object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -452,8 +454,8 @@ class CategoryTableMap extends TableMap /** * Deletes all rows from the category table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -463,11 +465,11 @@ class CategoryTableMap extends TableMap /** * Performs an INSERT on the database, given a Category or Criteria object. * - * @param mixed $criteria Criteria or Category object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Category object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -485,6 +487,7 @@ class CategoryTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CategoryTableMap::ID.')'); } + // Set the correct dbName $query = CategoryQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php b/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php index 3734030d9..0d9cd2180 100644 --- a/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CategoryVersion; use Thelia\Model\CategoryVersionQuery; + /** * This class defines the structure of the 'category_version' table. * @@ -193,7 +194,7 @@ class CategoryVersionTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CategoryVersion $obj A \Thelia\Model\CategoryVersion object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -246,7 +247,7 @@ class CategoryVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -266,12 +267,13 @@ class CategoryVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -283,8 +285,8 @@ class CategoryVersionTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class CategoryVersionTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CategoryVersion object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CategoryVersion object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class CategoryVersionTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class CategoryVersionTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -397,7 +399,7 @@ class CategoryVersionTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -418,13 +420,13 @@ class CategoryVersionTableMap extends TableMap /** * Performs a DELETE on the database, given a CategoryVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CategoryVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CategoryVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -467,8 +469,8 @@ class CategoryVersionTableMap extends TableMap /** * Deletes all rows from the category_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -478,11 +480,11 @@ class CategoryVersionTableMap extends TableMap /** * Performs an INSERT on the database, given a CategoryVersion or Criteria object. * - * @param mixed $criteria Criteria or CategoryVersion object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CategoryVersion object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -496,6 +498,7 @@ class CategoryVersionTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CategoryVersion object } + // Set the correct dbName $query = CategoryVersionQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php b/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php index 577e8fd76..0c759e497 100644 --- a/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ConfigI18n; use Thelia\Model\ConfigI18nQuery; + /** * This class defines the structure of the 'config_i18n' table. * @@ -175,7 +176,7 @@ class ConfigI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ConfigI18n $obj A \Thelia\Model\ConfigI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ConfigI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ConfigI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ConfigI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ConfigI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ConfigI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ConfigI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ConfigI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ConfigI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ConfigI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ConfigI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ConfigI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ConfigI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ConfigI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ConfigI18nTableMap extends TableMap /** * Deletes all rows from the config_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ConfigI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ConfigI18n or Criteria object. * - * @param mixed $criteria Criteria or ConfigI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ConfigI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ConfigI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ConfigI18n object } + // Set the correct dbName $query = ConfigI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ConfigTableMap.php b/core/lib/Thelia/Model/Map/ConfigTableMap.php index 4486273d4..0d8271134 100644 --- a/core/lib/Thelia/Model/Map/ConfigTableMap.php +++ b/core/lib/Thelia/Model/Map/ConfigTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Config; use Thelia\Model\ConfigQuery; + /** * This class defines the structure of the 'config' table. * @@ -213,7 +214,7 @@ class ConfigTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -233,12 +234,13 @@ class ConfigTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -254,8 +256,8 @@ class ConfigTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -272,8 +274,8 @@ class ConfigTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Config object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Config object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -297,10 +299,10 @@ class ConfigTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -333,10 +335,10 @@ class ConfigTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -364,7 +366,7 @@ class ConfigTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -385,13 +387,13 @@ class ConfigTableMap extends TableMap /** * Performs a DELETE on the database, given a Config or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Config object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Config object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -424,8 +426,8 @@ class ConfigTableMap extends TableMap /** * Deletes all rows from the config table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -435,11 +437,11 @@ class ConfigTableMap extends TableMap /** * Performs an INSERT on the database, given a Config or Criteria object. * - * @param mixed $criteria Criteria or Config object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Config object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -457,6 +459,7 @@ class ConfigTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ConfigTableMap::ID.')'); } + // Set the correct dbName $query = ConfigQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php index ed503421b..efaad427c 100644 --- a/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ContentDocumentI18n; use Thelia\Model\ContentDocumentI18nQuery; + /** * This class defines the structure of the 'content_document_i18n' table. * @@ -175,7 +176,7 @@ class ContentDocumentI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ContentDocumentI18n $obj A \Thelia\Model\ContentDocumentI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ContentDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ContentDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ContentDocumentI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ContentDocumentI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ContentDocumentI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ContentDocumentI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ContentDocumentI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ContentDocumentI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ContentDocumentI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ContentDocumentI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ContentDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ContentDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ContentDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ContentDocumentI18nTableMap extends TableMap /** * Deletes all rows from the content_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ContentDocumentI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ContentDocumentI18n or Criteria object. * - * @param mixed $criteria Criteria or ContentDocumentI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ContentDocumentI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ContentDocumentI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ContentDocumentI18n object } + // Set the correct dbName $query = ContentDocumentI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php b/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php index b4cbf2abd..4e2cf4000 100644 --- a/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ContentDocument; use Thelia\Model\ContentDocumentQuery; + /** * This class defines the structure of the 'content_document' table. * @@ -208,7 +209,7 @@ class ContentDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class ContentDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class ContentDocumentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class ContentDocumentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ContentDocument object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ContentDocument object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class ContentDocumentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class ContentDocumentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class ContentDocumentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class ContentDocumentTableMap extends TableMap /** * Performs a DELETE on the database, given a ContentDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ContentDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ContentDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class ContentDocumentTableMap extends TableMap /** * Deletes all rows from the content_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class ContentDocumentTableMap extends TableMap /** * Performs an INSERT on the database, given a ContentDocument or Criteria object. * - * @param mixed $criteria Criteria or ContentDocument object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ContentDocument object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class ContentDocumentTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ContentDocumentTableMap::ID.')'); } + // Set the correct dbName $query = ContentDocumentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentFolderTableMap.php b/core/lib/Thelia/Model/Map/ContentFolderTableMap.php index ca69b4986..459f8f959 100644 --- a/core/lib/Thelia/Model/Map/ContentFolderTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentFolderTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ContentFolder; use Thelia\Model\ContentFolderQuery; + /** * This class defines the structure of the 'content_folder' table. * @@ -184,7 +185,7 @@ class ContentFolderTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ContentFolder $obj A \Thelia\Model\ContentFolder object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -237,7 +238,7 @@ class ContentFolderTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -257,12 +258,13 @@ class ContentFolderTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -274,8 +276,8 @@ class ContentFolderTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -292,8 +294,8 @@ class ContentFolderTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ContentFolder object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ContentFolder object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -317,10 +319,10 @@ class ContentFolderTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -353,10 +355,10 @@ class ContentFolderTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -380,7 +382,7 @@ class ContentFolderTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -401,13 +403,13 @@ class ContentFolderTableMap extends TableMap /** * Performs a DELETE on the database, given a ContentFolder or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ContentFolder object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ContentFolder object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -450,8 +452,8 @@ class ContentFolderTableMap extends TableMap /** * Deletes all rows from the content_folder table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -461,11 +463,11 @@ class ContentFolderTableMap extends TableMap /** * Performs an INSERT on the database, given a ContentFolder or Criteria object. * - * @param mixed $criteria Criteria or ContentFolder object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ContentFolder object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -479,6 +481,7 @@ class ContentFolderTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ContentFolder object } + // Set the correct dbName $query = ContentFolderQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentI18nTableMap.php index 0f6aba2d6..703c7c902 100644 --- a/core/lib/Thelia/Model/Map/ContentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ContentI18n; use Thelia\Model\ContentI18nQuery; + /** * This class defines the structure of the 'content_i18n' table. * @@ -193,7 +194,7 @@ class ContentI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ContentI18n $obj A \Thelia\Model\ContentI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -246,7 +247,7 @@ class ContentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -266,12 +267,13 @@ class ContentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -283,8 +285,8 @@ class ContentI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class ContentI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ContentI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ContentI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class ContentI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class ContentI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -397,7 +399,7 @@ class ContentI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -418,13 +420,13 @@ class ContentI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ContentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ContentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ContentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -467,8 +469,8 @@ class ContentI18nTableMap extends TableMap /** * Deletes all rows from the content_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -478,11 +480,11 @@ class ContentI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ContentI18n or Criteria object. * - * @param mixed $criteria Criteria or ContentI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ContentI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -496,6 +498,7 @@ class ContentI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ContentI18n object } + // Set the correct dbName $query = ContentI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php index ee0c50b5d..f95f9f048 100644 --- a/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ContentImageI18n; use Thelia\Model\ContentImageI18nQuery; + /** * This class defines the structure of the 'content_image_i18n' table. * @@ -175,7 +176,7 @@ class ContentImageI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ContentImageI18n $obj A \Thelia\Model\ContentImageI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ContentImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ContentImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ContentImageI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ContentImageI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ContentImageI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ContentImageI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ContentImageI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ContentImageI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ContentImageI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ContentImageI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ContentImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ContentImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ContentImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ContentImageI18nTableMap extends TableMap /** * Deletes all rows from the content_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ContentImageI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ContentImageI18n or Criteria object. * - * @param mixed $criteria Criteria or ContentImageI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ContentImageI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ContentImageI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ContentImageI18n object } + // Set the correct dbName $query = ContentImageI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentImageTableMap.php b/core/lib/Thelia/Model/Map/ContentImageTableMap.php index 35611d524..8494b354f 100644 --- a/core/lib/Thelia/Model/Map/ContentImageTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentImageTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ContentImage; use Thelia\Model\ContentImageQuery; + /** * This class defines the structure of the 'content_image' table. * @@ -208,7 +209,7 @@ class ContentImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class ContentImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class ContentImageTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class ContentImageTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ContentImage object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ContentImage object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class ContentImageTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class ContentImageTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class ContentImageTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class ContentImageTableMap extends TableMap /** * Performs a DELETE on the database, given a ContentImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ContentImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ContentImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class ContentImageTableMap extends TableMap /** * Deletes all rows from the content_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class ContentImageTableMap extends TableMap /** * Performs an INSERT on the database, given a ContentImage or Criteria object. * - * @param mixed $criteria Criteria or ContentImage object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ContentImage object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class ContentImageTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ContentImageTableMap::ID.')'); } + // Set the correct dbName $query = ContentImageQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentTableMap.php b/core/lib/Thelia/Model/Map/ContentTableMap.php index 0b253acb2..0f3b056c6 100644 --- a/core/lib/Thelia/Model/Map/ContentTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Content; use Thelia\Model\ContentQuery; + /** * This class defines the structure of the 'content' table. * @@ -233,7 +234,7 @@ class ContentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -253,12 +254,13 @@ class ContentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -274,8 +276,8 @@ class ContentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -292,8 +294,8 @@ class ContentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Content object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Content object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -317,10 +319,10 @@ class ContentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -353,10 +355,10 @@ class ContentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -386,7 +388,7 @@ class ContentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -407,13 +409,13 @@ class ContentTableMap extends TableMap /** * Performs a DELETE on the database, given a Content or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Content object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Content object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -446,8 +448,8 @@ class ContentTableMap extends TableMap /** * Deletes all rows from the content table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -457,11 +459,11 @@ class ContentTableMap extends TableMap /** * Performs an INSERT on the database, given a Content or Criteria object. * - * @param mixed $criteria Criteria or Content object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Content object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -479,6 +481,7 @@ class ContentTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ContentTableMap::ID.')'); } + // Set the correct dbName $query = ContentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ContentVersionTableMap.php b/core/lib/Thelia/Model/Map/ContentVersionTableMap.php index e8c8c8ac6..4c0d7a1b8 100644 --- a/core/lib/Thelia/Model/Map/ContentVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentVersionTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ContentVersion; use Thelia\Model\ContentVersionQuery; + /** * This class defines the structure of the 'content_version' table. * @@ -187,7 +188,7 @@ class ContentVersionTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ContentVersion $obj A \Thelia\Model\ContentVersion object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -240,7 +241,7 @@ class ContentVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -260,12 +261,13 @@ class ContentVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -277,8 +279,8 @@ class ContentVersionTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -295,8 +297,8 @@ class ContentVersionTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ContentVersion object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ContentVersion object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -320,10 +322,10 @@ class ContentVersionTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -356,10 +358,10 @@ class ContentVersionTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -389,7 +391,7 @@ class ContentVersionTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -410,13 +412,13 @@ class ContentVersionTableMap extends TableMap /** * Performs a DELETE on the database, given a ContentVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ContentVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ContentVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -459,8 +461,8 @@ class ContentVersionTableMap extends TableMap /** * Deletes all rows from the content_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -470,11 +472,11 @@ class ContentVersionTableMap extends TableMap /** * Performs an INSERT on the database, given a ContentVersion or Criteria object. * - * @param mixed $criteria Criteria or ContentVersion object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ContentVersion object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -488,6 +490,7 @@ class ContentVersionTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ContentVersion object } + // Set the correct dbName $query = ContentVersionQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CountryI18nTableMap.php b/core/lib/Thelia/Model/Map/CountryI18nTableMap.php index 02d8d0095..d34589486 100644 --- a/core/lib/Thelia/Model/Map/CountryI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CountryI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CountryI18n; use Thelia\Model\CountryI18nQuery; + /** * This class defines the structure of the 'country_i18n' table. * @@ -175,7 +176,7 @@ class CountryI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CountryI18n $obj A \Thelia\Model\CountryI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class CountryI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class CountryI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class CountryI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class CountryI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CountryI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CountryI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class CountryI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class CountryI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class CountryI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class CountryI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a CountryI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CountryI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CountryI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class CountryI18nTableMap extends TableMap /** * Deletes all rows from the country_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class CountryI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a CountryI18n or Criteria object. * - * @param mixed $criteria Criteria or CountryI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CountryI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class CountryI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CountryI18n object } + // Set the correct dbName $query = CountryI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CountryTableMap.php b/core/lib/Thelia/Model/Map/CountryTableMap.php index 2906b5d0f..8ec8e5999 100644 --- a/core/lib/Thelia/Model/Map/CountryTableMap.php +++ b/core/lib/Thelia/Model/Map/CountryTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Country; use Thelia\Model\CountryQuery; + /** * This class defines the structure of the 'country' table. * @@ -229,7 +230,7 @@ class CountryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -249,12 +250,13 @@ class CountryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -270,8 +272,8 @@ class CountryTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -288,8 +290,8 @@ class CountryTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Country object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Country object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -313,10 +315,10 @@ class CountryTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -349,10 +351,10 @@ class CountryTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -384,7 +386,7 @@ class CountryTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -405,13 +407,13 @@ class CountryTableMap extends TableMap /** * Performs a DELETE on the database, given a Country or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Country object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Country object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -444,8 +446,8 @@ class CountryTableMap extends TableMap /** * Deletes all rows from the country table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -455,11 +457,11 @@ class CountryTableMap extends TableMap /** * Performs an INSERT on the database, given a Country or Criteria object. * - * @param mixed $criteria Criteria or Country object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Country object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -477,6 +479,7 @@ class CountryTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CountryTableMap::ID.')'); } + // Set the correct dbName $query = CountryQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CouponI18nTableMap.php b/core/lib/Thelia/Model/Map/CouponI18nTableMap.php index c4f33389a..6f8d2e938 100644 --- a/core/lib/Thelia/Model/Map/CouponI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CouponI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CouponI18n; use Thelia\Model\CouponI18nQuery; + /** * This class defines the structure of the 'coupon_i18n' table. * @@ -169,7 +170,7 @@ class CouponI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CouponI18n $obj A \Thelia\Model\CouponI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -222,7 +223,7 @@ class CouponI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -242,12 +243,13 @@ class CouponI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -259,8 +261,8 @@ class CouponI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -277,8 +279,8 @@ class CouponI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CouponI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CouponI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -302,10 +304,10 @@ class CouponI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -338,10 +340,10 @@ class CouponI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -365,7 +367,7 @@ class CouponI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -386,13 +388,13 @@ class CouponI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a CouponI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CouponI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CouponI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -435,8 +437,8 @@ class CouponI18nTableMap extends TableMap /** * Deletes all rows from the coupon_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -446,11 +448,11 @@ class CouponI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a CouponI18n or Criteria object. * - * @param mixed $criteria Criteria or CouponI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CouponI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -464,6 +466,7 @@ class CouponI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CouponI18n object } + // Set the correct dbName $query = CouponI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CouponTableMap.php b/core/lib/Thelia/Model/Map/CouponTableMap.php index bfd2b0535..d18038790 100644 --- a/core/lib/Thelia/Model/Map/CouponTableMap.php +++ b/core/lib/Thelia/Model/Map/CouponTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Coupon; use Thelia\Model\CouponQuery; + /** * This class defines the structure of the 'coupon' table. * @@ -264,7 +265,7 @@ class CouponTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -284,12 +285,13 @@ class CouponTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -305,8 +307,8 @@ class CouponTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -323,8 +325,8 @@ class CouponTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Coupon object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Coupon object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -348,10 +350,10 @@ class CouponTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -384,10 +386,10 @@ class CouponTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -431,7 +433,7 @@ class CouponTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -452,13 +454,13 @@ class CouponTableMap extends TableMap /** * Performs a DELETE on the database, given a Coupon or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Coupon object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Coupon object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -491,8 +493,8 @@ class CouponTableMap extends TableMap /** * Deletes all rows from the coupon table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -502,11 +504,11 @@ class CouponTableMap extends TableMap /** * Performs an INSERT on the database, given a Coupon or Criteria object. * - * @param mixed $criteria Criteria or Coupon object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Coupon object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -524,6 +526,7 @@ class CouponTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CouponTableMap::ID.')'); } + // Set the correct dbName $query = CouponQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CouponVersionTableMap.php b/core/lib/Thelia/Model/Map/CouponVersionTableMap.php index 3f58a2231..e111d1682 100644 --- a/core/lib/Thelia/Model/Map/CouponVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/CouponVersionTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CouponVersion; use Thelia\Model\CouponVersionQuery; + /** * This class defines the structure of the 'coupon_version' table. * @@ -229,7 +230,7 @@ class CouponVersionTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CouponVersion $obj A \Thelia\Model\CouponVersion object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -282,7 +283,7 @@ class CouponVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -302,12 +303,13 @@ class CouponVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -319,8 +321,8 @@ class CouponVersionTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -337,8 +339,8 @@ class CouponVersionTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CouponVersion object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CouponVersion object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -362,10 +364,10 @@ class CouponVersionTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -398,10 +400,10 @@ class CouponVersionTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -445,7 +447,7 @@ class CouponVersionTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -466,13 +468,13 @@ class CouponVersionTableMap extends TableMap /** * Performs a DELETE on the database, given a CouponVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CouponVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CouponVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -515,8 +517,8 @@ class CouponVersionTableMap extends TableMap /** * Deletes all rows from the coupon_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -526,11 +528,11 @@ class CouponVersionTableMap extends TableMap /** * Performs an INSERT on the database, given a CouponVersion or Criteria object. * - * @param mixed $criteria Criteria or CouponVersion object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CouponVersion object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -544,6 +546,7 @@ class CouponVersionTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CouponVersion object } + // Set the correct dbName $query = CouponVersionQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php b/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php index f0c68cdfd..3625eea9e 100644 --- a/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CurrencyI18n; use Thelia\Model\CurrencyI18nQuery; + /** * This class defines the structure of the 'currency_i18n' table. * @@ -157,7 +158,7 @@ class CurrencyI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CurrencyI18n $obj A \Thelia\Model\CurrencyI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -210,7 +211,7 @@ class CurrencyI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -230,12 +231,13 @@ class CurrencyI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -247,8 +249,8 @@ class CurrencyI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -265,8 +267,8 @@ class CurrencyI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CurrencyI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CurrencyI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -290,10 +292,10 @@ class CurrencyI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -326,10 +328,10 @@ class CurrencyI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -349,7 +351,7 @@ class CurrencyI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -370,13 +372,13 @@ class CurrencyI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a CurrencyI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CurrencyI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CurrencyI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -419,8 +421,8 @@ class CurrencyI18nTableMap extends TableMap /** * Deletes all rows from the currency_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -430,11 +432,11 @@ class CurrencyI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a CurrencyI18n or Criteria object. * - * @param mixed $criteria Criteria or CurrencyI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CurrencyI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -448,6 +450,7 @@ class CurrencyI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CurrencyI18n object } + // Set the correct dbName $query = CurrencyI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CurrencyTableMap.php b/core/lib/Thelia/Model/Map/CurrencyTableMap.php index d6e3a7d55..61a6fb711 100644 --- a/core/lib/Thelia/Model/Map/CurrencyTableMap.php +++ b/core/lib/Thelia/Model/Map/CurrencyTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Currency; use Thelia\Model\CurrencyQuery; + /** * This class defines the structure of the 'currency' table. * @@ -224,7 +225,7 @@ class CurrencyTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -244,12 +245,13 @@ class CurrencyTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -265,8 +267,8 @@ class CurrencyTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class CurrencyTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Currency object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Currency object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class CurrencyTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class CurrencyTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -377,7 +379,7 @@ class CurrencyTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -398,13 +400,13 @@ class CurrencyTableMap extends TableMap /** * Performs a DELETE on the database, given a Currency or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Currency object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Currency object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -437,8 +439,8 @@ class CurrencyTableMap extends TableMap /** * Deletes all rows from the currency table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -448,11 +450,11 @@ class CurrencyTableMap extends TableMap /** * Performs an INSERT on the database, given a Currency or Criteria object. * - * @param mixed $criteria Criteria or Currency object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Currency object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -470,6 +472,7 @@ class CurrencyTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CurrencyTableMap::ID.')'); } + // Set the correct dbName $query = CurrencyQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CustomerTableMap.php b/core/lib/Thelia/Model/Map/CustomerTableMap.php index 47bac0909..14e14e330 100644 --- a/core/lib/Thelia/Model/Map/CustomerTableMap.php +++ b/core/lib/Thelia/Model/Map/CustomerTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Customer; use Thelia\Model\CustomerQuery; + /** * This class defines the structure of the 'customer' table. * @@ -261,7 +262,7 @@ class CustomerTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -281,12 +282,13 @@ class CustomerTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -302,8 +304,8 @@ class CustomerTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -320,8 +322,8 @@ class CustomerTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Customer object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Customer object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -345,10 +347,10 @@ class CustomerTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -381,10 +383,10 @@ class CustomerTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -430,7 +432,7 @@ class CustomerTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -451,13 +453,13 @@ class CustomerTableMap extends TableMap /** * Performs a DELETE on the database, given a Customer or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Customer object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Customer object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -490,8 +492,8 @@ class CustomerTableMap extends TableMap /** * Deletes all rows from the customer table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -501,11 +503,11 @@ class CustomerTableMap extends TableMap /** * Performs an INSERT on the database, given a Customer or Criteria object. * - * @param mixed $criteria Criteria or Customer object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Customer object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -523,6 +525,7 @@ class CustomerTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CustomerTableMap::ID.')'); } + // Set the correct dbName $query = CustomerQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php b/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php index fd7ac9a9b..c731a1227 100644 --- a/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CustomerTitleI18n; use Thelia\Model\CustomerTitleI18nQuery; + /** * This class defines the structure of the 'customer_title_i18n' table. * @@ -163,7 +164,7 @@ class CustomerTitleI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\CustomerTitleI18n $obj A \Thelia\Model\CustomerTitleI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -216,7 +217,7 @@ class CustomerTitleI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -236,12 +237,13 @@ class CustomerTitleI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -253,8 +255,8 @@ class CustomerTitleI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -271,8 +273,8 @@ class CustomerTitleI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CustomerTitleI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CustomerTitleI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -296,10 +298,10 @@ class CustomerTitleI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -332,10 +334,10 @@ class CustomerTitleI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class CustomerTitleI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class CustomerTitleI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a CustomerTitleI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CustomerTitleI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CustomerTitleI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -427,8 +429,8 @@ class CustomerTitleI18nTableMap extends TableMap /** * Deletes all rows from the customer_title_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -438,11 +440,11 @@ class CustomerTitleI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a CustomerTitleI18n or Criteria object. * - * @param mixed $criteria Criteria or CustomerTitleI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CustomerTitleI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -456,6 +458,7 @@ class CustomerTitleI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from CustomerTitleI18n object } + // Set the correct dbName $query = CustomerTitleI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php b/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php index 6bf01fb0b..b2a62a92e 100644 --- a/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php +++ b/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\CustomerTitle; use Thelia\Model\CustomerTitleQuery; + /** * This class defines the structure of the 'customer_title' table. * @@ -203,7 +204,7 @@ class CustomerTitleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -223,12 +224,13 @@ class CustomerTitleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -244,8 +246,8 @@ class CustomerTitleTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -262,8 +264,8 @@ class CustomerTitleTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CustomerTitle object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (CustomerTitle object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -287,10 +289,10 @@ class CustomerTitleTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -323,10 +325,10 @@ class CustomerTitleTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -350,7 +352,7 @@ class CustomerTitleTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -371,13 +373,13 @@ class CustomerTitleTableMap extends TableMap /** * Performs a DELETE on the database, given a CustomerTitle or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CustomerTitle object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or CustomerTitle object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -410,8 +412,8 @@ class CustomerTitleTableMap extends TableMap /** * Deletes all rows from the customer_title table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -421,11 +423,11 @@ class CustomerTitleTableMap extends TableMap /** * Performs an INSERT on the database, given a CustomerTitle or Criteria object. * - * @param mixed $criteria Criteria or CustomerTitle object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or CustomerTitle object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -443,6 +445,7 @@ class CustomerTitleTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.CustomerTitleTableMap::ID.')'); } + // Set the correct dbName $query = CustomerTitleQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php b/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php index b2f2cbe41..81bea461c 100644 --- a/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FeatureAvI18n; use Thelia\Model\FeatureAvI18nQuery; + /** * This class defines the structure of the 'feature_av_i18n' table. * @@ -175,7 +176,7 @@ class FeatureAvI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\FeatureAvI18n $obj A \Thelia\Model\FeatureAvI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class FeatureAvI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class FeatureAvI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class FeatureAvI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class FeatureAvI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FeatureAvI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FeatureAvI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class FeatureAvI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class FeatureAvI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class FeatureAvI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class FeatureAvI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a FeatureAvI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FeatureAvI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FeatureAvI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class FeatureAvI18nTableMap extends TableMap /** * Deletes all rows from the feature_av_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class FeatureAvI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a FeatureAvI18n or Criteria object. * - * @param mixed $criteria Criteria or FeatureAvI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FeatureAvI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class FeatureAvI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from FeatureAvI18n object } + // Set the correct dbName $query = FeatureAvI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FeatureAvTableMap.php b/core/lib/Thelia/Model/Map/FeatureAvTableMap.php index ffb8e9942..284a3bc2e 100644 --- a/core/lib/Thelia/Model/Map/FeatureAvTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureAvTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FeatureAv; use Thelia\Model\FeatureAvQuery; + /** * This class defines the structure of the 'feature_av' table. * @@ -204,7 +205,7 @@ class FeatureAvTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -224,12 +225,13 @@ class FeatureAvTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -245,8 +247,8 @@ class FeatureAvTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -263,8 +265,8 @@ class FeatureAvTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FeatureAv object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FeatureAv object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -288,10 +290,10 @@ class FeatureAvTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -324,10 +326,10 @@ class FeatureAvTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -351,7 +353,7 @@ class FeatureAvTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -372,13 +374,13 @@ class FeatureAvTableMap extends TableMap /** * Performs a DELETE on the database, given a FeatureAv or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FeatureAv object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FeatureAv object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -411,8 +413,8 @@ class FeatureAvTableMap extends TableMap /** * Deletes all rows from the feature_av table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -422,11 +424,11 @@ class FeatureAvTableMap extends TableMap /** * Performs an INSERT on the database, given a FeatureAv or Criteria object. * - * @param mixed $criteria Criteria or FeatureAv object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FeatureAv object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -444,6 +446,7 @@ class FeatureAvTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.FeatureAvTableMap::ID.')'); } + // Set the correct dbName $query = FeatureAvQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php b/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php index a3addadb0..5cc7bdea1 100644 --- a/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FeatureI18n; use Thelia\Model\FeatureI18nQuery; + /** * This class defines the structure of the 'feature_i18n' table. * @@ -175,7 +176,7 @@ class FeatureI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\FeatureI18n $obj A \Thelia\Model\FeatureI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class FeatureI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class FeatureI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class FeatureI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class FeatureI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FeatureI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FeatureI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class FeatureI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class FeatureI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class FeatureI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class FeatureI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a FeatureI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FeatureI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FeatureI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class FeatureI18nTableMap extends TableMap /** * Deletes all rows from the feature_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class FeatureI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a FeatureI18n or Criteria object. * - * @param mixed $criteria Criteria or FeatureI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FeatureI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class FeatureI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from FeatureI18n object } + // Set the correct dbName $query = FeatureI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FeatureProductTableMap.php b/core/lib/Thelia/Model/Map/FeatureProductTableMap.php index 40daabe61..c87d3176b 100644 --- a/core/lib/Thelia/Model/Map/FeatureProductTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureProductTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FeatureProduct; use Thelia\Model\FeatureProductQuery; + /** * This class defines the structure of the 'feature_product' table. * @@ -202,7 +203,7 @@ class FeatureProductTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -222,12 +223,13 @@ class FeatureProductTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -243,8 +245,8 @@ class FeatureProductTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -261,8 +263,8 @@ class FeatureProductTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FeatureProduct object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FeatureProduct object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -286,10 +288,10 @@ class FeatureProductTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -322,10 +324,10 @@ class FeatureProductTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -355,7 +357,7 @@ class FeatureProductTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -376,13 +378,13 @@ class FeatureProductTableMap extends TableMap /** * Performs a DELETE on the database, given a FeatureProduct or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FeatureProduct object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FeatureProduct object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -415,8 +417,8 @@ class FeatureProductTableMap extends TableMap /** * Deletes all rows from the feature_product table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -426,11 +428,11 @@ class FeatureProductTableMap extends TableMap /** * Performs an INSERT on the database, given a FeatureProduct or Criteria object. * - * @param mixed $criteria Criteria or FeatureProduct object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FeatureProduct object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -448,6 +450,7 @@ class FeatureProductTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.FeatureProductTableMap::ID.')'); } + // Set the correct dbName $query = FeatureProductQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FeatureTableMap.php b/core/lib/Thelia/Model/Map/FeatureTableMap.php index c2909d68b..222340de4 100644 --- a/core/lib/Thelia/Model/Map/FeatureTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Feature; use Thelia\Model\FeatureQuery; + /** * This class defines the structure of the 'feature' table. * @@ -208,7 +209,7 @@ class FeatureTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class FeatureTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class FeatureTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class FeatureTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Feature object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Feature object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class FeatureTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class FeatureTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -355,7 +357,7 @@ class FeatureTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -376,13 +378,13 @@ class FeatureTableMap extends TableMap /** * Performs a DELETE on the database, given a Feature or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Feature object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Feature object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -415,8 +417,8 @@ class FeatureTableMap extends TableMap /** * Deletes all rows from the feature table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -426,11 +428,11 @@ class FeatureTableMap extends TableMap /** * Performs an INSERT on the database, given a Feature or Criteria object. * - * @param mixed $criteria Criteria or Feature object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Feature object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -448,6 +450,7 @@ class FeatureTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.FeatureTableMap::ID.')'); } + // Set the correct dbName $query = FeatureQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php b/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php index f312ac08c..1f57bc169 100644 --- a/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FeatureTemplate; use Thelia\Model\FeatureTemplateQuery; + /** * This class defines the structure of the 'feature_template' table. * @@ -190,7 +191,7 @@ class FeatureTemplateTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -210,12 +211,13 @@ class FeatureTemplateTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -231,8 +233,8 @@ class FeatureTemplateTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -249,8 +251,8 @@ class FeatureTemplateTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FeatureTemplate object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FeatureTemplate object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -274,10 +276,10 @@ class FeatureTemplateTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -310,10 +312,10 @@ class FeatureTemplateTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -339,7 +341,7 @@ class FeatureTemplateTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -360,13 +362,13 @@ class FeatureTemplateTableMap extends TableMap /** * Performs a DELETE on the database, given a FeatureTemplate or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FeatureTemplate object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FeatureTemplate object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -399,8 +401,8 @@ class FeatureTemplateTableMap extends TableMap /** * Deletes all rows from the feature_template table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -410,11 +412,11 @@ class FeatureTemplateTableMap extends TableMap /** * Performs an INSERT on the database, given a FeatureTemplate or Criteria object. * - * @param mixed $criteria Criteria or FeatureTemplate object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FeatureTemplate object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -432,6 +434,7 @@ class FeatureTemplateTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.FeatureTemplateTableMap::ID.')'); } + // Set the correct dbName $query = FeatureTemplateQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php index 91288e1f4..f7c88d93b 100644 --- a/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FolderDocumentI18n; use Thelia\Model\FolderDocumentI18nQuery; + /** * This class defines the structure of the 'folder_document_i18n' table. * @@ -175,7 +176,7 @@ class FolderDocumentI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\FolderDocumentI18n $obj A \Thelia\Model\FolderDocumentI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class FolderDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class FolderDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class FolderDocumentI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class FolderDocumentI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FolderDocumentI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FolderDocumentI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class FolderDocumentI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class FolderDocumentI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class FolderDocumentI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class FolderDocumentI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a FolderDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FolderDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FolderDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class FolderDocumentI18nTableMap extends TableMap /** * Deletes all rows from the folder_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class FolderDocumentI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a FolderDocumentI18n or Criteria object. * - * @param mixed $criteria Criteria or FolderDocumentI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FolderDocumentI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class FolderDocumentI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from FolderDocumentI18n object } + // Set the correct dbName $query = FolderDocumentI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php b/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php index 626efd078..61be45118 100644 --- a/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FolderDocument; use Thelia\Model\FolderDocumentQuery; + /** * This class defines the structure of the 'folder_document' table. * @@ -208,7 +209,7 @@ class FolderDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class FolderDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class FolderDocumentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class FolderDocumentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FolderDocument object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FolderDocument object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class FolderDocumentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class FolderDocumentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class FolderDocumentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class FolderDocumentTableMap extends TableMap /** * Performs a DELETE on the database, given a FolderDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FolderDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FolderDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class FolderDocumentTableMap extends TableMap /** * Deletes all rows from the folder_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class FolderDocumentTableMap extends TableMap /** * Performs an INSERT on the database, given a FolderDocument or Criteria object. * - * @param mixed $criteria Criteria or FolderDocument object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FolderDocument object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class FolderDocumentTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.FolderDocumentTableMap::ID.')'); } + // Set the correct dbName $query = FolderDocumentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FolderI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderI18nTableMap.php index aaf2b0111..13ad89cf7 100644 --- a/core/lib/Thelia/Model/Map/FolderI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FolderI18n; use Thelia\Model\FolderI18nQuery; + /** * This class defines the structure of the 'folder_i18n' table. * @@ -193,7 +194,7 @@ class FolderI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\FolderI18n $obj A \Thelia\Model\FolderI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -246,7 +247,7 @@ class FolderI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -266,12 +267,13 @@ class FolderI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -283,8 +285,8 @@ class FolderI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class FolderI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FolderI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FolderI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class FolderI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class FolderI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -397,7 +399,7 @@ class FolderI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -418,13 +420,13 @@ class FolderI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a FolderI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FolderI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FolderI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -467,8 +469,8 @@ class FolderI18nTableMap extends TableMap /** * Deletes all rows from the folder_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -478,11 +480,11 @@ class FolderI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a FolderI18n or Criteria object. * - * @param mixed $criteria Criteria or FolderI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FolderI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -496,6 +498,7 @@ class FolderI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from FolderI18n object } + // Set the correct dbName $query = FolderI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php index 03ccbed52..82a785b5d 100644 --- a/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FolderImageI18n; use Thelia\Model\FolderImageI18nQuery; + /** * This class defines the structure of the 'folder_image_i18n' table. * @@ -175,7 +176,7 @@ class FolderImageI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\FolderImageI18n $obj A \Thelia\Model\FolderImageI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class FolderImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class FolderImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class FolderImageI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class FolderImageI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FolderImageI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FolderImageI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class FolderImageI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class FolderImageI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class FolderImageI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class FolderImageI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a FolderImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FolderImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FolderImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class FolderImageI18nTableMap extends TableMap /** * Deletes all rows from the folder_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class FolderImageI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a FolderImageI18n or Criteria object. * - * @param mixed $criteria Criteria or FolderImageI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FolderImageI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class FolderImageI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from FolderImageI18n object } + // Set the correct dbName $query = FolderImageI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FolderImageTableMap.php b/core/lib/Thelia/Model/Map/FolderImageTableMap.php index 6cf6459f0..6387373eb 100644 --- a/core/lib/Thelia/Model/Map/FolderImageTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderImageTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FolderImage; use Thelia\Model\FolderImageQuery; + /** * This class defines the structure of the 'folder_image' table. * @@ -208,7 +209,7 @@ class FolderImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class FolderImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class FolderImageTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class FolderImageTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FolderImage object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FolderImage object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class FolderImageTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class FolderImageTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class FolderImageTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class FolderImageTableMap extends TableMap /** * Performs a DELETE on the database, given a FolderImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FolderImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FolderImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class FolderImageTableMap extends TableMap /** * Deletes all rows from the folder_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class FolderImageTableMap extends TableMap /** * Performs an INSERT on the database, given a FolderImage or Criteria object. * - * @param mixed $criteria Criteria or FolderImage object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FolderImage object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class FolderImageTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.FolderImageTableMap::ID.')'); } + // Set the correct dbName $query = FolderImageQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FolderTableMap.php b/core/lib/Thelia/Model/Map/FolderTableMap.php index 75cf1368b..8cb336db2 100644 --- a/core/lib/Thelia/Model/Map/FolderTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Folder; use Thelia\Model\FolderQuery; + /** * This class defines the structure of the 'folder' table. * @@ -235,7 +236,7 @@ class FolderTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -255,12 +256,13 @@ class FolderTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -276,8 +278,8 @@ class FolderTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -294,8 +296,8 @@ class FolderTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Folder object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Folder object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -319,10 +321,10 @@ class FolderTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -355,10 +357,10 @@ class FolderTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -390,7 +392,7 @@ class FolderTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -411,13 +413,13 @@ class FolderTableMap extends TableMap /** * Performs a DELETE on the database, given a Folder or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Folder object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Folder object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -450,8 +452,8 @@ class FolderTableMap extends TableMap /** * Deletes all rows from the folder table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -461,11 +463,11 @@ class FolderTableMap extends TableMap /** * Performs an INSERT on the database, given a Folder or Criteria object. * - * @param mixed $criteria Criteria or Folder object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Folder object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -483,6 +485,7 @@ class FolderTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.FolderTableMap::ID.')'); } + // Set the correct dbName $query = FolderQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/FolderVersionTableMap.php b/core/lib/Thelia/Model/Map/FolderVersionTableMap.php index a7081f282..1ed8ab441 100644 --- a/core/lib/Thelia/Model/Map/FolderVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderVersionTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\FolderVersion; use Thelia\Model\FolderVersionQuery; + /** * This class defines the structure of the 'folder_version' table. * @@ -193,7 +194,7 @@ class FolderVersionTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\FolderVersion $obj A \Thelia\Model\FolderVersion object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -246,7 +247,7 @@ class FolderVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -266,12 +267,13 @@ class FolderVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -283,8 +285,8 @@ class FolderVersionTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class FolderVersionTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (FolderVersion object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (FolderVersion object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class FolderVersionTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class FolderVersionTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -397,7 +399,7 @@ class FolderVersionTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -418,13 +420,13 @@ class FolderVersionTableMap extends TableMap /** * Performs a DELETE on the database, given a FolderVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or FolderVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or FolderVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -467,8 +469,8 @@ class FolderVersionTableMap extends TableMap /** * Deletes all rows from the folder_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -478,11 +480,11 @@ class FolderVersionTableMap extends TableMap /** * Performs an INSERT on the database, given a FolderVersion or Criteria object. * - * @param mixed $criteria Criteria or FolderVersion object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or FolderVersion object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -496,6 +498,7 @@ class FolderVersionTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from FolderVersion object } + // Set the correct dbName $query = FolderVersionQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/LangTableMap.php b/core/lib/Thelia/Model/Map/LangTableMap.php index d77a63e44..12c9d9b5b 100644 --- a/core/lib/Thelia/Model/Map/LangTableMap.php +++ b/core/lib/Thelia/Model/Map/LangTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Lang; use Thelia\Model\LangQuery; + /** * This class defines the structure of the 'lang' table. * @@ -242,7 +243,7 @@ class LangTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -262,12 +263,13 @@ class LangTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -283,8 +285,8 @@ class LangTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class LangTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Lang object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Lang object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class LangTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class LangTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -409,7 +411,7 @@ class LangTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -430,13 +432,13 @@ class LangTableMap extends TableMap /** * Performs a DELETE on the database, given a Lang or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Lang object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Lang object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -469,8 +471,8 @@ class LangTableMap extends TableMap /** * Deletes all rows from the lang table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -480,11 +482,11 @@ class LangTableMap extends TableMap /** * Performs an INSERT on the database, given a Lang or Criteria object. * - * @param mixed $criteria Criteria or Lang object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Lang object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -502,6 +504,7 @@ class LangTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.LangTableMap::ID.')'); } + // Set the correct dbName $query = LangQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/MessageI18nTableMap.php b/core/lib/Thelia/Model/Map/MessageI18nTableMap.php index c759e611e..b747c230c 100644 --- a/core/lib/Thelia/Model/Map/MessageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/MessageI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\MessageI18n; use Thelia\Model\MessageI18nQuery; + /** * This class defines the structure of the 'message_i18n' table. * @@ -175,7 +176,7 @@ class MessageI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\MessageI18n $obj A \Thelia\Model\MessageI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class MessageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class MessageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class MessageI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class MessageI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (MessageI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (MessageI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class MessageI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class MessageI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class MessageI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class MessageI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a MessageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or MessageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or MessageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class MessageI18nTableMap extends TableMap /** * Deletes all rows from the message_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class MessageI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a MessageI18n or Criteria object. * - * @param mixed $criteria Criteria or MessageI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or MessageI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class MessageI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from MessageI18n object } + // Set the correct dbName $query = MessageI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/MessageTableMap.php b/core/lib/Thelia/Model/Map/MessageTableMap.php index 79d2d1822..7a4d17ceb 100644 --- a/core/lib/Thelia/Model/Map/MessageTableMap.php +++ b/core/lib/Thelia/Model/Map/MessageTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Message; use Thelia\Model\MessageQuery; + /** * This class defines the structure of the 'message' table. * @@ -246,7 +247,7 @@ class MessageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -266,12 +267,13 @@ class MessageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -287,8 +289,8 @@ class MessageTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -305,8 +307,8 @@ class MessageTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Message object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Message object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -330,10 +332,10 @@ class MessageTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -366,10 +368,10 @@ class MessageTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -407,7 +409,7 @@ class MessageTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -428,13 +430,13 @@ class MessageTableMap extends TableMap /** * Performs a DELETE on the database, given a Message or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Message object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Message object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -467,8 +469,8 @@ class MessageTableMap extends TableMap /** * Deletes all rows from the message table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -478,11 +480,11 @@ class MessageTableMap extends TableMap /** * Performs an INSERT on the database, given a Message or Criteria object. * - * @param mixed $criteria Criteria or Message object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Message object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -500,6 +502,7 @@ class MessageTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.MessageTableMap::ID.')'); } + // Set the correct dbName $query = MessageQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php index 7478be85e..12cc8a1be 100644 --- a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\MessageVersion; use Thelia\Model\MessageVersionQuery; + /** * This class defines the structure of the 'message_version' table. * @@ -211,7 +212,7 @@ class MessageVersionTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\MessageVersion $obj A \Thelia\Model\MessageVersion object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -264,7 +265,7 @@ class MessageVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -284,12 +285,13 @@ class MessageVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -301,8 +303,8 @@ class MessageVersionTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -319,8 +321,8 @@ class MessageVersionTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (MessageVersion object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (MessageVersion object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -344,10 +346,10 @@ class MessageVersionTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -380,10 +382,10 @@ class MessageVersionTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -421,7 +423,7 @@ class MessageVersionTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -442,13 +444,13 @@ class MessageVersionTableMap extends TableMap /** * Performs a DELETE on the database, given a MessageVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or MessageVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or MessageVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -491,8 +493,8 @@ class MessageVersionTableMap extends TableMap /** * Deletes all rows from the message_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -502,11 +504,11 @@ class MessageVersionTableMap extends TableMap /** * Performs an INSERT on the database, given a MessageVersion or Criteria object. * - * @param mixed $criteria Criteria or MessageVersion object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or MessageVersion object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -520,6 +522,7 @@ class MessageVersionTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from MessageVersion object } + // Set the correct dbName $query = MessageVersionQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php b/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php index 602455325..9b7b1d089 100644 --- a/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ModuleI18n; use Thelia\Model\ModuleI18nQuery; + /** * This class defines the structure of the 'module_i18n' table. * @@ -175,7 +176,7 @@ class ModuleI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ModuleI18n $obj A \Thelia\Model\ModuleI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ModuleI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ModuleI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ModuleI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ModuleI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ModuleI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ModuleI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ModuleI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ModuleI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ModuleI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ModuleI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ModuleI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ModuleI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ModuleI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ModuleI18nTableMap extends TableMap /** * Deletes all rows from the module_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ModuleI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ModuleI18n or Criteria object. * - * @param mixed $criteria Criteria or ModuleI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ModuleI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ModuleI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ModuleI18n object } + // Set the correct dbName $query = ModuleI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php index f10ee645f..a65c804d7 100644 --- a/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ModuleImageI18n; use Thelia\Model\ModuleImageI18nQuery; + /** * This class defines the structure of the 'module_image_i18n' table. * @@ -175,7 +176,7 @@ class ModuleImageI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ModuleImageI18n $obj A \Thelia\Model\ModuleImageI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ModuleImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ModuleImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ModuleImageI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ModuleImageI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ModuleImageI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ModuleImageI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ModuleImageI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ModuleImageI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ModuleImageI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ModuleImageI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ModuleImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ModuleImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ModuleImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ModuleImageI18nTableMap extends TableMap /** * Deletes all rows from the module_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ModuleImageI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ModuleImageI18n or Criteria object. * - * @param mixed $criteria Criteria or ModuleImageI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ModuleImageI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ModuleImageI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ModuleImageI18n object } + // Set the correct dbName $query = ModuleImageI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ModuleImageTableMap.php b/core/lib/Thelia/Model/Map/ModuleImageTableMap.php index 679a123b0..2ff62a6a4 100644 --- a/core/lib/Thelia/Model/Map/ModuleImageTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleImageTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ModuleImage; use Thelia\Model\ModuleImageQuery; + /** * This class defines the structure of the 'module_image' table. * @@ -208,7 +209,7 @@ class ModuleImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class ModuleImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class ModuleImageTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class ModuleImageTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ModuleImage object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ModuleImage object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class ModuleImageTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class ModuleImageTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class ModuleImageTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class ModuleImageTableMap extends TableMap /** * Performs a DELETE on the database, given a ModuleImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ModuleImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ModuleImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class ModuleImageTableMap extends TableMap /** * Deletes all rows from the module_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class ModuleImageTableMap extends TableMap /** * Performs an INSERT on the database, given a ModuleImage or Criteria object. * - * @param mixed $criteria Criteria or ModuleImage object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ModuleImage object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class ModuleImageTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ModuleImageTableMap::ID.')'); } + // Set the correct dbName $query = ModuleImageQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ModuleTableMap.php b/core/lib/Thelia/Model/Map/ModuleTableMap.php index 6e5827591..16a14b1bb 100644 --- a/core/lib/Thelia/Model/Map/ModuleTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Module; use Thelia\Model\ModuleQuery; + /** * This class defines the structure of the 'module' table. * @@ -227,7 +228,7 @@ class ModuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -247,12 +248,13 @@ class ModuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -268,8 +270,8 @@ class ModuleTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -286,8 +288,8 @@ class ModuleTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Module object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Module object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -311,10 +313,10 @@ class ModuleTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -347,10 +349,10 @@ class ModuleTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -380,7 +382,7 @@ class ModuleTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -401,13 +403,13 @@ class ModuleTableMap extends TableMap /** * Performs a DELETE on the database, given a Module or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Module object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Module object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -440,8 +442,8 @@ class ModuleTableMap extends TableMap /** * Deletes all rows from the module table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -451,11 +453,11 @@ class ModuleTableMap extends TableMap /** * Performs an INSERT on the database, given a Module or Criteria object. * - * @param mixed $criteria Criteria or Module object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Module object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -473,6 +475,7 @@ class ModuleTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ModuleTableMap::ID.')'); } + // Set the correct dbName $query = ModuleQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/NewsletterTableMap.php b/core/lib/Thelia/Model/Map/NewsletterTableMap.php index d8a7ff589..94ffd25d2 100644 --- a/core/lib/Thelia/Model/Map/NewsletterTableMap.php +++ b/core/lib/Thelia/Model/Map/NewsletterTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Newsletter; use Thelia\Model\NewsletterQuery; + /** * This class defines the structure of the 'newsletter' table. * @@ -193,7 +194,7 @@ class NewsletterTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -213,12 +214,13 @@ class NewsletterTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -234,8 +236,8 @@ class NewsletterTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -252,8 +254,8 @@ class NewsletterTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Newsletter object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Newsletter object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -277,10 +279,10 @@ class NewsletterTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -313,10 +315,10 @@ class NewsletterTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -344,7 +346,7 @@ class NewsletterTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -365,13 +367,13 @@ class NewsletterTableMap extends TableMap /** * Performs a DELETE on the database, given a Newsletter or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Newsletter object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Newsletter object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -404,8 +406,8 @@ class NewsletterTableMap extends TableMap /** * Deletes all rows from the newsletter table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -415,11 +417,11 @@ class NewsletterTableMap extends TableMap /** * Performs an INSERT on the database, given a Newsletter or Criteria object. * - * @param mixed $criteria Criteria or Newsletter object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Newsletter object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -437,6 +439,7 @@ class NewsletterTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.NewsletterTableMap::ID.')'); } + // Set the correct dbName $query = NewsletterQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderAddressTableMap.php b/core/lib/Thelia/Model/Map/OrderAddressTableMap.php index a43702f4d..178f0af4a 100644 --- a/core/lib/Thelia/Model/Map/OrderAddressTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderAddressTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\OrderAddress; use Thelia\Model\OrderAddressQuery; + /** * This class defines the structure of the 'order_address' table. * @@ -237,7 +238,7 @@ class OrderAddressTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -257,12 +258,13 @@ class OrderAddressTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -278,8 +280,8 @@ class OrderAddressTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -296,8 +298,8 @@ class OrderAddressTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (OrderAddress object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (OrderAddress object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -321,10 +323,10 @@ class OrderAddressTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -357,10 +359,10 @@ class OrderAddressTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -402,7 +404,7 @@ class OrderAddressTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -423,13 +425,13 @@ class OrderAddressTableMap extends TableMap /** * Performs a DELETE on the database, given a OrderAddress or Criteria object OR a primary key value. * - * @param mixed $values Criteria or OrderAddress object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or OrderAddress object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -462,8 +464,8 @@ class OrderAddressTableMap extends TableMap /** * Deletes all rows from the order_address table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -473,11 +475,11 @@ class OrderAddressTableMap extends TableMap /** * Performs an INSERT on the database, given a OrderAddress or Criteria object. * - * @param mixed $criteria Criteria or OrderAddress object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or OrderAddress object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -495,6 +497,7 @@ class OrderAddressTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderAddressTableMap::ID.')'); } + // Set the correct dbName $query = OrderAddressQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderCouponTableMap.php b/core/lib/Thelia/Model/Map/OrderCouponTableMap.php index 8297df60d..7f795ea57 100644 --- a/core/lib/Thelia/Model/Map/OrderCouponTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderCouponTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\OrderCoupon; use Thelia\Model\OrderCouponQuery; + /** * This class defines the structure of the 'order_coupon' table. * @@ -242,7 +243,7 @@ class OrderCouponTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -262,12 +263,13 @@ class OrderCouponTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -283,8 +285,8 @@ class OrderCouponTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class OrderCouponTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (OrderCoupon object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (OrderCoupon object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class OrderCouponTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class OrderCouponTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -409,7 +411,7 @@ class OrderCouponTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -430,13 +432,13 @@ class OrderCouponTableMap extends TableMap /** * Performs a DELETE on the database, given a OrderCoupon or Criteria object OR a primary key value. * - * @param mixed $values Criteria or OrderCoupon object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or OrderCoupon object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -469,8 +471,8 @@ class OrderCouponTableMap extends TableMap /** * Deletes all rows from the order_coupon table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -480,11 +482,11 @@ class OrderCouponTableMap extends TableMap /** * Performs an INSERT on the database, given a OrderCoupon or Criteria object. * - * @param mixed $criteria Criteria or OrderCoupon object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or OrderCoupon object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -502,6 +504,7 @@ class OrderCouponTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderCouponTableMap::ID.')'); } + // Set the correct dbName $query = OrderCouponQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php b/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php index 44f357dbf..9ff1b329b 100644 --- a/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\OrderProductAttributeCombination; use Thelia\Model\OrderProductAttributeCombinationQuery; + /** * This class defines the structure of the 'order_product_attribute_combination' table. * @@ -224,7 +225,7 @@ class OrderProductAttributeCombinationTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -244,12 +245,13 @@ class OrderProductAttributeCombinationTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -265,8 +267,8 @@ class OrderProductAttributeCombinationTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class OrderProductAttributeCombinationTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (OrderProductAttributeCombination object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (OrderProductAttributeCombination object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class OrderProductAttributeCombinationTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class OrderProductAttributeCombinationTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -385,7 +387,7 @@ class OrderProductAttributeCombinationTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -406,13 +408,13 @@ class OrderProductAttributeCombinationTableMap extends TableMap /** * Performs a DELETE on the database, given a OrderProductAttributeCombination or Criteria object OR a primary key value. * - * @param mixed $values Criteria or OrderProductAttributeCombination object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or OrderProductAttributeCombination object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -445,8 +447,8 @@ class OrderProductAttributeCombinationTableMap extends TableMap /** * Deletes all rows from the order_product_attribute_combination table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -456,11 +458,11 @@ class OrderProductAttributeCombinationTableMap extends TableMap /** * Performs an INSERT on the database, given a OrderProductAttributeCombination or Criteria object. * - * @param mixed $criteria Criteria or OrderProductAttributeCombination object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or OrderProductAttributeCombination object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -478,6 +480,7 @@ class OrderProductAttributeCombinationTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderProductAttributeCombinationTableMap::ID.')'); } + // Set the correct dbName $query = OrderProductAttributeCombinationQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderProductTableMap.php b/core/lib/Thelia/Model/Map/OrderProductTableMap.php index 939b4ea09..dd4a957ab 100644 --- a/core/lib/Thelia/Model/Map/OrderProductTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderProductTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\OrderProduct; use Thelia\Model\OrderProductQuery; + /** * This class defines the structure of the 'order_product' table. * @@ -284,7 +285,7 @@ class OrderProductTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -304,12 +305,13 @@ class OrderProductTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -325,8 +327,8 @@ class OrderProductTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -343,8 +345,8 @@ class OrderProductTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (OrderProduct object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (OrderProduct object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -368,10 +370,10 @@ class OrderProductTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -404,10 +406,10 @@ class OrderProductTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -461,7 +463,7 @@ class OrderProductTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -482,13 +484,13 @@ class OrderProductTableMap extends TableMap /** * Performs a DELETE on the database, given a OrderProduct or Criteria object OR a primary key value. * - * @param mixed $values Criteria or OrderProduct object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or OrderProduct object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -521,8 +523,8 @@ class OrderProductTableMap extends TableMap /** * Deletes all rows from the order_product table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -532,11 +534,11 @@ class OrderProductTableMap extends TableMap /** * Performs an INSERT on the database, given a OrderProduct or Criteria object. * - * @param mixed $criteria Criteria or OrderProduct object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or OrderProduct object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -554,6 +556,7 @@ class OrderProductTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderProductTableMap::ID.')'); } + // Set the correct dbName $query = OrderProductQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php b/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php index 32c8f5687..60df13bdf 100644 --- a/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\OrderProductTax; use Thelia\Model\OrderProductTaxQuery; + /** * This class defines the structure of the 'order_product_tax' table. * @@ -200,7 +201,7 @@ class OrderProductTaxTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -220,12 +221,13 @@ class OrderProductTaxTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -241,8 +243,8 @@ class OrderProductTaxTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -259,8 +261,8 @@ class OrderProductTaxTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (OrderProductTax object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (OrderProductTax object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -284,10 +286,10 @@ class OrderProductTaxTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -320,10 +322,10 @@ class OrderProductTaxTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -353,7 +355,7 @@ class OrderProductTaxTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -374,13 +376,13 @@ class OrderProductTaxTableMap extends TableMap /** * Performs a DELETE on the database, given a OrderProductTax or Criteria object OR a primary key value. * - * @param mixed $values Criteria or OrderProductTax object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or OrderProductTax object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -413,8 +415,8 @@ class OrderProductTaxTableMap extends TableMap /** * Deletes all rows from the order_product_tax table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -424,11 +426,11 @@ class OrderProductTaxTableMap extends TableMap /** * Performs an INSERT on the database, given a OrderProductTax or Criteria object. * - * @param mixed $criteria Criteria or OrderProductTax object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or OrderProductTax object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -446,6 +448,7 @@ class OrderProductTaxTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderProductTaxTableMap::ID.')'); } + // Set the correct dbName $query = OrderProductTaxQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php b/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php index 15e9851e8..0f8d61143 100644 --- a/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\OrderStatusI18n; use Thelia\Model\OrderStatusI18nQuery; + /** * This class defines the structure of the 'order_status_i18n' table. * @@ -175,7 +176,7 @@ class OrderStatusI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\OrderStatusI18n $obj A \Thelia\Model\OrderStatusI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class OrderStatusI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class OrderStatusI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class OrderStatusI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class OrderStatusI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (OrderStatusI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (OrderStatusI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class OrderStatusI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class OrderStatusI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class OrderStatusI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class OrderStatusI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a OrderStatusI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or OrderStatusI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or OrderStatusI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class OrderStatusI18nTableMap extends TableMap /** * Deletes all rows from the order_status_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class OrderStatusI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a OrderStatusI18n or Criteria object. * - * @param mixed $criteria Criteria or OrderStatusI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or OrderStatusI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class OrderStatusI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from OrderStatusI18n object } + // Set the correct dbName $query = OrderStatusI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php index 26241c2e0..dff641a6d 100644 --- a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\OrderStatus; use Thelia\Model\OrderStatusQuery; + /** * This class defines the structure of the 'order_status' table. * @@ -196,7 +197,7 @@ class OrderStatusTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -216,12 +217,13 @@ class OrderStatusTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -237,8 +239,8 @@ class OrderStatusTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -255,8 +257,8 @@ class OrderStatusTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (OrderStatus object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (OrderStatus object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -280,10 +282,10 @@ class OrderStatusTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -316,10 +318,10 @@ class OrderStatusTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -341,7 +343,7 @@ class OrderStatusTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -362,13 +364,13 @@ class OrderStatusTableMap extends TableMap /** * Performs a DELETE on the database, given a OrderStatus or Criteria object OR a primary key value. * - * @param mixed $values Criteria or OrderStatus object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or OrderStatus object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -401,8 +403,8 @@ class OrderStatusTableMap extends TableMap /** * Deletes all rows from the order_status table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -412,11 +414,11 @@ class OrderStatusTableMap extends TableMap /** * Performs an INSERT on the database, given a OrderStatus or Criteria object. * - * @param mixed $criteria Criteria or OrderStatus object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or OrderStatus object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -434,6 +436,7 @@ class OrderStatusTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderStatusTableMap::ID.')'); } + // Set the correct dbName $query = OrderStatusQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/OrderTableMap.php b/core/lib/Thelia/Model/Map/OrderTableMap.php index 5b1555d77..28613da80 100644 --- a/core/lib/Thelia/Model/Map/OrderTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Order; use Thelia\Model\OrderQuery; + /** * This class defines the structure of the 'order' table. * @@ -285,7 +286,7 @@ class OrderTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -305,12 +306,13 @@ class OrderTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -326,8 +328,8 @@ class OrderTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -344,8 +346,8 @@ class OrderTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Order object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Order object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -369,10 +371,10 @@ class OrderTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -405,10 +407,10 @@ class OrderTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -460,7 +462,7 @@ class OrderTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -481,13 +483,13 @@ class OrderTableMap extends TableMap /** * Performs a DELETE on the database, given a Order or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Order object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Order object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -520,8 +522,8 @@ class OrderTableMap extends TableMap /** * Deletes all rows from the order table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -531,11 +533,11 @@ class OrderTableMap extends TableMap /** * Performs an INSERT on the database, given a Order or Criteria object. * - * @param mixed $criteria Criteria or Order object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Order object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -553,6 +555,7 @@ class OrderTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderTableMap::ID.')'); } + // Set the correct dbName $query = OrderQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php b/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php index 7a71dd29d..d3764f5c0 100644 --- a/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductAssociatedContent; use Thelia\Model\ProductAssociatedContentQuery; + /** * This class defines the structure of the 'product_associated_content' table. * @@ -189,7 +190,7 @@ class ProductAssociatedContentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -209,12 +210,13 @@ class ProductAssociatedContentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -230,8 +232,8 @@ class ProductAssociatedContentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -248,8 +250,8 @@ class ProductAssociatedContentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductAssociatedContent object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductAssociatedContent object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -273,10 +275,10 @@ class ProductAssociatedContentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -309,10 +311,10 @@ class ProductAssociatedContentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -338,7 +340,7 @@ class ProductAssociatedContentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -359,13 +361,13 @@ class ProductAssociatedContentTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductAssociatedContent or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductAssociatedContent object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductAssociatedContent object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -398,8 +400,8 @@ class ProductAssociatedContentTableMap extends TableMap /** * Deletes all rows from the product_associated_content table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -409,11 +411,11 @@ class ProductAssociatedContentTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductAssociatedContent or Criteria object. * - * @param mixed $criteria Criteria or ProductAssociatedContent object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductAssociatedContent object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -431,6 +433,7 @@ class ProductAssociatedContentTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProductAssociatedContentTableMap::ID.')'); } + // Set the correct dbName $query = ProductAssociatedContentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php b/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php index 9f808cfa5..c022691ad 100644 --- a/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductCategory; use Thelia\Model\ProductCategoryQuery; + /** * This class defines the structure of the 'product_category' table. * @@ -184,7 +185,7 @@ class ProductCategoryTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProductCategory $obj A \Thelia\Model\ProductCategory object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -237,7 +238,7 @@ class ProductCategoryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -257,12 +258,13 @@ class ProductCategoryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -274,8 +276,8 @@ class ProductCategoryTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -292,8 +294,8 @@ class ProductCategoryTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductCategory object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductCategory object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -317,10 +319,10 @@ class ProductCategoryTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -353,10 +355,10 @@ class ProductCategoryTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -380,7 +382,7 @@ class ProductCategoryTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -401,13 +403,13 @@ class ProductCategoryTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductCategory or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductCategory object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductCategory object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -450,8 +452,8 @@ class ProductCategoryTableMap extends TableMap /** * Deletes all rows from the product_category table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -461,11 +463,11 @@ class ProductCategoryTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductCategory or Criteria object. * - * @param mixed $criteria Criteria or ProductCategory object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductCategory object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -479,6 +481,7 @@ class ProductCategoryTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProductCategory object } + // Set the correct dbName $query = ProductCategoryQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php index cdc778238..963d91013 100644 --- a/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductDocumentI18n; use Thelia\Model\ProductDocumentI18nQuery; + /** * This class defines the structure of the 'product_document_i18n' table. * @@ -175,7 +176,7 @@ class ProductDocumentI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProductDocumentI18n $obj A \Thelia\Model\ProductDocumentI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ProductDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ProductDocumentI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ProductDocumentI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ProductDocumentI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductDocumentI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductDocumentI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ProductDocumentI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ProductDocumentI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ProductDocumentI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ProductDocumentI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductDocumentI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductDocumentI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductDocumentI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ProductDocumentI18nTableMap extends TableMap /** * Deletes all rows from the product_document_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ProductDocumentI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductDocumentI18n or Criteria object. * - * @param mixed $criteria Criteria or ProductDocumentI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductDocumentI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ProductDocumentI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProductDocumentI18n object } + // Set the correct dbName $query = ProductDocumentI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php b/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php index 59eff6d0e..158f6044d 100644 --- a/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductDocument; use Thelia\Model\ProductDocumentQuery; + /** * This class defines the structure of the 'product_document' table. * @@ -208,7 +209,7 @@ class ProductDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class ProductDocumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class ProductDocumentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class ProductDocumentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductDocument object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductDocument object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class ProductDocumentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class ProductDocumentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class ProductDocumentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class ProductDocumentTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductDocument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductDocument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductDocument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class ProductDocumentTableMap extends TableMap /** * Deletes all rows from the product_document table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class ProductDocumentTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductDocument or Criteria object. * - * @param mixed $criteria Criteria or ProductDocument object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductDocument object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class ProductDocumentTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProductDocumentTableMap::ID.')'); } + // Set the correct dbName $query = ProductDocumentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php index 64799f3e2..d48e1dbed 100644 --- a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductI18n; use Thelia\Model\ProductI18nQuery; + /** * This class defines the structure of the 'product_i18n' table. * @@ -193,7 +194,7 @@ class ProductI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProductI18n $obj A \Thelia\Model\ProductI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -246,7 +247,7 @@ class ProductI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -266,12 +267,13 @@ class ProductI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -283,8 +285,8 @@ class ProductI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -301,8 +303,8 @@ class ProductI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -326,10 +328,10 @@ class ProductI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -362,10 +364,10 @@ class ProductI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -397,7 +399,7 @@ class ProductI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -418,13 +420,13 @@ class ProductI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -467,8 +469,8 @@ class ProductI18nTableMap extends TableMap /** * Deletes all rows from the product_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -478,11 +480,11 @@ class ProductI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductI18n or Criteria object. * - * @param mixed $criteria Criteria or ProductI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -496,6 +498,7 @@ class ProductI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProductI18n object } + // Set the correct dbName $query = ProductI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php index 7c0557f71..e7bb92340 100644 --- a/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductImageI18n; use Thelia\Model\ProductImageI18nQuery; + /** * This class defines the structure of the 'product_image_i18n' table. * @@ -175,7 +176,7 @@ class ProductImageI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProductImageI18n $obj A \Thelia\Model\ProductImageI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ProductImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ProductImageI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ProductImageI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ProductImageI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductImageI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductImageI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ProductImageI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ProductImageI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ProductImageI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ProductImageI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductImageI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductImageI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductImageI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ProductImageI18nTableMap extends TableMap /** * Deletes all rows from the product_image_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ProductImageI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductImageI18n or Criteria object. * - * @param mixed $criteria Criteria or ProductImageI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductImageI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ProductImageI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProductImageI18n object } + // Set the correct dbName $query = ProductImageI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductImageTableMap.php b/core/lib/Thelia/Model/Map/ProductImageTableMap.php index 694c7ca5d..18bb10b36 100644 --- a/core/lib/Thelia/Model/Map/ProductImageTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductImageTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductImage; use Thelia\Model\ProductImageQuery; + /** * This class defines the structure of the 'product_image' table. * @@ -208,7 +209,7 @@ class ProductImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -228,12 +229,13 @@ class ProductImageTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -249,8 +251,8 @@ class ProductImageTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -267,8 +269,8 @@ class ProductImageTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductImage object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductImage object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -292,10 +294,10 @@ class ProductImageTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -328,10 +330,10 @@ class ProductImageTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class ProductImageTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class ProductImageTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductImage or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductImage object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductImage object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -417,8 +419,8 @@ class ProductImageTableMap extends TableMap /** * Deletes all rows from the product_image table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -428,11 +430,11 @@ class ProductImageTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductImage or Criteria object. * - * @param mixed $criteria Criteria or ProductImage object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductImage object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -450,6 +452,7 @@ class ProductImageTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProductImageTableMap::ID.')'); } + // Set the correct dbName $query = ProductImageQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductPriceTableMap.php b/core/lib/Thelia/Model/Map/ProductPriceTableMap.php index 00b4ba919..180abda6d 100644 --- a/core/lib/Thelia/Model/Map/ProductPriceTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductPriceTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductPrice; use Thelia\Model\ProductPriceQuery; + /** * This class defines the structure of the 'product_price' table. * @@ -195,7 +196,7 @@ class ProductPriceTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProductPrice $obj A \Thelia\Model\ProductPrice object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -248,7 +249,7 @@ class ProductPriceTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -268,12 +269,13 @@ class ProductPriceTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -285,8 +287,8 @@ class ProductPriceTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -303,8 +305,8 @@ class ProductPriceTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductPrice object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductPrice object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -328,10 +330,10 @@ class ProductPriceTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -364,10 +366,10 @@ class ProductPriceTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -395,7 +397,7 @@ class ProductPriceTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -416,13 +418,13 @@ class ProductPriceTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductPrice or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductPrice object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductPrice object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -465,8 +467,8 @@ class ProductPriceTableMap extends TableMap /** * Deletes all rows from the product_price table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -476,11 +478,11 @@ class ProductPriceTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductPrice or Criteria object. * - * @param mixed $criteria Criteria or ProductPrice object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductPrice object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -494,6 +496,7 @@ class ProductPriceTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProductPrice object } + // Set the correct dbName $query = ProductPriceQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php b/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php index dc7fec5c3..7f715fdab 100644 --- a/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductSaleElements; use Thelia\Model\ProductSaleElementsQuery; + /** * This class defines the structure of the 'product_sale_elements' table. * @@ -232,7 +233,7 @@ class ProductSaleElementsTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -252,12 +253,13 @@ class ProductSaleElementsTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -273,8 +275,8 @@ class ProductSaleElementsTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -291,8 +293,8 @@ class ProductSaleElementsTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductSaleElements object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductSaleElements object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -316,10 +318,10 @@ class ProductSaleElementsTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -352,10 +354,10 @@ class ProductSaleElementsTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -391,7 +393,7 @@ class ProductSaleElementsTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -412,13 +414,13 @@ class ProductSaleElementsTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductSaleElements or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductSaleElements object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductSaleElements object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -451,8 +453,8 @@ class ProductSaleElementsTableMap extends TableMap /** * Deletes all rows from the product_sale_elements table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -462,11 +464,11 @@ class ProductSaleElementsTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductSaleElements or Criteria object. * - * @param mixed $criteria Criteria or ProductSaleElements object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductSaleElements object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -484,6 +486,7 @@ class ProductSaleElementsTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProductSaleElementsTableMap::ID.')'); } + // Set the correct dbName $query = ProductSaleElementsQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductTableMap.php b/core/lib/Thelia/Model/Map/ProductTableMap.php index abb6b01df..daba44213 100644 --- a/core/lib/Thelia/Model/Map/ProductTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Product; use Thelia\Model\ProductQuery; + /** * This class defines the structure of the 'product' table. * @@ -262,7 +263,7 @@ class ProductTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -282,12 +283,13 @@ class ProductTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -303,8 +305,8 @@ class ProductTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -321,8 +323,8 @@ class ProductTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Product object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Product object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -346,10 +348,10 @@ class ProductTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -382,10 +384,10 @@ class ProductTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -421,7 +423,7 @@ class ProductTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -442,13 +444,13 @@ class ProductTableMap extends TableMap /** * Performs a DELETE on the database, given a Product or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Product object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Product object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -481,8 +483,8 @@ class ProductTableMap extends TableMap /** * Deletes all rows from the product table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -492,11 +494,11 @@ class ProductTableMap extends TableMap /** * Performs an INSERT on the database, given a Product or Criteria object. * - * @param mixed $criteria Criteria or Product object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Product object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -514,6 +516,7 @@ class ProductTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProductTableMap::ID.')'); } + // Set the correct dbName $query = ProductQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProductVersionTableMap.php b/core/lib/Thelia/Model/Map/ProductVersionTableMap.php index e3129970d..e3e36c8be 100644 --- a/core/lib/Thelia/Model/Map/ProductVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductVersionTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProductVersion; use Thelia\Model\ProductVersionQuery; + /** * This class defines the structure of the 'product_version' table. * @@ -205,7 +206,7 @@ class ProductVersionTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProductVersion $obj A \Thelia\Model\ProductVersion object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -258,7 +259,7 @@ class ProductVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -278,12 +279,13 @@ class ProductVersionTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -295,8 +297,8 @@ class ProductVersionTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -313,8 +315,8 @@ class ProductVersionTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProductVersion object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProductVersion object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -338,10 +340,10 @@ class ProductVersionTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -374,10 +376,10 @@ class ProductVersionTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -413,7 +415,7 @@ class ProductVersionTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -434,13 +436,13 @@ class ProductVersionTableMap extends TableMap /** * Performs a DELETE on the database, given a ProductVersion or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProductVersion object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProductVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -483,8 +485,8 @@ class ProductVersionTableMap extends TableMap /** * Deletes all rows from the product_version table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -494,11 +496,11 @@ class ProductVersionTableMap extends TableMap /** * Performs an INSERT on the database, given a ProductVersion or Criteria object. * - * @param mixed $criteria Criteria or ProductVersion object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProductVersion object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -512,6 +514,7 @@ class ProductVersionTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProductVersion object } + // Set the correct dbName $query = ProductVersionQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php b/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php index 47e783779..90d0a8a4f 100644 --- a/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProfileI18n; use Thelia\Model\ProfileI18nQuery; + /** * This class defines the structure of the 'profile_i18n' table. * @@ -175,7 +176,7 @@ class ProfileI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProfileI18n $obj A \Thelia\Model\ProfileI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ProfileI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ProfileI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ProfileI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ProfileI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProfileI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProfileI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ProfileI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ProfileI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ProfileI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ProfileI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ProfileI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProfileI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProfileI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ProfileI18nTableMap extends TableMap /** * Deletes all rows from the profile_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ProfileI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ProfileI18n or Criteria object. * - * @param mixed $criteria Criteria or ProfileI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProfileI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ProfileI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProfileI18n object } + // Set the correct dbName $query = ProfileI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php b/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php index 077f2d94c..be69b51c8 100644 --- a/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProfileModule; use Thelia\Model\ProfileModuleQuery; + /** * This class defines the structure of the 'profile_module' table. * @@ -183,7 +184,7 @@ class ProfileModuleTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProfileModule $obj A \Thelia\Model\ProfileModule object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -236,7 +237,7 @@ class ProfileModuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -256,12 +257,13 @@ class ProfileModuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -273,8 +275,8 @@ class ProfileModuleTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -291,8 +293,8 @@ class ProfileModuleTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProfileModule object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProfileModule object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -316,10 +318,10 @@ class ProfileModuleTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -352,10 +354,10 @@ class ProfileModuleTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -379,7 +381,7 @@ class ProfileModuleTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -400,13 +402,13 @@ class ProfileModuleTableMap extends TableMap /** * Performs a DELETE on the database, given a ProfileModule or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProfileModule object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProfileModule object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -449,8 +451,8 @@ class ProfileModuleTableMap extends TableMap /** * Deletes all rows from the profile_module table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -460,11 +462,11 @@ class ProfileModuleTableMap extends TableMap /** * Performs an INSERT on the database, given a ProfileModule or Criteria object. * - * @param mixed $criteria Criteria or ProfileModule object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProfileModule object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -478,6 +480,7 @@ class ProfileModuleTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProfileModule object } + // Set the correct dbName $query = ProfileModuleQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php b/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php index 2cd77bb4b..de7648d54 100644 --- a/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ProfileResource; use Thelia\Model\ProfileResourceQuery; + /** * This class defines the structure of the 'profile_resource' table. * @@ -184,7 +185,7 @@ class ProfileResourceTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ProfileResource $obj A \Thelia\Model\ProfileResource object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -237,7 +238,7 @@ class ProfileResourceTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -257,12 +258,13 @@ class ProfileResourceTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -274,8 +276,8 @@ class ProfileResourceTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -292,8 +294,8 @@ class ProfileResourceTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ProfileResource object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ProfileResource object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -317,10 +319,10 @@ class ProfileResourceTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -353,10 +355,10 @@ class ProfileResourceTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -380,7 +382,7 @@ class ProfileResourceTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -401,13 +403,13 @@ class ProfileResourceTableMap extends TableMap /** * Performs a DELETE on the database, given a ProfileResource or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ProfileResource object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ProfileResource object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -450,8 +452,8 @@ class ProfileResourceTableMap extends TableMap /** * Deletes all rows from the profile_resource table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -461,11 +463,11 @@ class ProfileResourceTableMap extends TableMap /** * Performs an INSERT on the database, given a ProfileResource or Criteria object. * - * @param mixed $criteria Criteria or ProfileResource object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ProfileResource object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -479,6 +481,7 @@ class ProfileResourceTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProfileResource object } + // Set the correct dbName $query = ProfileResourceQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProfileTableMap.php b/core/lib/Thelia/Model/Map/ProfileTableMap.php index 449041c92..61190a033 100644 --- a/core/lib/Thelia/Model/Map/ProfileTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Profile; use Thelia\Model\ProfileQuery; + /** * This class defines the structure of the 'profile' table. * @@ -201,7 +202,7 @@ class ProfileTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -221,12 +222,13 @@ class ProfileTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -242,8 +244,8 @@ class ProfileTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -260,8 +262,8 @@ class ProfileTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Profile object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Profile object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -285,10 +287,10 @@ class ProfileTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -321,10 +323,10 @@ class ProfileTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -346,7 +348,7 @@ class ProfileTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -367,13 +369,13 @@ class ProfileTableMap extends TableMap /** * Performs a DELETE on the database, given a Profile or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Profile object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Profile object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -406,8 +408,8 @@ class ProfileTableMap extends TableMap /** * Deletes all rows from the profile table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -417,11 +419,11 @@ class ProfileTableMap extends TableMap /** * Performs an INSERT on the database, given a Profile or Criteria object. * - * @param mixed $criteria Criteria or Profile object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Profile object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -439,6 +441,7 @@ class ProfileTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProfileTableMap::ID.')'); } + // Set the correct dbName $query = ProfileQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php b/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php index 39769d634..f38018e8d 100644 --- a/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\ResourceI18n; use Thelia\Model\ResourceI18nQuery; + /** * This class defines the structure of the 'resource_i18n' table. * @@ -175,7 +176,7 @@ class ResourceI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\ResourceI18n $obj A \Thelia\Model\ResourceI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -228,7 +229,7 @@ class ResourceI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -248,12 +249,13 @@ class ResourceI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -265,8 +267,8 @@ class ResourceI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -283,8 +285,8 @@ class ResourceI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (ResourceI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (ResourceI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -308,10 +310,10 @@ class ResourceI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -344,10 +346,10 @@ class ResourceI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -373,7 +375,7 @@ class ResourceI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -394,13 +396,13 @@ class ResourceI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a ResourceI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or ResourceI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or ResourceI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -443,8 +445,8 @@ class ResourceI18nTableMap extends TableMap /** * Deletes all rows from the resource_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -454,11 +456,11 @@ class ResourceI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a ResourceI18n or Criteria object. * - * @param mixed $criteria Criteria or ResourceI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or ResourceI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -472,6 +474,7 @@ class ResourceI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ResourceI18n object } + // Set the correct dbName $query = ResourceI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ResourceTableMap.php b/core/lib/Thelia/Model/Map/ResourceTableMap.php index 2d1abc0ca..bc10fcbf7 100644 --- a/core/lib/Thelia/Model/Map/ResourceTableMap.php +++ b/core/lib/Thelia/Model/Map/ResourceTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Resource; use Thelia\Model\ResourceQuery; + /** * This class defines the structure of the 'resource' table. * @@ -198,7 +199,7 @@ class ResourceTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -218,12 +219,13 @@ class ResourceTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -239,8 +241,8 @@ class ResourceTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -257,8 +259,8 @@ class ResourceTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Resource object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Resource object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -282,10 +284,10 @@ class ResourceTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -318,10 +320,10 @@ class ResourceTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -343,7 +345,7 @@ class ResourceTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -364,13 +366,13 @@ class ResourceTableMap extends TableMap /** * Performs a DELETE on the database, given a Resource or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Resource object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Resource object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -403,8 +405,8 @@ class ResourceTableMap extends TableMap /** * Deletes all rows from the resource table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -414,11 +416,11 @@ class ResourceTableMap extends TableMap /** * Performs an INSERT on the database, given a Resource or Criteria object. * - * @param mixed $criteria Criteria or Resource object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Resource object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -436,6 +438,7 @@ class ResourceTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.ResourceTableMap::ID.')'); } + // Set the correct dbName $query = ResourceQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php b/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php index 9035add9e..613c2ad14 100644 --- a/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php +++ b/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\RewritingArgument; use Thelia\Model\RewritingArgumentQuery; + /** * This class defines the structure of the 'rewriting_argument' table. * @@ -182,7 +183,7 @@ class RewritingArgumentTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\RewritingArgument $obj A \Thelia\Model\RewritingArgument object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -235,7 +236,7 @@ class RewritingArgumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -255,12 +256,13 @@ class RewritingArgumentTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -272,8 +274,8 @@ class RewritingArgumentTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -290,8 +292,8 @@ class RewritingArgumentTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (RewritingArgument object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (RewritingArgument object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -315,10 +317,10 @@ class RewritingArgumentTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -351,10 +353,10 @@ class RewritingArgumentTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -378,7 +380,7 @@ class RewritingArgumentTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -399,13 +401,13 @@ class RewritingArgumentTableMap extends TableMap /** * Performs a DELETE on the database, given a RewritingArgument or Criteria object OR a primary key value. * - * @param mixed $values Criteria or RewritingArgument object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or RewritingArgument object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -449,8 +451,8 @@ class RewritingArgumentTableMap extends TableMap /** * Deletes all rows from the rewriting_argument table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -460,11 +462,11 @@ class RewritingArgumentTableMap extends TableMap /** * Performs an INSERT on the database, given a RewritingArgument or Criteria object. * - * @param mixed $criteria Criteria or RewritingArgument object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or RewritingArgument object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -478,6 +480,7 @@ class RewritingArgumentTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from RewritingArgument object } + // Set the correct dbName $query = RewritingArgumentQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php b/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php index b8eb03b83..aa7e1604b 100644 --- a/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php +++ b/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\RewritingUrl; use Thelia\Model\RewritingUrlQuery; + /** * This class defines the structure of the 'rewriting_url' table. * @@ -211,7 +212,7 @@ class RewritingUrlTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -231,12 +232,13 @@ class RewritingUrlTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -252,8 +254,8 @@ class RewritingUrlTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -270,8 +272,8 @@ class RewritingUrlTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (RewritingUrl object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (RewritingUrl object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -295,10 +297,10 @@ class RewritingUrlTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -331,10 +333,10 @@ class RewritingUrlTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -364,7 +366,7 @@ class RewritingUrlTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -385,13 +387,13 @@ class RewritingUrlTableMap extends TableMap /** * Performs a DELETE on the database, given a RewritingUrl or Criteria object OR a primary key value. * - * @param mixed $values Criteria or RewritingUrl object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or RewritingUrl object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -424,8 +426,8 @@ class RewritingUrlTableMap extends TableMap /** * Deletes all rows from the rewriting_url table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -435,11 +437,11 @@ class RewritingUrlTableMap extends TableMap /** * Performs an INSERT on the database, given a RewritingUrl or Criteria object. * - * @param mixed $criteria Criteria or RewritingUrl object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or RewritingUrl object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -457,6 +459,7 @@ class RewritingUrlTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.RewritingUrlTableMap::ID.')'); } + // Set the correct dbName $query = RewritingUrlQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/TaxI18nTableMap.php b/core/lib/Thelia/Model/Map/TaxI18nTableMap.php index 700fa089e..222bfa833 100644 --- a/core/lib/Thelia/Model/Map/TaxI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\TaxI18n; use Thelia\Model\TaxI18nQuery; + /** * This class defines the structure of the 'tax_i18n' table. * @@ -163,7 +164,7 @@ class TaxI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\TaxI18n $obj A \Thelia\Model\TaxI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -216,7 +217,7 @@ class TaxI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -236,12 +237,13 @@ class TaxI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -253,8 +255,8 @@ class TaxI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -271,8 +273,8 @@ class TaxI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (TaxI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (TaxI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -296,10 +298,10 @@ class TaxI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -332,10 +334,10 @@ class TaxI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class TaxI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class TaxI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a TaxI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or TaxI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or TaxI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -427,8 +429,8 @@ class TaxI18nTableMap extends TableMap /** * Deletes all rows from the tax_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -438,11 +440,11 @@ class TaxI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a TaxI18n or Criteria object. * - * @param mixed $criteria Criteria or TaxI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or TaxI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -456,6 +458,7 @@ class TaxI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from TaxI18n object } + // Set the correct dbName $query = TaxI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php index 4c999f3f6..6fe5c8cd5 100644 --- a/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\TaxRuleCountry; use Thelia\Model\TaxRuleCountryQuery; + /** * This class defines the structure of the 'tax_rule_country' table. * @@ -190,7 +191,7 @@ class TaxRuleCountryTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\TaxRuleCountry $obj A \Thelia\Model\TaxRuleCountry object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -243,7 +244,7 @@ class TaxRuleCountryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -263,12 +264,13 @@ class TaxRuleCountryTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -280,8 +282,8 @@ class TaxRuleCountryTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -298,8 +300,8 @@ class TaxRuleCountryTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (TaxRuleCountry object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (TaxRuleCountry object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -323,10 +325,10 @@ class TaxRuleCountryTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -359,10 +361,10 @@ class TaxRuleCountryTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -388,7 +390,7 @@ class TaxRuleCountryTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -409,13 +411,13 @@ class TaxRuleCountryTableMap extends TableMap /** * Performs a DELETE on the database, given a TaxRuleCountry or Criteria object OR a primary key value. * - * @param mixed $values Criteria or TaxRuleCountry object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or TaxRuleCountry object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -459,8 +461,8 @@ class TaxRuleCountryTableMap extends TableMap /** * Deletes all rows from the tax_rule_country table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -470,11 +472,11 @@ class TaxRuleCountryTableMap extends TableMap /** * Performs an INSERT on the database, given a TaxRuleCountry or Criteria object. * - * @param mixed $criteria Criteria or TaxRuleCountry object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or TaxRuleCountry object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -488,6 +490,7 @@ class TaxRuleCountryTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from TaxRuleCountry object } + // Set the correct dbName $query = TaxRuleCountryQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php index 524c5ac11..74cea24f3 100644 --- a/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\TaxRuleI18n; use Thelia\Model\TaxRuleI18nQuery; + /** * This class defines the structure of the 'tax_rule_i18n' table. * @@ -163,7 +164,7 @@ class TaxRuleI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\TaxRuleI18n $obj A \Thelia\Model\TaxRuleI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -216,7 +217,7 @@ class TaxRuleI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -236,12 +237,13 @@ class TaxRuleI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -253,8 +255,8 @@ class TaxRuleI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -271,8 +273,8 @@ class TaxRuleI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (TaxRuleI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (TaxRuleI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -296,10 +298,10 @@ class TaxRuleI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -332,10 +334,10 @@ class TaxRuleI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -357,7 +359,7 @@ class TaxRuleI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -378,13 +380,13 @@ class TaxRuleI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a TaxRuleI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or TaxRuleI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or TaxRuleI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -427,8 +429,8 @@ class TaxRuleI18nTableMap extends TableMap /** * Deletes all rows from the tax_rule_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -438,11 +440,11 @@ class TaxRuleI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a TaxRuleI18n or Criteria object. * - * @param mixed $criteria Criteria or TaxRuleI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or TaxRuleI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -456,6 +458,7 @@ class TaxRuleI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from TaxRuleI18n object } + // Set the correct dbName $query = TaxRuleI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/TaxRuleTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleTableMap.php index 89b7afb04..afc242df3 100644 --- a/core/lib/Thelia/Model/Map/TaxRuleTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxRuleTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\TaxRule; use Thelia\Model\TaxRuleQuery; + /** * This class defines the structure of the 'tax_rule' table. * @@ -198,7 +199,7 @@ class TaxRuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -218,12 +219,13 @@ class TaxRuleTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -239,8 +241,8 @@ class TaxRuleTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -257,8 +259,8 @@ class TaxRuleTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (TaxRule object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (TaxRule object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -282,10 +284,10 @@ class TaxRuleTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -318,10 +320,10 @@ class TaxRuleTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -343,7 +345,7 @@ class TaxRuleTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -364,13 +366,13 @@ class TaxRuleTableMap extends TableMap /** * Performs a DELETE on the database, given a TaxRule or Criteria object OR a primary key value. * - * @param mixed $values Criteria or TaxRule object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or TaxRule object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -403,8 +405,8 @@ class TaxRuleTableMap extends TableMap /** * Deletes all rows from the tax_rule table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -414,11 +416,11 @@ class TaxRuleTableMap extends TableMap /** * Performs an INSERT on the database, given a TaxRule or Criteria object. * - * @param mixed $criteria Criteria or TaxRule object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or TaxRule object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -436,6 +438,7 @@ class TaxRuleTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.TaxRuleTableMap::ID.')'); } + // Set the correct dbName $query = TaxRuleQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/TaxTableMap.php b/core/lib/Thelia/Model/Map/TaxTableMap.php index 9411259ce..360291504 100644 --- a/core/lib/Thelia/Model/Map/TaxTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Tax; use Thelia\Model\TaxQuery; + /** * This class defines the structure of the 'tax' table. * @@ -203,7 +204,7 @@ class TaxTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -223,12 +224,13 @@ class TaxTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -244,8 +246,8 @@ class TaxTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -262,8 +264,8 @@ class TaxTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Tax object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Tax object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -287,10 +289,10 @@ class TaxTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -323,10 +325,10 @@ class TaxTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -350,7 +352,7 @@ class TaxTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -371,13 +373,13 @@ class TaxTableMap extends TableMap /** * Performs a DELETE on the database, given a Tax or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Tax object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Tax object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -410,8 +412,8 @@ class TaxTableMap extends TableMap /** * Deletes all rows from the tax table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -421,11 +423,11 @@ class TaxTableMap extends TableMap /** * Performs an INSERT on the database, given a Tax or Criteria object. * - * @param mixed $criteria Criteria or Tax object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Tax object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -443,6 +445,7 @@ class TaxTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.TaxTableMap::ID.')'); } + // Set the correct dbName $query = TaxQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php b/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php index 04d444b7b..b47656ec0 100644 --- a/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\TemplateI18n; use Thelia\Model\TemplateI18nQuery; + /** * This class defines the structure of the 'template_i18n' table. * @@ -157,7 +158,7 @@ class TemplateI18nTableMap extends TableMap * and findPk*() calls. * * @param \Thelia\Model\TemplateI18n $obj A \Thelia\Model\TemplateI18n object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { @@ -210,7 +211,7 @@ class TemplateI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -230,12 +231,13 @@ class TemplateI18nTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return $pks; } @@ -247,8 +249,8 @@ class TemplateI18nTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -265,8 +267,8 @@ class TemplateI18nTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (TemplateI18n object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (TemplateI18n object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -290,10 +292,10 @@ class TemplateI18nTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -326,10 +328,10 @@ class TemplateI18nTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -349,7 +351,7 @@ class TemplateI18nTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -370,13 +372,13 @@ class TemplateI18nTableMap extends TableMap /** * Performs a DELETE on the database, given a TemplateI18n or Criteria object OR a primary key value. * - * @param mixed $values Criteria or TemplateI18n object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or TemplateI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -419,8 +421,8 @@ class TemplateI18nTableMap extends TableMap /** * Deletes all rows from the template_i18n table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -430,11 +432,11 @@ class TemplateI18nTableMap extends TableMap /** * Performs an INSERT on the database, given a TemplateI18n or Criteria object. * - * @param mixed $criteria Criteria or TemplateI18n object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or TemplateI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -448,6 +450,7 @@ class TemplateI18nTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from TemplateI18n object } + // Set the correct dbName $query = TemplateI18nQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/TemplateTableMap.php b/core/lib/Thelia/Model/Map/TemplateTableMap.php index a8ca8d607..901007c03 100644 --- a/core/lib/Thelia/Model/Map/TemplateTableMap.php +++ b/core/lib/Thelia/Model/Map/TemplateTableMap.php @@ -14,6 +14,7 @@ use Propel\Runtime\Map\TableMapTrait; use Thelia\Model\Template; use Thelia\Model\TemplateQuery; + /** * This class defines the structure of the 'template' table. * @@ -194,7 +195,7 @@ class TemplateTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM */ public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -214,12 +215,13 @@ class TemplateTableMap extends TableMap * @param array $row resultset row. * @param int $offset The 0-based offset for reading from the resultset row. * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM * * @return mixed The primary key of the row */ public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { + return (int) $row[ $indexType == TableMap::TYPE_NUM ? 0 + $offset @@ -235,8 +237,8 @@ class TemplateTableMap extends TableMap * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName */ public static function getOMClass($withPrefix = true) { @@ -253,8 +255,8 @@ class TemplateTableMap extends TableMap * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. * * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (Template object, last column rank) + * rethrown wrapped into a PropelException. + * @return array (Template object, last column rank) */ public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { @@ -278,10 +280,10 @@ class TemplateTableMap extends TableMap * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @param DataFetcherInterface $dataFetcher + * @param DataFetcherInterface $dataFetcher * @return array - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function populateObjects(DataFetcherInterface $dataFetcher) { @@ -314,10 +316,10 @@ class TemplateTableMap extends TableMap * XML schema will not be added to the select list and only loaded * on demand. * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $alias = null) { @@ -337,7 +339,7 @@ class TemplateTableMap extends TableMap * This method is not needed for general use but a specific application could have a need. * @return TableMap * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * rethrown wrapped into a PropelException. */ public static function getTableMap() { @@ -358,13 +360,13 @@ class TemplateTableMap extends TableMap /** * Performs a DELETE on the database, given a Template or Criteria object OR a primary key value. * - * @param mixed $values Criteria or Template object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or Template object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doDelete($values, ConnectionInterface $con = null) { @@ -397,8 +399,8 @@ class TemplateTableMap extends TableMap /** * Deletes all rows from the template table. * - * @param ConnectionInterface $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll(ConnectionInterface $con = null) { @@ -408,11 +410,11 @@ class TemplateTableMap extends TableMap /** * Performs an INSERT on the database, given a Template or Criteria object. * - * @param mixed $criteria Criteria or Template object containing data that is used to create the INSERT statement. - * @param ConnectionInterface $con the ConnectionInterface connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $criteria Criteria or Template object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ public static function doInsert($criteria, ConnectionInterface $con = null) { @@ -430,6 +432,7 @@ class TemplateTableMap extends TableMap throw new PropelException('Cannot insert a value for auto-increment primary key ('.TemplateTableMap::ID.')'); } + // Set the correct dbName $query = TemplateQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Module/PaymentModuleInterface.php b/core/lib/Thelia/Module/PaymentModuleInterface.php index 035123ba7..bb6d03854 100644 --- a/core/lib/Thelia/Module/PaymentModuleInterface.php +++ b/core/lib/Thelia/Module/PaymentModuleInterface.php @@ -37,7 +37,7 @@ interface PaymentModuleInterface extends BaseModuleInterface * In many cases, it's necessary to send a form to the payment gateway. On your response you can return this form already * completed, ready to be sent * - * @param \Thelia\Model\Order $order processed order + * @param \Thelia\Model\Order $order processed order * @return null|\Thelia\Core\HttpFoundation\Response */ public function pay(Order $order); diff --git a/core/lib/Thelia/Tests/Action/AddressTest.php b/core/lib/Thelia/Tests/Action/AddressTest.php index ba567bb60..d10dc2e9a 100644 --- a/core/lib/Thelia/Tests/Action/AddressTest.php +++ b/core/lib/Thelia/Tests/Action/AddressTest.php @@ -27,7 +27,6 @@ use Thelia\Action\Address; use Thelia\Core\Event\Address\AddressCreateOrUpdateEvent; use Thelia\Model\Base\CustomerQuery; - /** * * test address eventListener diff --git a/core/lib/Thelia/Tests/Action/AdministratorTest.php b/core/lib/Thelia/Tests/Action/AdministratorTest.php index bfaee0d6b..485cb8d87 100644 --- a/core/lib/Thelia/Tests/Action/AdministratorTest.php +++ b/core/lib/Thelia/Tests/Action/AdministratorTest.php @@ -29,7 +29,6 @@ use Thelia\Core\Event\Administrator\AdministratorUpdatePasswordEvent; use Thelia\Model\AdminQuery; use Thelia\Model\LangQuery; - /** * Class AdministratorTest * @package Thelia\Tests\Action @@ -139,5 +138,4 @@ class AdministratorTest extends \PHPUnit_Framework_TestCase $this->assertTrue(password_verify($adminEvent->getPassword(), $updatedAdmin->getPassword())); } - -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/AreaTest.php b/core/lib/Thelia/Tests/Action/AreaTest.php index bfc756e5b..9e826a056 100644 --- a/core/lib/Thelia/Tests/Action/AreaTest.php +++ b/core/lib/Thelia/Tests/Action/AreaTest.php @@ -32,7 +32,6 @@ use Thelia\Core\Event\Area\AreaUpdatePostageEvent; use Thelia\Model\Area as AreaModel; use Thelia\Model\CountryQuery; - /** * Class AreaTest * @package Thelia\Tests\Action @@ -149,4 +148,4 @@ class AreaTest extends \PHPUnit_Framework_TestCase $this->assertTrue($deletedArea->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/AttributeAvTest.php b/core/lib/Thelia/Tests/Action/AttributeAvTest.php index 0a8c6564a..665afe2a2 100644 --- a/core/lib/Thelia/Tests/Action/AttributeAvTest.php +++ b/core/lib/Thelia/Tests/Action/AttributeAvTest.php @@ -30,7 +30,6 @@ use Thelia\Core\Event\Attribute\AttributeAvUpdateEvent; use Thelia\Model\AttributeQuery; use Thelia\Model\AttributeAv as AttributeAvModel; - /** * Class AttributeAvTest * @package Thelia\Tests\Action @@ -117,4 +116,4 @@ class AttributeAvTest extends \PHPUnit_Framework_TestCase $this->assertTrue($deletedAttributeAv->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/AttributeTest.php b/core/lib/Thelia/Tests/Action/AttributeTest.php index d5fdd9ead..9054992ff 100644 --- a/core/lib/Thelia/Tests/Action/AttributeTest.php +++ b/core/lib/Thelia/Tests/Action/AttributeTest.php @@ -29,7 +29,6 @@ use Thelia\Core\Event\Attribute\AttributeUpdateEvent; use Thelia\Model\Attribute as AttributeModel; use Thelia\Core\Event\Attribute\AttributeCreateEvent; - /** * Class AttributeTest * @package Thelia\Tests\Action @@ -108,4 +107,4 @@ class AttributeTest extends \PHPUnit_Framework_TestCase $this->assertTrue($deletedAttribute->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/CacheTest.php b/core/lib/Thelia/Tests/Action/CacheTest.php index 5768581e5..a0235c696 100644 --- a/core/lib/Thelia/Tests/Action/CacheTest.php +++ b/core/lib/Thelia/Tests/Action/CacheTest.php @@ -27,7 +27,6 @@ use Symfony\Component\Filesystem\Filesystem; use Thelia\Action\Cache; use Thelia\Core\Event\Cache\CacheEvent; - /** * Class CacheTest * @package Thelia\Tests\Action\assets @@ -56,4 +55,4 @@ class CacheTest extends \PHPUnit_Framework_TestCase $fs = new Filesystem(); $this->assertFalse($fs->exists($this->dir)); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/CategoryTest.php b/core/lib/Thelia/Tests/Action/CategoryTest.php index b7e839bdd..ee8d31c81 100644 --- a/core/lib/Thelia/Tests/Action/CategoryTest.php +++ b/core/lib/Thelia/Tests/Action/CategoryTest.php @@ -23,19 +23,14 @@ namespace Thelia\Tests\Action; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\Routing\Router; use Thelia\Action\Category; use Thelia\Core\Event\Category\CategoryDeleteEvent; use Thelia\Core\Event\Category\CategoryToggleVisibilityEvent; use Thelia\Core\Event\Category\CategoryUpdateEvent; -use Thelia\Core\Event\UpdateSeoEvent; use Thelia\Model\Category as CategoryModel; use Thelia\Core\Event\Category\CategoryCreateEvent; use Thelia\Model\CategoryQuery; use Thelia\Tests\TestCaseWithURLToolSetup; -use Thelia\Tools\URL; - /** * Class CategoryTest @@ -162,4 +157,4 @@ class CategoryTest extends TestCaseWithURLToolSetup $this->assertInstanceOf('Thelia\Model\Category', $updatedCategory); $this->assertEquals($expectedVisibility, $updatedCategory->getVisible()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/ConfigTest.php b/core/lib/Thelia/Tests/Action/ConfigTest.php index cff430894..5ed9e9633 100644 --- a/core/lib/Thelia/Tests/Action/ConfigTest.php +++ b/core/lib/Thelia/Tests/Action/ConfigTest.php @@ -30,7 +30,6 @@ use Thelia\Core\Event\Config\ConfigUpdateEvent; use Thelia\Model\Config as ConfigModel; use Thelia\Model\ConfigQuery; - /** * Class ConfigTest * @package Thelia\Tests\Action @@ -38,7 +37,7 @@ use Thelia\Model\ConfigQuery; */ class ConfigTest extends \PHPUnit_Framework_TestCase { - protected $dispatcher; + protected $dispatcher; public static function setUpBeforeClass() { @@ -170,4 +169,4 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $this->assertTrue($deletedConfig->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/CountryTest.php b/core/lib/Thelia/Tests/Action/CountryTest.php index 683c187c4..0ea497fde 100644 --- a/core/lib/Thelia/Tests/Action/CountryTest.php +++ b/core/lib/Thelia/Tests/Action/CountryTest.php @@ -31,7 +31,6 @@ use Thelia\Core\Event\Country\CountryUpdateEvent; use Thelia\Model\Country as CountryModel; use Thelia\Model\CountryQuery; - /** * Class CountryTest * @package Thelia\Tests\Action @@ -39,14 +38,13 @@ use Thelia\Model\CountryQuery; */ class CountryTest extends \PHPUnit_Framework_TestCase { - protected $dispatcher; + protected $dispatcher; public function setUp() { $this->dispatcher = $this->getMock("Symfony\Component\EventDispatcher\EventDispatcherInterface"); } - public function testCreate() { $event = new CountryCreateEvent(); @@ -148,4 +146,4 @@ class CountryTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1, CountryQuery::create()->filterByByDefault(1)->count()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/CurrencyTest.php b/core/lib/Thelia/Tests/Action/CurrencyTest.php index 1dad3c982..01979455f 100644 --- a/core/lib/Thelia/Tests/Action/CurrencyTest.php +++ b/core/lib/Thelia/Tests/Action/CurrencyTest.php @@ -30,7 +30,6 @@ use Thelia\Model\Currency as CurrencyModel; use Thelia\Core\Event\Currency\CurrencyCreateEvent; use Thelia\Model\CurrencyQuery; - /** * Class CurrencyTest * @package Thelia\Tests\Action @@ -39,7 +38,7 @@ use Thelia\Model\CurrencyQuery; class CurrencyTest extends \PHPUnit_Framework_TestCase { - protected $dispatcher; + protected $dispatcher; public function setUp() { @@ -157,4 +156,4 @@ class CurrencyTest extends \PHPUnit_Framework_TestCase ->limit(1) ->update(array('ByDefault' => true)); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/FeatureAvTest.php b/core/lib/Thelia/Tests/Action/FeatureAvTest.php index e13ea3135..e6c66d45e 100644 --- a/core/lib/Thelia/Tests/Action/FeatureAvTest.php +++ b/core/lib/Thelia/Tests/Action/FeatureAvTest.php @@ -30,7 +30,6 @@ use Thelia\Core\Event\Feature\FeatureAvUpdateEvent; use Thelia\Model\FeatureAv as FeatureAvModel; use Thelia\Model\FeatureQuery; - /** * Class FeatureAvTest * @package Thelia\Tests\Action @@ -137,4 +136,4 @@ class FeatureAvTest extends \PHPUnit_Framework_TestCase $this->assertTrue($deletedFeatureAv->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/FeatureTest.php b/core/lib/Thelia/Tests/Action/FeatureTest.php index 49681a690..e2604079a 100644 --- a/core/lib/Thelia/Tests/Action/FeatureTest.php +++ b/core/lib/Thelia/Tests/Action/FeatureTest.php @@ -29,7 +29,6 @@ use Thelia\Core\Event\Feature\FeatureUpdateEvent; use Thelia\Model\Feature as FeatureModel; use Thelia\Core\Event\Feature\FeatureCreateEvent; - /** * Class FeatureTest * @package Thelia\Tests\Action @@ -121,4 +120,4 @@ class FeatureTest extends \PHPUnit_Framework_TestCase } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/LangTest.php b/core/lib/Thelia/Tests/Action/LangTest.php index 6aff5ac69..b187479eb 100644 --- a/core/lib/Thelia/Tests/Action/LangTest.php +++ b/core/lib/Thelia/Tests/Action/LangTest.php @@ -31,7 +31,6 @@ use Thelia\Model\LangQuery; use Thelia\Model\Lang as LangModel; use Thelia\Core\Event\Lang\LangCreateEvent; - /** * Class LangTest * @package Thelia\Tests\Action @@ -170,4 +169,4 @@ class LangTest extends \PHPUnit_Framework_TestCase ->update(array('ByDefault' => true)); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/MessageTest.php b/core/lib/Thelia/Tests/Action/MessageTest.php index 822735b27..f5a53bb2c 100644 --- a/core/lib/Thelia/Tests/Action/MessageTest.php +++ b/core/lib/Thelia/Tests/Action/MessageTest.php @@ -30,7 +30,6 @@ use Thelia\Model\Message as MessageModel; use Thelia\Core\Event\Message\MessageCreateEvent; use Thelia\Model\MessageQuery; - /** * Class MessageTest * @package Thelia\Tests\Action @@ -71,7 +70,6 @@ class MessageTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Thelia\Model\Message', $createdMessage); $this->assertFalse($createdMessage->isNew()); - $this->assertEquals('test', $createdMessage->getName()); $this->assertEquals('en_US', $createdMessage->getLocale()); $this->assertEquals('test title', $createdMessage->getTitle()); @@ -138,4 +136,4 @@ class MessageTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Thelia\Model\Message', $deletedMessage); $this->assertTrue($deletedMessage->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/NewsletterTest.php b/core/lib/Thelia/Tests/Action/NewsletterTest.php index 095a765ef..acea9752a 100644 --- a/core/lib/Thelia/Tests/Action/NewsletterTest.php +++ b/core/lib/Thelia/Tests/Action/NewsletterTest.php @@ -28,7 +28,6 @@ use Thelia\Model\Newsletter as NewsletterModel; use Thelia\Core\Event\Newsletter\NewsletterEvent; use Thelia\Model\NewsletterQuery; - /** * Class NewsletterTest * @package Thelia\Tests\Action @@ -110,4 +109,4 @@ class NewsletterTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Thelia\Model\Newsletter', $deletedNewsletter); $this->assertTrue($deletedNewsletter->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/OrderTest.php b/core/lib/Thelia/Tests/Action/OrderTest.php index 6fcd79e88..fa2f640fd 100644 --- a/core/lib/Thelia/Tests/Action/OrderTest.php +++ b/core/lib/Thelia/Tests/Action/OrderTest.php @@ -567,4 +567,4 @@ class OrderTest extends \PHPUnit_Framework_TestCase $this->assertEquals('J', $newOrderAddress->getPhone()); $this->assertEquals('K', $newOrderAddress->getCompany()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/PdfTest.php b/core/lib/Thelia/Tests/Action/PdfTest.php index 8c565de96..2d5d772d5 100644 --- a/core/lib/Thelia/Tests/Action/PdfTest.php +++ b/core/lib/Thelia/Tests/Action/PdfTest.php @@ -26,7 +26,6 @@ namespace Thelia\Tests\Action; use Thelia\Action\Pdf; use Thelia\Core\Event\PdfEvent; - /** * Class PdfTest * @package Thelia\Tests\Action @@ -47,4 +46,4 @@ class PdfTest extends \PHPUnit_Framework_TestCase $this->assertNotNull($generatedPdf); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/ProductTest.php b/core/lib/Thelia/Tests/Action/ProductTest.php index 602d99cea..91b6a2dcd 100644 --- a/core/lib/Thelia/Tests/Action/ProductTest.php +++ b/core/lib/Thelia/Tests/Action/ProductTest.php @@ -42,12 +42,10 @@ use Thelia\Model\ContentQuery; use Thelia\Model\CurrencyQuery; use Thelia\Model\ProductQuery; use Thelia\Model\Product as ProductModel; -use Thelia\Model\TaxRule; use Thelia\Model\TaxRuleQuery; use Thelia\Model\TemplateQuery; use Thelia\Tests\TestCaseWithURLToolSetup; - /** * Class ProductTest * @package Thelia\Tests\Action @@ -114,7 +112,6 @@ class ProductTest extends TestCaseWithURLToolSetup $productPrice = $defaultProductSaleElement->getProductPrices()->getFirst(); - $this->assertEquals(10, $productPrice->getPrice()); $this->assertEquals($currencyId, $productPrice->getCurrencyId()); @@ -379,7 +376,6 @@ class ProductTest extends TestCaseWithURLToolSetup $productPrice = $newProductSaleElements->getProductPrices()->getFirst(); - $this->assertEquals(0, $productPrice->getPrice()); $this->assertEquals(0, $productPrice->getPromoPrice()); $this->assertEquals($currencyId, $productPrice->getCurrencyId()); @@ -405,4 +401,4 @@ class ProductTest extends TestCaseWithURLToolSetup $this->assertTrue($deletedProduct->isDeleted()); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Action/ProfileTest.php b/core/lib/Thelia/Tests/Action/ProfileTest.php index e6b8568c1..dcf3c219a 100644 --- a/core/lib/Thelia/Tests/Action/ProfileTest.php +++ b/core/lib/Thelia/Tests/Action/ProfileTest.php @@ -29,7 +29,6 @@ use Thelia\Model\Profile as ProfileModel; use Thelia\Core\Event\Profile\ProfileEvent; use Thelia\Model\ProfileQuery; - /** * Class ProfileTest * @package Thelia\Tests\Action @@ -151,4 +150,4 @@ class ProfileTest extends \PHPUnit_Framework_TestCase $this->assertTrue($accessManager->can(AccessManager::CREATE)); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tests/Command/CacheClearTestSaved.php b/core/lib/Thelia/Tests/Command/CacheClearTestSaved.php index 0d88806f0..73a94e7dd 100755 --- a/core/lib/Thelia/Tests/Command/CacheClearTestSaved.php +++ b/core/lib/Thelia/Tests/Command/CacheClearTestSaved.php @@ -35,7 +35,7 @@ use Symfony\Component\Filesystem\Filesystem; * @package Thelia\Tests\Command * @author Manuel Raynaud */ -class CacheClearTest extends \PHPUnit_Framework_TestCase +class CacheClearTestSaved extends \PHPUnit_Framework_TestCase { public $cache_dir; diff --git a/core/lib/Thelia/Tests/Core/HttpFoundation/RequestTest.php b/core/lib/Thelia/Tests/Core/HttpFoundation/RequestTest.php index 8de88328b..63ef64940 100755 --- a/core/lib/Thelia/Tests/Core/HttpFoundation/RequestTest.php +++ b/core/lib/Thelia/Tests/Core/HttpFoundation/RequestTest.php @@ -2,8 +2,6 @@ namespace Thelia\Tests\Core\HttpFoundation; - - /** * the the helpers addinf in Request class * diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/Argument/ArgumentCollectionTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/Argument/ArgumentCollectionTest.php index df83d5d9a..fb0d95a69 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/Argument/ArgumentCollectionTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/Argument/ArgumentCollectionTest.php @@ -33,7 +33,7 @@ use Thelia\Type\TypeCollection; * @author Etienne Roudeix * */ -class ArgumentTest extends \PHPUnit_Framework_TestCase +class ArgumentCollectionTest extends \PHPUnit_Framework_TestCase { public function testArgumentCollectionCreateAndWalk() { diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/ProductSaleElementTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/ProductSaleElementTest.php index d8ed243ca..ea2ba403b 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/ProductSaleElementTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/ProductSaleElementTest.php @@ -32,7 +32,7 @@ use Thelia\Core\Template\Loop\ProductSaleElements; * @author Etienne Roudeix * */ -class ProductSaleElementsTest extends BaseLoopTestor +class ProductSaleElementTest extends BaseLoopTestor { public function getTestedClassName() { diff --git a/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php b/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php index c5a9d033e..e4478808e 100644 --- a/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php +++ b/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php @@ -63,8 +63,6 @@ class RemoveXPercentTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - - $currencies = CurrencyQuery::create()->find(); $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') diff --git a/core/lib/Thelia/Tests/Model/Message.php b/core/lib/Thelia/Tests/Model/Message.php index 661ec68e0..2c5101a43 100644 --- a/core/lib/Thelia/Tests/Model/Message.php +++ b/core/lib/Thelia/Tests/Model/Message.php @@ -39,7 +39,7 @@ use Thelia\Core\HttpFoundation\Session\Session; * @package Thelia\Tests\Action * @author Etienne Roudeix */ -class MessageTest extends \PHPUnit_Framework_TestCase +class Message extends \PHPUnit_Framework_TestCase { /** * @var ContainerBuilder $container diff --git a/core/lib/Thelia/Tests/Tools/FileManagerTest.php b/core/lib/Thelia/Tests/Tools/FileManagerTest.php index 35573a2ac..a96ab3866 100644 --- a/core/lib/Thelia/Tests/Tools/FileManagerTest.php +++ b/core/lib/Thelia/Tests/Tools/FileManagerTest.php @@ -12,7 +12,6 @@ namespace Thelia\Tests\Tools; use Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent; use Thelia\Core\Event\Image\ImageCreateOrUpdateEvent; - use Thelia\Model\CategoryQuery; use Thelia\Model\ContentQuery; use Thelia\Model\FolderQuery; diff --git a/core/lib/Thelia/Tests/Type/TypeCollectionTest.php b/core/lib/Thelia/Tests/Type/TypeCollectionTest.php index c223b2a5d..a1afb6889 100755 --- a/core/lib/Thelia/Tests/Type/TypeCollectionTest.php +++ b/core/lib/Thelia/Tests/Type/TypeCollectionTest.php @@ -31,7 +31,7 @@ use Thelia\Type\TypeCollection; * @author Etienne Roudeix * */ -class TypeTest extends \PHPUnit_Framework_TestCase +class TypeCollectionTest extends \PHPUnit_Framework_TestCase { public function testTypeCollectionConstruction() {