Overview

Namespaces

  • PHP
  • Thelia
    • Action
    • Controller
    • Core
      • Bundle
      • Event
      • EventListener
      • Template
    • Exception
    • Log
      • Destination
    • Model
      • map
      • om
    • Routing
      • Matcher
    • Tools

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\Image;
 16: use Thelia\Model\ImageDesc;
 17: use Thelia\Model\ImageDescPeer;
 18: use Thelia\Model\ImageDescQuery;
 19: 
 20: /**
 21:  * Base class that represents a query for the 'image_desc' table.
 22:  *
 23:  *
 24:  *
 25:  * @method ImageDescQuery orderById($order = Criteria::ASC) Order by the id column
 26:  * @method ImageDescQuery orderByImageId($order = Criteria::ASC) Order by the image_id column
 27:  * @method ImageDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
 28:  * @method ImageDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
 29:  * @method ImageDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
 30:  * @method ImageDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
 31:  * @method ImageDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
 32:  *
 33:  * @method ImageDescQuery groupById() Group by the id column
 34:  * @method ImageDescQuery groupByImageId() Group by the image_id column
 35:  * @method ImageDescQuery groupByTitle() Group by the title column
 36:  * @method ImageDescQuery groupByDescription() Group by the description column
 37:  * @method ImageDescQuery groupByChapo() Group by the chapo column
 38:  * @method ImageDescQuery groupByCreatedAt() Group by the created_at column
 39:  * @method ImageDescQuery groupByUpdatedAt() Group by the updated_at column
 40:  *
 41:  * @method ImageDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 42:  * @method ImageDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 43:  * @method ImageDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 44:  *
 45:  * @method ImageDescQuery leftJoinImage($relationAlias = null) Adds a LEFT JOIN clause to the query using the Image relation
 46:  * @method ImageDescQuery rightJoinImage($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Image relation
 47:  * @method ImageDescQuery innerJoinImage($relationAlias = null) Adds a INNER JOIN clause to the query using the Image relation
 48:  *
 49:  * @method ImageDesc findOne(PropelPDO $con = null) Return the first ImageDesc matching the query
 50:  * @method ImageDesc findOneOrCreate(PropelPDO $con = null) Return the first ImageDesc matching the query, or a new ImageDesc object populated from the query conditions when no match is found
 51:  *
 52:  * @method ImageDesc findOneById(int $id) Return the first ImageDesc filtered by the id column
 53:  * @method ImageDesc findOneByImageId(int $image_id) Return the first ImageDesc filtered by the image_id column
 54:  * @method ImageDesc findOneByTitle(string $title) Return the first ImageDesc filtered by the title column
 55:  * @method ImageDesc findOneByDescription(string $description) Return the first ImageDesc filtered by the description column
 56:  * @method ImageDesc findOneByChapo(string $chapo) Return the first ImageDesc filtered by the chapo column
 57:  * @method ImageDesc findOneByCreatedAt(string $created_at) Return the first ImageDesc filtered by the created_at column
 58:  * @method ImageDesc findOneByUpdatedAt(string $updated_at) Return the first ImageDesc filtered by the updated_at column
 59:  *
 60:  * @method array findById(int $id) Return ImageDesc objects filtered by the id column
 61:  * @method array findByImageId(int $image_id) Return ImageDesc objects filtered by the image_id column
 62:  * @method array findByTitle(string $title) Return ImageDesc objects filtered by the title column
 63:  * @method array findByDescription(string $description) Return ImageDesc objects filtered by the description column
 64:  * @method array findByChapo(string $chapo) Return ImageDesc objects filtered by the chapo column
 65:  * @method array findByCreatedAt(string $created_at) Return ImageDesc objects filtered by the created_at column
 66:  * @method array findByUpdatedAt(string $updated_at) Return ImageDesc objects filtered by the updated_at column
 67:  *
 68:  * @package    propel.generator.Thelia.Model.om
 69:  */
 70: abstract class BaseImageDescQuery extends ModelCriteria
 71: {
 72:     /**
 73:      * Initializes internal state of BaseImageDescQuery object.
 74:      *
 75:      * @param     string $dbName The dabase name
 76:      * @param     string $modelName The phpName of a model, e.g. 'Book'
 77:      * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
 78:      */
 79:     public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ImageDesc', $modelAlias = null)
 80:     {
 81:         parent::__construct($dbName, $modelName, $modelAlias);
 82:     }
 83: 
 84:     /**
 85:      * Returns a new ImageDescQuery object.
 86:      *
 87:      * @param     string $modelAlias The alias of a model in the query
 88:      * @param     ImageDescQuery|Criteria $criteria Optional Criteria to build the query from
 89:      *
 90:      * @return ImageDescQuery
 91:      */
 92:     public static function create($modelAlias = null, $criteria = null)
 93:     {
 94:         if ($criteria instanceof ImageDescQuery) {
 95:             return $criteria;
 96:         }
 97:         $query = new ImageDescQuery();
 98:         if (null !== $modelAlias) {
 99:             $query->setModelAlias($modelAlias);
100:         }
101:         if ($criteria instanceof Criteria) {
102:             $query->mergeWith($criteria);
103:         }
104: 
105:         return $query;
106:     }
107: 
108:     /**
109:      * Find object by primary key.
110:      * Propel uses the instance pool to skip the database if the object exists.
111:      * Go fast if the query is untouched.
112:      *
113:      * <code>
114:      * $obj  = $c->findPk(12, $con);
115:      * </code>
116:      *
117:      * @param mixed $key Primary key to use for the query
118:      * @param     PropelPDO $con an optional connection object
119:      *
120:      * @return   ImageDesc|ImageDesc[]|mixed the result, formatted by the current formatter
121:      */
122:     public function findPk($key, $con = null)
123:     {
124:         if ($key === null) {
125:             return null;
126:         }
127:         if ((null !== ($obj = ImageDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
128:             // the object is alredy in the instance pool
129:             return $obj;
130:         }
131:         if ($con === null) {
132:             $con = Propel::getConnection(ImageDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
133:         }
134:         $this->basePreSelect($con);
135:         if ($this->formatter || $this->modelAlias || $this->with || $this->select
136:          || $this->selectColumns || $this->asColumns || $this->selectModifiers
137:          || $this->map || $this->having || $this->joins) {
138:             return $this->findPkComplex($key, $con);
139:         } else {
140:             return $this->findPkSimple($key, $con);
141:         }
142:     }
143: 
144:     /**
145:      * Find object by primary key using raw SQL to go fast.
146:      * Bypass doSelect() and the object formatter by using generated code.
147:      *
148:      * @param     mixed $key Primary key to use for the query
149:      * @param     PropelPDO $con A connection object
150:      *
151:      * @return   ImageDesc A model object, or null if the key is not found
152:      * @throws   PropelException
153:      */
154:     protected function findPkSimple($key, $con)
155:     {
156:         $sql = 'SELECT `ID`, `IMAGE_ID`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `image_desc` WHERE `ID` = :p0';
157:         try {
158:             $stmt = $con->prepare($sql);
159:             $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
160:             $stmt->execute();
161:         } catch (Exception $e) {
162:             Propel::log($e->getMessage(), Propel::LOG_ERR);
163:             throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
164:         }
165:         $obj = null;
166:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
167:             $obj = new ImageDesc();
168:             $obj->hydrate($row);
169:             ImageDescPeer::addInstanceToPool($obj, (string) $key);
170:         }
171:         $stmt->closeCursor();
172: 
173:         return $obj;
174:     }
175: 
176:     /**
177:      * Find object by primary key.
178:      *
179:      * @param     mixed $key Primary key to use for the query
180:      * @param     PropelPDO $con A connection object
181:      *
182:      * @return ImageDesc|ImageDesc[]|mixed the result, formatted by the current formatter
183:      */
184:     protected function findPkComplex($key, $con)
185:     {
186:         // As the query uses a PK condition, no limit(1) is necessary.
187:         $criteria = $this->isKeepQuery() ? clone $this : $this;
188:         $stmt = $criteria
189:             ->filterByPrimaryKey($key)
190:             ->doSelect($con);
191: 
192:         return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
193:     }
194: 
195:     /**
196:      * Find objects by primary key
197:      * <code>
198:      * $objs = $c->findPks(array(12, 56, 832), $con);
199:      * </code>
200:      * @param     array $keys Primary keys to use for the query
201:      * @param     PropelPDO $con an optional connection object
202:      *
203:      * @return PropelObjectCollection|ImageDesc[]|mixed the list of results, formatted by the current formatter
204:      */
205:     public function findPks($keys, $con = null)
206:     {
207:         if ($con === null) {
208:             $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
209:         }
210:         $this->basePreSelect($con);
211:         $criteria = $this->isKeepQuery() ? clone $this : $this;
212:         $stmt = $criteria
213:             ->filterByPrimaryKeys($keys)
214:             ->doSelect($con);
215: 
216:         return $criteria->getFormatter()->init($criteria)->format($stmt);
217:     }
218: 
219:     /**
220:      * Filter the query by primary key
221:      *
222:      * @param     mixed $key Primary key to use for the query
223:      *
224:      * @return ImageDescQuery The current query, for fluid interface
225:      */
226:     public function filterByPrimaryKey($key)
227:     {
228: 
229:         return $this->addUsingAlias(ImageDescPeer::ID, $key, Criteria::EQUAL);
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 ImageDescQuery The current query, for fluid interface
238:      */
239:     public function filterByPrimaryKeys($keys)
240:     {
241: 
242:         return $this->addUsingAlias(ImageDescPeer::ID, $keys, Criteria::IN);
243:     }
244: 
245:     /**
246:      * Filter the query on the id column
247:      *
248:      * Example usage:
249:      * <code>
250:      * $query->filterById(1234); // WHERE id = 1234
251:      * $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
252:      * $query->filterById(array('min' => 12)); // WHERE id > 12
253:      * </code>
254:      *
255:      * @param     mixed $id The value to use as filter.
256:      *              Use scalar values for equality.
257:      *              Use array values for in_array() equivalent.
258:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
259:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
260:      *
261:      * @return ImageDescQuery The current query, for fluid interface
262:      */
263:     public function filterById($id = null, $comparison = null)
264:     {
265:         if (is_array($id) && null === $comparison) {
266:             $comparison = Criteria::IN;
267:         }
268: 
269:         return $this->addUsingAlias(ImageDescPeer::ID, $id, $comparison);
270:     }
271: 
272:     /**
273:      * Filter the query on the image_id column
274:      *
275:      * Example usage:
276:      * <code>
277:      * $query->filterByImageId(1234); // WHERE image_id = 1234
278:      * $query->filterByImageId(array(12, 34)); // WHERE image_id IN (12, 34)
279:      * $query->filterByImageId(array('min' => 12)); // WHERE image_id > 12
280:      * </code>
281:      *
282:      * @see       filterByImage()
283:      *
284:      * @param     mixed $imageId The value to use as filter.
285:      *              Use scalar values for equality.
286:      *              Use array values for in_array() equivalent.
287:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
288:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
289:      *
290:      * @return ImageDescQuery The current query, for fluid interface
291:      */
292:     public function filterByImageId($imageId = null, $comparison = null)
293:     {
294:         if (is_array($imageId)) {
295:             $useMinMax = false;
296:             if (isset($imageId['min'])) {
297:                 $this->addUsingAlias(ImageDescPeer::IMAGE_ID, $imageId['min'], Criteria::GREATER_EQUAL);
298:                 $useMinMax = true;
299:             }
300:             if (isset($imageId['max'])) {
301:                 $this->addUsingAlias(ImageDescPeer::IMAGE_ID, $imageId['max'], Criteria::LESS_EQUAL);
302:                 $useMinMax = true;
303:             }
304:             if ($useMinMax) {
305:                 return $this;
306:             }
307:             if (null === $comparison) {
308:                 $comparison = Criteria::IN;
309:             }
310:         }
311: 
312:         return $this->addUsingAlias(ImageDescPeer::IMAGE_ID, $imageId, $comparison);
313:     }
314: 
315:     /**
316:      * Filter the query on the title column
317:      *
318:      * Example usage:
319:      * <code>
320:      * $query->filterByTitle('fooValue');   // WHERE title = 'fooValue'
321:      * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
322:      * </code>
323:      *
324:      * @param     string $title The value to use as filter.
325:      *              Accepts wildcards (* and % trigger a LIKE)
326:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
327:      *
328:      * @return ImageDescQuery The current query, for fluid interface
329:      */
330:     public function filterByTitle($title = null, $comparison = null)
331:     {
332:         if (null === $comparison) {
333:             if (is_array($title)) {
334:                 $comparison = Criteria::IN;
335:             } elseif (preg_match('/[\%\*]/', $title)) {
336:                 $title = str_replace('*', '%', $title);
337:                 $comparison = Criteria::LIKE;
338:             }
339:         }
340: 
341:         return $this->addUsingAlias(ImageDescPeer::TITLE, $title, $comparison);
342:     }
343: 
344:     /**
345:      * Filter the query on the description column
346:      *
347:      * Example usage:
348:      * <code>
349:      * $query->filterByDescription('fooValue');   // WHERE description = 'fooValue'
350:      * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
351:      * </code>
352:      *
353:      * @param     string $description The value to use as filter.
354:      *              Accepts wildcards (* and % trigger a LIKE)
355:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
356:      *
357:      * @return ImageDescQuery The current query, for fluid interface
358:      */
359:     public function filterByDescription($description = null, $comparison = null)
360:     {
361:         if (null === $comparison) {
362:             if (is_array($description)) {
363:                 $comparison = Criteria::IN;
364:             } elseif (preg_match('/[\%\*]/', $description)) {
365:                 $description = str_replace('*', '%', $description);
366:                 $comparison = Criteria::LIKE;
367:             }
368:         }
369: 
370:         return $this->addUsingAlias(ImageDescPeer::DESCRIPTION, $description, $comparison);
371:     }
372: 
373:     /**
374:      * Filter the query on the chapo column
375:      *
376:      * Example usage:
377:      * <code>
378:      * $query->filterByChapo('fooValue');   // WHERE chapo = 'fooValue'
379:      * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
380:      * </code>
381:      *
382:      * @param     string $chapo The value to use as filter.
383:      *              Accepts wildcards (* and % trigger a LIKE)
384:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
385:      *
386:      * @return ImageDescQuery The current query, for fluid interface
387:      */
388:     public function filterByChapo($chapo = null, $comparison = null)
389:     {
390:         if (null === $comparison) {
391:             if (is_array($chapo)) {
392:                 $comparison = Criteria::IN;
393:             } elseif (preg_match('/[\%\*]/', $chapo)) {
394:                 $chapo = str_replace('*', '%', $chapo);
395:                 $comparison = Criteria::LIKE;
396:             }
397:         }
398: 
399:         return $this->addUsingAlias(ImageDescPeer::CHAPO, $chapo, $comparison);
400:     }
401: 
402:     /**
403:      * Filter the query on the created_at column
404:      *
405:      * Example usage:
406:      * <code>
407:      * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
408:      * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
409:      * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
410:      * </code>
411:      *
412:      * @param     mixed $createdAt The value to use as filter.
413:      *              Values can be integers (unix timestamps), DateTime objects, or strings.
414:      *              Empty strings are treated as NULL.
415:      *              Use scalar values for equality.
416:      *              Use array values for in_array() equivalent.
417:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
418:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
419:      *
420:      * @return ImageDescQuery The current query, for fluid interface
421:      */
422:     public function filterByCreatedAt($createdAt = null, $comparison = null)
423:     {
424:         if (is_array($createdAt)) {
425:             $useMinMax = false;
426:             if (isset($createdAt['min'])) {
427:                 $this->addUsingAlias(ImageDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
428:                 $useMinMax = true;
429:             }
430:             if (isset($createdAt['max'])) {
431:                 $this->addUsingAlias(ImageDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
432:                 $useMinMax = true;
433:             }
434:             if ($useMinMax) {
435:                 return $this;
436:             }
437:             if (null === $comparison) {
438:                 $comparison = Criteria::IN;
439:             }
440:         }
441: 
442:         return $this->addUsingAlias(ImageDescPeer::CREATED_AT, $createdAt, $comparison);
443:     }
444: 
445:     /**
446:      * Filter the query on the updated_at column
447:      *
448:      * Example usage:
449:      * <code>
450:      * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
451:      * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
452:      * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
453:      * </code>
454:      *
455:      * @param     mixed $updatedAt The value to use as filter.
456:      *              Values can be integers (unix timestamps), DateTime objects, or strings.
457:      *              Empty strings are treated as NULL.
458:      *              Use scalar values for equality.
459:      *              Use array values for in_array() equivalent.
460:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
461:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
462:      *
463:      * @return ImageDescQuery The current query, for fluid interface
464:      */
465:     public function filterByUpdatedAt($updatedAt = null, $comparison = null)
466:     {
467:         if (is_array($updatedAt)) {
468:             $useMinMax = false;
469:             if (isset($updatedAt['min'])) {
470:                 $this->addUsingAlias(ImageDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
471:                 $useMinMax = true;
472:             }
473:             if (isset($updatedAt['max'])) {
474:                 $this->addUsingAlias(ImageDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
475:                 $useMinMax = true;
476:             }
477:             if ($useMinMax) {
478:                 return $this;
479:             }
480:             if (null === $comparison) {
481:                 $comparison = Criteria::IN;
482:             }
483:         }
484: 
485:         return $this->addUsingAlias(ImageDescPeer::UPDATED_AT, $updatedAt, $comparison);
486:     }
487: 
488:     /**
489:      * Filter the query by a related Image object
490:      *
491:      * @param   Image|PropelObjectCollection $image The related object(s) to use as filter
492:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
493:      *
494:      * @return   ImageDescQuery The current query, for fluid interface
495:      * @throws   PropelException - if the provided filter is invalid.
496:      */
497:     public function filterByImage($image, $comparison = null)
498:     {
499:         if ($image instanceof Image) {
500:             return $this
501:                 ->addUsingAlias(ImageDescPeer::IMAGE_ID, $image->getId(), $comparison);
502:         } elseif ($image instanceof PropelObjectCollection) {
503:             if (null === $comparison) {
504:                 $comparison = Criteria::IN;
505:             }
506: 
507:             return $this
508:                 ->addUsingAlias(ImageDescPeer::IMAGE_ID, $image->toKeyValue('PrimaryKey', 'Id'), $comparison);
509:         } else {
510:             throw new PropelException('filterByImage() only accepts arguments of type Image or PropelCollection');
511:         }
512:     }
513: 
514:     /**
515:      * Adds a JOIN clause to the query using the Image relation
516:      *
517:      * @param     string $relationAlias optional alias for the relation
518:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
519:      *
520:      * @return ImageDescQuery The current query, for fluid interface
521:      */
522:     public function joinImage($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
523:     {
524:         $tableMap = $this->getTableMap();
525:         $relationMap = $tableMap->getRelation('Image');
526: 
527:         // create a ModelJoin object for this join
528:         $join = new ModelJoin();
529:         $join->setJoinType($joinType);
530:         $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
531:         if ($previousJoin = $this->getPreviousJoin()) {
532:             $join->setPreviousJoin($previousJoin);
533:         }
534: 
535:         // add the ModelJoin to the current object
536:         if ($relationAlias) {
537:             $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
538:             $this->addJoinObject($join, $relationAlias);
539:         } else {
540:             $this->addJoinObject($join, 'Image');
541:         }
542: 
543:         return $this;
544:     }
545: 
546:     /**
547:      * Use the Image relation Image object
548:      *
549:      * @see       useQuery()
550:      *
551:      * @param     string $relationAlias optional alias for the relation,
552:      *                                   to be used as main alias in the secondary query
553:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
554:      *
555:      * @return   \Thelia\Model\ImageQuery A secondary query class using the current class as primary query
556:      */
557:     public function useImageQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
558:     {
559:         return $this
560:             ->joinImage($relationAlias, $joinType)
561:             ->useQuery($relationAlias ? $relationAlias : 'Image', '\Thelia\Model\ImageQuery');
562:     }
563: 
564:     /**
565:      * Exclude object from result
566:      *
567:      * @param   ImageDesc $imageDesc Object to remove from the list of results
568:      *
569:      * @return ImageDescQuery The current query, for fluid interface
570:      */
571:     public function prune($imageDesc = null)
572:     {
573:         if ($imageDesc) {
574:             $this->addUsingAlias(ImageDescPeer::ID, $imageDesc->getId(), Criteria::NOT_EQUAL);
575:         }
576: 
577:         return $this;
578:     }
579: 
580:     // timestampable behavior
581: 
582:     /**
583:      * Filter by the latest updated
584:      *
585:      * @param      int $nbDays Maximum age of the latest update in days
586:      *
587:      * @return     ImageDescQuery The current query, for fluid interface
588:      */
589:     public function recentlyUpdated($nbDays = 7)
590:     {
591:         return $this->addUsingAlias(ImageDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
592:     }
593: 
594:     /**
595:      * Order by update date desc
596:      *
597:      * @return     ImageDescQuery The current query, for fluid interface
598:      */
599:     public function lastUpdatedFirst()
600:     {
601:         return $this->addDescendingOrderByColumn(ImageDescPeer::UPDATED_AT);
602:     }
603: 
604:     /**
605:      * Order by update date asc
606:      *
607:      * @return     ImageDescQuery The current query, for fluid interface
608:      */
609:     public function firstUpdatedFirst()
610:     {
611:         return $this->addAscendingOrderByColumn(ImageDescPeer::UPDATED_AT);
612:     }
613: 
614:     /**
615:      * Filter by the latest created
616:      *
617:      * @param      int $nbDays Maximum age of in days
618:      *
619:      * @return     ImageDescQuery The current query, for fluid interface
620:      */
621:     public function recentlyCreated($nbDays = 7)
622:     {
623:         return $this->addUsingAlias(ImageDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
624:     }
625: 
626:     /**
627:      * Order by create date desc
628:      *
629:      * @return     ImageDescQuery The current query, for fluid interface
630:      */
631:     public function lastCreatedFirst()
632:     {
633:         return $this->addDescendingOrderByColumn(ImageDescPeer::CREATED_AT);
634:     }
635: 
636:     /**
637:      * Order by create date asc
638:      *
639:      * @return     ImageDescQuery The current query, for fluid interface
640:      */
641:     public function firstCreatedFirst()
642:     {
643:         return $this->addAscendingOrderByColumn(ImageDescPeer::CREATED_AT);
644:     }
645: }
646: 
thelia API documentation generated by ApiGen 2.8.0