Overview

Namespaces

  • Thelia
    • Action
    • Controller
    • Core
      • Bundle
      • Event
      • EventListener
      • Template
        • BaseParam
    • Exception
    • Log
      • Destination
    • Model
      • map
      • om
    • Routing
      • Matcher
    • Tools
    • Tpex
      • BaseParam
      • Exception
      • Loop
      • Tests

Classes

  • BaseAccessory
  • BaseAccessoryPeer
  • BaseAccessoryQuery
  • BaseAddress
  • BaseAddressPeer
  • BaseAddressQuery
  • BaseAdmin
  • BaseAdminGroup
  • BaseAdminGroupPeer
  • BaseAdminGroupQuery
  • BaseAdminLog
  • BaseAdminLogPeer
  • BaseAdminLogQuery
  • BaseAdminPeer
  • BaseAdminQuery
  • BaseArea
  • BaseAreaPeer
  • BaseAreaQuery
  • BaseAttribute
  • BaseAttributeAv
  • BaseAttributeAvDesc
  • BaseAttributeAvDescPeer
  • BaseAttributeAvDescQuery
  • BaseAttributeAvI18n
  • BaseAttributeAvI18nPeer
  • BaseAttributeAvI18nQuery
  • BaseAttributeAvPeer
  • BaseAttributeAvQuery
  • BaseAttributeCategory
  • BaseAttributeCategoryPeer
  • BaseAttributeCategoryQuery
  • BaseAttributeCombination
  • BaseAttributeCombinationPeer
  • BaseAttributeCombinationQuery
  • BaseAttributeDesc
  • BaseAttributeDescPeer
  • BaseAttributeDescQuery
  • BaseAttributeI18n
  • BaseAttributeI18nPeer
  • BaseAttributeI18nQuery
  • BaseAttributePeer
  • BaseAttributeQuery
  • BaseCategory
  • BaseCategoryDesc
  • BaseCategoryDescPeer
  • BaseCategoryDescQuery
  • BaseCategoryI18n
  • BaseCategoryI18nPeer
  • BaseCategoryI18nQuery
  • BaseCategoryPeer
  • BaseCategoryQuery
  • BaseCategoryVersion
  • BaseCategoryVersionPeer
  • BaseCategoryVersionQuery
  • BaseCombination
  • BaseCombinationPeer
  • BaseCombinationQuery
  • BaseConfig
  • BaseConfigDesc
  • BaseConfigDescPeer
  • BaseConfigDescQuery
  • BaseConfigI18n
  • BaseConfigI18nPeer
  • BaseConfigI18nQuery
  • BaseConfigPeer
  • BaseConfigQuery
  • BaseContent
  • BaseContentAssoc
  • BaseContentAssocPeer
  • BaseContentAssocQuery
  • BaseContentDesc
  • BaseContentDescPeer
  • BaseContentDescQuery
  • BaseContentFolder
  • BaseContentFolderPeer
  • BaseContentFolderQuery
  • BaseContentI18n
  • BaseContentI18nPeer
  • BaseContentI18nQuery
  • BaseContentPeer
  • BaseContentQuery
  • BaseContentVersion
  • BaseContentVersionPeer
  • BaseContentVersionQuery
  • BaseCountry
  • BaseCountryDesc
  • BaseCountryDescPeer
  • BaseCountryDescQuery
  • BaseCountryI18n
  • BaseCountryI18nPeer
  • BaseCountryI18nQuery
  • BaseCountryPeer
  • BaseCountryQuery
  • BaseCoupon
  • BaseCouponOrder
  • BaseCouponOrderPeer
  • BaseCouponOrderQuery
  • BaseCouponPeer
  • BaseCouponQuery
  • BaseCouponRule
  • BaseCouponRulePeer
  • BaseCouponRuleQuery
  • BaseCurrency
  • BaseCurrencyPeer
  • BaseCurrencyQuery
  • BaseCustomer
  • BaseCustomerPeer
  • BaseCustomerQuery
  • BaseCustomerTitle
  • BaseCustomerTitleDesc
  • BaseCustomerTitleDescPeer
  • BaseCustomerTitleDescQuery
  • BaseCustomerTitleI18n
  • BaseCustomerTitleI18nPeer
  • BaseCustomerTitleI18nQuery
  • BaseCustomerTitlePeer
  • BaseCustomerTitleQuery
  • BaseDelivzone
  • BaseDelivzonePeer
  • BaseDelivzoneQuery
  • BaseDocument
  • BaseDocumentDesc
  • BaseDocumentDescPeer
  • BaseDocumentDescQuery
  • BaseDocumentI18n
  • BaseDocumentI18nPeer
  • BaseDocumentI18nQuery
  • BaseDocumentPeer
  • BaseDocumentQuery
  • BaseFeature
  • BaseFeatureAv
  • BaseFeatureAvDesc
  • BaseFeatureAvDescPeer
  • BaseFeatureAvDescQuery
  • BaseFeatureAvI18n
  • BaseFeatureAvI18nPeer
  • BaseFeatureAvI18nQuery
  • BaseFeatureAvPeer
  • BaseFeatureAvQuery
  • BaseFeatureCategory
  • BaseFeatureCategoryPeer
  • BaseFeatureCategoryQuery
  • BaseFeatureDesc
  • BaseFeatureDescPeer
  • BaseFeatureDescQuery
  • BaseFeatureI18n
  • BaseFeatureI18nPeer
  • BaseFeatureI18nQuery
  • BaseFeaturePeer
  • BaseFeatureProd
  • BaseFeatureProdPeer
  • BaseFeatureProdQuery
  • BaseFeatureQuery
  • BaseFolder
  • BaseFolderDesc
  • BaseFolderDescPeer
  • BaseFolderDescQuery
  • BaseFolderI18n
  • BaseFolderI18nPeer
  • BaseFolderI18nQuery
  • BaseFolderPeer
  • BaseFolderQuery
  • BaseFolderVersion
  • BaseFolderVersionPeer
  • BaseFolderVersionQuery
  • BaseGroup
  • BaseGroupDesc
  • BaseGroupDescPeer
  • BaseGroupDescQuery
  • BaseGroupI18n
  • BaseGroupI18nPeer
  • BaseGroupI18nQuery
  • BaseGroupModule
  • BaseGroupModulePeer
  • BaseGroupModuleQuery
  • BaseGroupPeer
  • BaseGroupQuery
  • BaseGroupResource
  • BaseGroupResourcePeer
  • BaseGroupResourceQuery
  • BaseImage
  • BaseImageDesc
  • BaseImageDescPeer
  • BaseImageDescQuery
  • BaseImageI18n
  • BaseImageI18nPeer
  • BaseImageI18nQuery
  • BaseImagePeer
  • BaseImageQuery
  • BaseLang
  • BaseLangPeer
  • BaseLangQuery
  • BaseMessage
  • BaseMessageDesc
  • BaseMessageDescPeer
  • BaseMessageDescQuery
  • BaseMessageI18n
  • BaseMessageI18nPeer
  • BaseMessageI18nQuery
  • BaseMessagePeer
  • BaseMessageQuery
  • BaseMessageVersion
  • BaseMessageVersionPeer
  • BaseMessageVersionQuery
  • BaseModuleDesc
  • BaseModuleDescPeer
  • BaseModuleDescQuery
  • BaseModuleI18n
  • BaseModuleI18nPeer
  • BaseModuleI18nQuery
  • BaseModulePeer
  • BaseOrder
  • BaseOrderAddress
  • BaseOrderAddressPeer
  • BaseOrderAddressQuery
  • BaseOrderFeature
  • BaseOrderFeaturePeer
  • BaseOrderFeatureQuery
  • BaseOrderPeer
  • BaseOrderProduct
  • BaseOrderProductPeer
  • BaseOrderProductQuery
  • BaseOrderQuery
  • BaseOrderStatus
  • BaseOrderStatusDesc
  • BaseOrderStatusDescPeer
  • BaseOrderStatusDescQuery
  • BaseOrderStatusI18n
  • BaseOrderStatusI18nPeer
  • BaseOrderStatusI18nQuery
  • BaseOrderStatusPeer
  • BaseOrderStatusQuery
  • BaseProduct
  • BaseProductCategory
  • BaseProductCategoryPeer
  • BaseProductCategoryQuery
  • BaseProductDesc
  • BaseProductDescPeer
  • BaseProductDescQuery
  • BaseProductI18n
  • BaseProductI18nPeer
  • BaseProductI18nQuery
  • BaseProductPeer
  • BaseProductQuery
  • BaseProductVersion
  • BaseProductVersionPeer
  • BaseProductVersionQuery
  • BaseResource
  • BaseResourceDesc
  • BaseResourceDescPeer
  • BaseResourceDescQuery
  • BaseResourceI18n
  • BaseResourceI18nPeer
  • BaseResourceI18nQuery
  • BaseResourcePeer
  • BaseResourceQuery
  • BaseRewriting
  • BaseRewritingPeer
  • BaseRewritingQuery
  • BaseStock
  • BaseStockPeer
  • BaseStockQuery
  • BaseTax
  • BaseTaxDesc
  • BaseTaxDescPeer
  • BaseTaxDescQuery
  • BaseTaxI18n
  • BaseTaxI18nPeer
  • BaseTaxI18nQuery
  • BaseTaxPeer
  • BaseTaxQuery
  • BaseTaxRule
  • BaseTaxRuleCountry
  • BaseTaxRuleCountryPeer
  • BaseTaxRuleCountryQuery
  • BaseTaxRuleDesc
  • BaseTaxRuleDescPeer
  • BaseTaxRuleDescQuery
  • BaseTaxRuleI18n
  • BaseTaxRuleI18nPeer
  • BaseTaxRuleI18nQuery
  • BaseTaxRulePeer
  • BaseTaxRuleQuery
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Thelia\Model\om;
  4: 
  5: use \Criteria;
  6: use \Exception;
  7: use \ModelCriteria;
  8: use \ModelJoin;
  9: use \PDO;
 10: use \Propel;
 11: use \PropelCollection;
 12: use \PropelException;
 13: use \PropelObjectCollection;
 14: use \PropelPDO;
 15: use Thelia\Model\Config;
 16: use Thelia\Model\ConfigI18n;
 17: use Thelia\Model\ConfigI18nPeer;
 18: use Thelia\Model\ConfigI18nQuery;
 19: 
 20: /**
 21:  * Base class that represents a query for the 'config_i18n' table.
 22:  *
 23:  *
 24:  *
 25:  * @method ConfigI18nQuery orderById($order = Criteria::ASC) Order by the id column
 26:  * @method ConfigI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
 27:  * @method ConfigI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
 28:  * @method ConfigI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
 29:  * @method ConfigI18nQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
 30:  * @method ConfigI18nQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
 31:  *
 32:  * @method ConfigI18nQuery groupById() Group by the id column
 33:  * @method ConfigI18nQuery groupByLocale() Group by the locale column
 34:  * @method ConfigI18nQuery groupByTitle() Group by the title column
 35:  * @method ConfigI18nQuery groupByDescription() Group by the description column
 36:  * @method ConfigI18nQuery groupByChapo() Group by the chapo column
 37:  * @method ConfigI18nQuery groupByPostscriptum() Group by the postscriptum column
 38:  *
 39:  * @method ConfigI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 40:  * @method ConfigI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 41:  * @method ConfigI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 42:  *
 43:  * @method ConfigI18nQuery leftJoinConfig($relationAlias = null) Adds a LEFT JOIN clause to the query using the Config relation
 44:  * @method ConfigI18nQuery rightJoinConfig($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Config relation
 45:  * @method ConfigI18nQuery innerJoinConfig($relationAlias = null) Adds a INNER JOIN clause to the query using the Config relation
 46:  *
 47:  * @method ConfigI18n findOne(PropelPDO $con = null) Return the first ConfigI18n matching the query
 48:  * @method ConfigI18n findOneOrCreate(PropelPDO $con = null) Return the first ConfigI18n matching the query, or a new ConfigI18n object populated from the query conditions when no match is found
 49:  *
 50:  * @method ConfigI18n findOneById(int $id) Return the first ConfigI18n filtered by the id column
 51:  * @method ConfigI18n findOneByLocale(string $locale) Return the first ConfigI18n filtered by the locale column
 52:  * @method ConfigI18n findOneByTitle(string $title) Return the first ConfigI18n filtered by the title column
 53:  * @method ConfigI18n findOneByDescription(string $description) Return the first ConfigI18n filtered by the description column
 54:  * @method ConfigI18n findOneByChapo(string $chapo) Return the first ConfigI18n filtered by the chapo column
 55:  * @method ConfigI18n findOneByPostscriptum(string $postscriptum) Return the first ConfigI18n filtered by the postscriptum column
 56:  *
 57:  * @method array findById(int $id) Return ConfigI18n objects filtered by the id column
 58:  * @method array findByLocale(string $locale) Return ConfigI18n objects filtered by the locale column
 59:  * @method array findByTitle(string $title) Return ConfigI18n objects filtered by the title column
 60:  * @method array findByDescription(string $description) Return ConfigI18n objects filtered by the description column
 61:  * @method array findByChapo(string $chapo) Return ConfigI18n objects filtered by the chapo column
 62:  * @method array findByPostscriptum(string $postscriptum) Return ConfigI18n objects filtered by the postscriptum column
 63:  *
 64:  * @package    propel.generator.Thelia.Model.om
 65:  */
 66: abstract class BaseConfigI18nQuery extends ModelCriteria
 67: {
 68:     /**
 69:      * Initializes internal state of BaseConfigI18nQuery object.
 70:      *
 71:      * @param     string $dbName The dabase name
 72:      * @param     string $modelName The phpName of a model, e.g. 'Book'
 73:      * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
 74:      */
 75:     public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ConfigI18n', $modelAlias = null)
 76:     {
 77:         parent::__construct($dbName, $modelName, $modelAlias);
 78:     }
 79: 
 80:     /**
 81:      * Returns a new ConfigI18nQuery object.
 82:      *
 83:      * @param     string $modelAlias The alias of a model in the query
 84:      * @param   ConfigI18nQuery|Criteria $criteria Optional Criteria to build the query from
 85:      *
 86:      * @return ConfigI18nQuery
 87:      */
 88:     public static function create($modelAlias = null, $criteria = null)
 89:     {
 90:         if ($criteria instanceof ConfigI18nQuery) {
 91:             return $criteria;
 92:         }
 93:         $query = new ConfigI18nQuery();
 94:         if (null !== $modelAlias) {
 95:             $query->setModelAlias($modelAlias);
 96:         }
 97:         if ($criteria instanceof Criteria) {
 98:             $query->mergeWith($criteria);
 99:         }
100: 
101:         return $query;
102:     }
103: 
104:     /**
105:      * Find object by primary key.
106:      * Propel uses the instance pool to skip the database if the object exists.
107:      * Go fast if the query is untouched.
108:      *
109:      * <code>
110:      * $obj = $c->findPk(array(12, 34), $con);
111:      * </code>
112:      *
113:      * @param array $key Primary key to use for the query
114:                          A Primary key composition: [$id, $locale]
115:      * @param     PropelPDO $con an optional connection object
116:      *
117:      * @return   ConfigI18n|ConfigI18n[]|mixed the result, formatted by the current formatter
118:      */
119:     public function findPk($key, $con = null)
120:     {
121:         if ($key === null) {
122:             return null;
123:         }
124:         if ((null !== ($obj = ConfigI18nPeer::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
125:             // the object is alredy in the instance pool
126:             return $obj;
127:         }
128:         if ($con === null) {
129:             $con = Propel::getConnection(ConfigI18nPeer::DATABASE_NAME, Propel::CONNECTION_READ);
130:         }
131:         $this->basePreSelect($con);
132:         if ($this->formatter || $this->modelAlias || $this->with || $this->select
133:          || $this->selectColumns || $this->asColumns || $this->selectModifiers
134:          || $this->map || $this->having || $this->joins) {
135:             return $this->findPkComplex($key, $con);
136:         } else {
137:             return $this->findPkSimple($key, $con);
138:         }
139:     }
140: 
141:     /**
142:      * Find object by primary key using raw SQL to go fast.
143:      * Bypass doSelect() and the object formatter by using generated code.
144:      *
145:      * @param     mixed $key Primary key to use for the query
146:      * @param     PropelPDO $con A connection object
147:      *
148:      * @return                 ConfigI18n A model object, or null if the key is not found
149:      * @throws PropelException
150:      */
151:     protected function findPkSimple($key, $con)
152:     {
153:         $sql = 'SELECT `id`, `locale`, `title`, `description`, `chapo`, `postscriptum` FROM `config_i18n` WHERE `id` = :p0 AND `locale` = :p1';
154:         try {
155:             $stmt = $con->prepare($sql);
156:             $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
157:             $stmt->bindValue(':p1', $key[1], PDO::PARAM_STR);
158:             $stmt->execute();
159:         } catch (Exception $e) {
160:             Propel::log($e->getMessage(), Propel::LOG_ERR);
161:             throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
162:         }
163:         $obj = null;
164:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
165:             $obj = new ConfigI18n();
166:             $obj->hydrate($row);
167:             ConfigI18nPeer::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
168:         }
169:         $stmt->closeCursor();
170: 
171:         return $obj;
172:     }
173: 
174:     /**
175:      * Find object by primary key.
176:      *
177:      * @param     mixed $key Primary key to use for the query
178:      * @param     PropelPDO $con A connection object
179:      *
180:      * @return ConfigI18n|ConfigI18n[]|mixed the result, formatted by the current formatter
181:      */
182:     protected function findPkComplex($key, $con)
183:     {
184:         // As the query uses a PK condition, no limit(1) is necessary.
185:         $criteria = $this->isKeepQuery() ? clone $this : $this;
186:         $stmt = $criteria
187:             ->filterByPrimaryKey($key)
188:             ->doSelect($con);
189: 
190:         return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
191:     }
192: 
193:     /**
194:      * Find objects by primary key
195:      * <code>
196:      * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);
197:      * </code>
198:      * @param     array $keys Primary keys to use for the query
199:      * @param     PropelPDO $con an optional connection object
200:      *
201:      * @return PropelObjectCollection|ConfigI18n[]|mixed the list of results, formatted by the current formatter
202:      */
203:     public function findPks($keys, $con = null)
204:     {
205:         if ($con === null) {
206:             $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
207:         }
208:         $this->basePreSelect($con);
209:         $criteria = $this->isKeepQuery() ? clone $this : $this;
210:         $stmt = $criteria
211:             ->filterByPrimaryKeys($keys)
212:             ->doSelect($con);
213: 
214:         return $criteria->getFormatter()->init($criteria)->format($stmt);
215:     }
216: 
217:     /**
218:      * Filter the query by primary key
219:      *
220:      * @param     mixed $key Primary key to use for the query
221:      *
222:      * @return ConfigI18nQuery The current query, for fluid interface
223:      */
224:     public function filterByPrimaryKey($key)
225:     {
226:         $this->addUsingAlias(ConfigI18nPeer::ID, $key[0], Criteria::EQUAL);
227:         $this->addUsingAlias(ConfigI18nPeer::LOCALE, $key[1], Criteria::EQUAL);
228: 
229:         return $this;
230:     }
231: 
232:     /**
233:      * Filter the query by a list of primary keys
234:      *
235:      * @param     array $keys The list of primary key to use for the query
236:      *
237:      * @return ConfigI18nQuery The current query, for fluid interface
238:      */
239:     public function filterByPrimaryKeys($keys)
240:     {
241:         if (empty($keys)) {
242:             return $this->add(null, '1<>1', Criteria::CUSTOM);
243:         }
244:         foreach ($keys as $key) {
245:             $cton0 = $this->getNewCriterion(ConfigI18nPeer::ID, $key[0], Criteria::EQUAL);
246:             $cton1 = $this->getNewCriterion(ConfigI18nPeer::LOCALE, $key[1], Criteria::EQUAL);
247:             $cton0->addAnd($cton1);
248:             $this->addOr($cton0);
249:         }
250: 
251:         return $this;
252:     }
253: 
254:     /**
255:      * Filter the query on the id column
256:      *
257:      * Example usage:
258:      * <code>
259:      * $query->filterById(1234); // WHERE id = 1234
260:      * $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
261:      * $query->filterById(array('min' => 12)); // WHERE id >= 12
262:      * $query->filterById(array('max' => 12)); // WHERE id <= 12
263:      * </code>
264:      *
265:      * @see       filterByConfig()
266:      *
267:      * @param     mixed $id The value to use as filter.
268:      *              Use scalar values for equality.
269:      *              Use array values for in_array() equivalent.
270:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
271:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
272:      *
273:      * @return ConfigI18nQuery The current query, for fluid interface
274:      */
275:     public function filterById($id = null, $comparison = null)
276:     {
277:         if (is_array($id)) {
278:             $useMinMax = false;
279:             if (isset($id['min'])) {
280:                 $this->addUsingAlias(ConfigI18nPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
281:                 $useMinMax = true;
282:             }
283:             if (isset($id['max'])) {
284:                 $this->addUsingAlias(ConfigI18nPeer::ID, $id['max'], Criteria::LESS_EQUAL);
285:                 $useMinMax = true;
286:             }
287:             if ($useMinMax) {
288:                 return $this;
289:             }
290:             if (null === $comparison) {
291:                 $comparison = Criteria::IN;
292:             }
293:         }
294: 
295:         return $this->addUsingAlias(ConfigI18nPeer::ID, $id, $comparison);
296:     }
297: 
298:     /**
299:      * Filter the query on the locale column
300:      *
301:      * Example usage:
302:      * <code>
303:      * $query->filterByLocale('fooValue');   // WHERE locale = 'fooValue'
304:      * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%'
305:      * </code>
306:      *
307:      * @param     string $locale The value to use as filter.
308:      *              Accepts wildcards (* and % trigger a LIKE)
309:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
310:      *
311:      * @return ConfigI18nQuery The current query, for fluid interface
312:      */
313:     public function filterByLocale($locale = null, $comparison = null)
314:     {
315:         if (null === $comparison) {
316:             if (is_array($locale)) {
317:                 $comparison = Criteria::IN;
318:             } elseif (preg_match('/[\%\*]/', $locale)) {
319:                 $locale = str_replace('*', '%', $locale);
320:                 $comparison = Criteria::LIKE;
321:             }
322:         }
323: 
324:         return $this->addUsingAlias(ConfigI18nPeer::LOCALE, $locale, $comparison);
325:     }
326: 
327:     /**
328:      * Filter the query on the title column
329:      *
330:      * Example usage:
331:      * <code>
332:      * $query->filterByTitle('fooValue');   // WHERE title = 'fooValue'
333:      * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
334:      * </code>
335:      *
336:      * @param     string $title The value to use as filter.
337:      *              Accepts wildcards (* and % trigger a LIKE)
338:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
339:      *
340:      * @return ConfigI18nQuery The current query, for fluid interface
341:      */
342:     public function filterByTitle($title = null, $comparison = null)
343:     {
344:         if (null === $comparison) {
345:             if (is_array($title)) {
346:                 $comparison = Criteria::IN;
347:             } elseif (preg_match('/[\%\*]/', $title)) {
348:                 $title = str_replace('*', '%', $title);
349:                 $comparison = Criteria::LIKE;
350:             }
351:         }
352: 
353:         return $this->addUsingAlias(ConfigI18nPeer::TITLE, $title, $comparison);
354:     }
355: 
356:     /**
357:      * Filter the query on the description column
358:      *
359:      * Example usage:
360:      * <code>
361:      * $query->filterByDescription('fooValue');   // WHERE description = 'fooValue'
362:      * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
363:      * </code>
364:      *
365:      * @param     string $description The value to use as filter.
366:      *              Accepts wildcards (* and % trigger a LIKE)
367:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
368:      *
369:      * @return ConfigI18nQuery The current query, for fluid interface
370:      */
371:     public function filterByDescription($description = null, $comparison = null)
372:     {
373:         if (null === $comparison) {
374:             if (is_array($description)) {
375:                 $comparison = Criteria::IN;
376:             } elseif (preg_match('/[\%\*]/', $description)) {
377:                 $description = str_replace('*', '%', $description);
378:                 $comparison = Criteria::LIKE;
379:             }
380:         }
381: 
382:         return $this->addUsingAlias(ConfigI18nPeer::DESCRIPTION, $description, $comparison);
383:     }
384: 
385:     /**
386:      * Filter the query on the chapo column
387:      *
388:      * Example usage:
389:      * <code>
390:      * $query->filterByChapo('fooValue');   // WHERE chapo = 'fooValue'
391:      * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
392:      * </code>
393:      *
394:      * @param     string $chapo The value to use as filter.
395:      *              Accepts wildcards (* and % trigger a LIKE)
396:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
397:      *
398:      * @return ConfigI18nQuery The current query, for fluid interface
399:      */
400:     public function filterByChapo($chapo = null, $comparison = null)
401:     {
402:         if (null === $comparison) {
403:             if (is_array($chapo)) {
404:                 $comparison = Criteria::IN;
405:             } elseif (preg_match('/[\%\*]/', $chapo)) {
406:                 $chapo = str_replace('*', '%', $chapo);
407:                 $comparison = Criteria::LIKE;
408:             }
409:         }
410: 
411:         return $this->addUsingAlias(ConfigI18nPeer::CHAPO, $chapo, $comparison);
412:     }
413: 
414:     /**
415:      * Filter the query on the postscriptum column
416:      *
417:      * Example usage:
418:      * <code>
419:      * $query->filterByPostscriptum('fooValue');   // WHERE postscriptum = 'fooValue'
420:      * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%'
421:      * </code>
422:      *
423:      * @param     string $postscriptum The value to use as filter.
424:      *              Accepts wildcards (* and % trigger a LIKE)
425:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
426:      *
427:      * @return ConfigI18nQuery The current query, for fluid interface
428:      */
429:     public function filterByPostscriptum($postscriptum = null, $comparison = null)
430:     {
431:         if (null === $comparison) {
432:             if (is_array($postscriptum)) {
433:                 $comparison = Criteria::IN;
434:             } elseif (preg_match('/[\%\*]/', $postscriptum)) {
435:                 $postscriptum = str_replace('*', '%', $postscriptum);
436:                 $comparison = Criteria::LIKE;
437:             }
438:         }
439: 
440:         return $this->addUsingAlias(ConfigI18nPeer::POSTSCRIPTUM, $postscriptum, $comparison);
441:     }
442: 
443:     /**
444:      * Filter the query by a related Config object
445:      *
446:      * @param   Config|PropelObjectCollection $config The related object(s) to use as filter
447:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
448:      *
449:      * @return                 ConfigI18nQuery The current query, for fluid interface
450:      * @throws PropelException - if the provided filter is invalid.
451:      */
452:     public function filterByConfig($config, $comparison = null)
453:     {
454:         if ($config instanceof Config) {
455:             return $this
456:                 ->addUsingAlias(ConfigI18nPeer::ID, $config->getId(), $comparison);
457:         } elseif ($config instanceof PropelObjectCollection) {
458:             if (null === $comparison) {
459:                 $comparison = Criteria::IN;
460:             }
461: 
462:             return $this
463:                 ->addUsingAlias(ConfigI18nPeer::ID, $config->toKeyValue('PrimaryKey', 'Id'), $comparison);
464:         } else {
465:             throw new PropelException('filterByConfig() only accepts arguments of type Config or PropelCollection');
466:         }
467:     }
468: 
469:     /**
470:      * Adds a JOIN clause to the query using the Config relation
471:      *
472:      * @param     string $relationAlias optional alias for the relation
473:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
474:      *
475:      * @return ConfigI18nQuery The current query, for fluid interface
476:      */
477:     public function joinConfig($relationAlias = null, $joinType = 'LEFT JOIN')
478:     {
479:         $tableMap = $this->getTableMap();
480:         $relationMap = $tableMap->getRelation('Config');
481: 
482:         // create a ModelJoin object for this join
483:         $join = new ModelJoin();
484:         $join->setJoinType($joinType);
485:         $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
486:         if ($previousJoin = $this->getPreviousJoin()) {
487:             $join->setPreviousJoin($previousJoin);
488:         }
489: 
490:         // add the ModelJoin to the current object
491:         if ($relationAlias) {
492:             $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
493:             $this->addJoinObject($join, $relationAlias);
494:         } else {
495:             $this->addJoinObject($join, 'Config');
496:         }
497: 
498:         return $this;
499:     }
500: 
501:     /**
502:      * Use the Config relation Config object
503:      *
504:      * @see       useQuery()
505:      *
506:      * @param     string $relationAlias optional alias for the relation,
507:      *                                   to be used as main alias in the secondary query
508:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
509:      *
510:      * @return   \Thelia\Model\ConfigQuery A secondary query class using the current class as primary query
511:      */
512:     public function useConfigQuery($relationAlias = null, $joinType = 'LEFT JOIN')
513:     {
514:         return $this
515:             ->joinConfig($relationAlias, $joinType)
516:             ->useQuery($relationAlias ? $relationAlias : 'Config', '\Thelia\Model\ConfigQuery');
517:     }
518: 
519:     /**
520:      * Exclude object from result
521:      *
522:      * @param   ConfigI18n $configI18n Object to remove from the list of results
523:      *
524:      * @return ConfigI18nQuery The current query, for fluid interface
525:      */
526:     public function prune($configI18n = null)
527:     {
528:         if ($configI18n) {
529:             $this->addCond('pruneCond0', $this->getAliasedColName(ConfigI18nPeer::ID), $configI18n->getId(), Criteria::NOT_EQUAL);
530:             $this->addCond('pruneCond1', $this->getAliasedColName(ConfigI18nPeer::LOCALE), $configI18n->getLocale(), Criteria::NOT_EQUAL);
531:             $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
532:         }
533: 
534:         return $this;
535:     }
536: 
537: }
538: 
thelia API documentation generated by ApiGen 2.8.0