class NewsletterQuery extends ModelCriteria

Base class that represents a query for the 'newsletter' table.

Methods

__construct( string $dbName = 'thelia', string $modelName = '\\Thelia\\Model\\Newsletter', string $modelAlias = null)

Initializes internal state of \Thelia\Model\Base\NewsletterQuery object.

static  NewsletterQuery
create( string $modelAlias = null, Criteria $criteria = null)

Returns a new ChildNewsletterQuery object.

Newsletter|array|mixed
findPk( mixed $key, ConnectionInterface $con = null)

Find object by primary key.

ObjectCollection|array|mixed
findPks( array $keys, ConnectionInterface $con = null)

Find objects by primary key $objs = $c->findPks(array(12, 56, 832), $con);

filterByPrimaryKey( mixed $key)

Filter the query by primary key

filterByPrimaryKeys( array $keys)

Filter the query by a list of primary keys

filterById( mixed $id = null, string $comparison = null)

Filter the query on the id column

filterByEmail( string $email = null, string $comparison = null)

Filter the query on the email column

filterByFirstname( string $firstname = null, string $comparison = null)

Filter the query on the firstname column

filterByLastname( string $lastname = null, string $comparison = null)

Filter the query on the lastname column

filterByLocale( string $locale = null, string $comparison = null)

Filter the query on the locale column

filterByUnsubscribed( boolean|string $unsubscribed = null, string $comparison = null)

Filter the query on the unsubscribed column

filterByCreatedAt( mixed $createdAt = null, string $comparison = null)

Filter the query on the created_at column

filterByUpdatedAt( mixed $updatedAt = null, string $comparison = null)

Filter the query on the updated_at column

prune( Newsletter $newsletter = null)

Exclude object from result

int
doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the newsletter table.

int
delete( ConnectionInterface $con = null)

Performs a DELETE on the database, given a ChildNewsletter or Criteria object OR a primary key value.

recentlyUpdated( int $nbDays = 7)

Filter by the latest updated

recentlyCreated( int $nbDays = 7)

Filter by the latest created

lastUpdatedFirst()

Order by update date desc

firstUpdatedFirst()

Order by update date asc

lastCreatedFirst()

Order by create date desc

firstCreatedFirst()

Order by create date asc

ChildNewsletterQuery
orderById($order = Criteria::ASC)

Order by the id column

ChildNewsletterQuery
orderByEmail($order = Criteria::ASC)

Order by the email column

ChildNewsletterQuery
orderByFirstname($order = Criteria::ASC)

Order by the firstname column

ChildNewsletterQuery
orderByLastname($order = Criteria::ASC)

Order by the lastname column

ChildNewsletterQuery
orderByLocale($order = Criteria::ASC)

Order by the locale column

ChildNewsletterQuery
orderByUnsubscribed($order = Criteria::ASC)

Order by the unsubscribed column

ChildNewsletterQuery
orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

ChildNewsletterQuery
orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

ChildNewsletterQuery
groupById()

Group by the id column

ChildNewsletterQuery
groupByEmail()

Group by the email column

ChildNewsletterQuery
groupByFirstname()

Group by the firstname column

ChildNewsletterQuery
groupByLastname()

Group by the lastname column

ChildNewsletterQuery
groupByLocale()

Group by the locale column

ChildNewsletterQuery
groupByUnsubscribed()

Group by the unsubscribed column

ChildNewsletterQuery
groupByCreatedAt()

Group by the created_at column

ChildNewsletterQuery
groupByUpdatedAt()

Group by the updated_at column

ChildNewsletterQuery
leftJoin($relation)

Adds a LEFT JOIN clause to the query

ChildNewsletterQuery
rightJoin($relation)

Adds a RIGHT JOIN clause to the query

ChildNewsletterQuery
innerJoin($relation)

Adds a INNER JOIN clause to the query

ChildNewsletter
findOne( ConnectionInterface $con = null)

Return the first ChildNewsletter matching the query

ChildNewsletter
findOneOrCreate( ConnectionInterface $con = null)

Return the first ChildNewsletter matching the query, or a new ChildNewsletter object populated from the query conditions when no match is found

ChildNewsletter
findOneById( int $id)

Return the first ChildNewsletter filtered by the id column

ChildNewsletter
findOneByEmail( string $email)

Return the first ChildNewsletter filtered by the email column

ChildNewsletter
findOneByFirstname( string $firstname)

Return the first ChildNewsletter filtered by the firstname column

ChildNewsletter
findOneByLastname( string $lastname)

Return the first ChildNewsletter filtered by the lastname column

ChildNewsletter
findOneByLocale( string $locale)

Return the first ChildNewsletter filtered by the locale column

ChildNewsletter
findOneByUnsubscribed( boolean $unsubscribed)

Return the first ChildNewsletter filtered by the unsubscribed column

ChildNewsletter
findOneByCreatedAt( string $created_at)

Return the first ChildNewsletter filtered by the created_at column

ChildNewsletter
findOneByUpdatedAt( string $updated_at)

Return the first ChildNewsletter filtered by the updated_at column

array
findById( int $id)

Return ChildNewsletter objects filtered by the id column

array
findByEmail( string $email)

Return ChildNewsletter objects filtered by the email column

array
findByFirstname( string $firstname)

Return ChildNewsletter objects filtered by the firstname column

array
findByLastname( string $lastname)

Return ChildNewsletter objects filtered by the lastname column

array
findByLocale( string $locale)

Return ChildNewsletter objects filtered by the locale column

array
findByUnsubscribed( boolean $unsubscribed)

Return ChildNewsletter objects filtered by the unsubscribed column

array
findByCreatedAt( string $created_at)

Return ChildNewsletter objects filtered by the created_at column

array
findByUpdatedAt( string $updated_at)

Return ChildNewsletter objects filtered by the updated_at column

Details

at line 75
__construct( string $dbName = 'thelia', string $modelName = '\\Thelia\\Model\\Newsletter', string $modelAlias = null)

Initializes internal state of \Thelia\Model\Base\NewsletterQuery object.

Parameters

string $dbName The database name
string $modelName The phpName of a model, e.g. 'Book'
string $modelAlias The alias for the model in this query, e.g. 'b'

at line 88
static NewsletterQuery create( string $modelAlias = null, Criteria $criteria = null)

Returns a new ChildNewsletterQuery object.

Parameters

string $modelAlias The alias of a model in the query
Criteria $criteria Optional Criteria to build the query from

Return Value

NewsletterQuery

at line 118
Newsletter|array|mixed findPk( mixed $key, ConnectionInterface $con = null)

Find object by primary key.

Propel uses the instance pool to skip the database if the object exists. Go fast if the query is untouched.

$obj = $c->findPk(12, $con);

Parameters

mixed $key Primary key to use for the query
ConnectionInterface $con an optional connection object

Return Value

Newsletter|array|mixed the result, formatted by the current formatter

at line 200
ObjectCollection|array|mixed findPks( array $keys, ConnectionInterface $con = null)

Find objects by primary key $objs = $c->findPks(array(12, 56, 832), $con);

Parameters

array $keys Primary keys to use for the query
ConnectionInterface $con an optional connection object

Return Value

ObjectCollection|array|mixed the list of results, formatted by the current formatter

at line 221
NewsletterQuery filterByPrimaryKey( mixed $key)

Filter the query by primary key

Parameters

mixed $key Primary key to use for the query

Return Value

NewsletterQuery The current query, for fluid interface

at line 234
NewsletterQuery filterByPrimaryKeys( array $keys)

Filter the query by a list of primary keys

Parameters

array $keys The list of primary key to use for the query

Return Value

NewsletterQuery The current query, for fluid interface

at line 258
NewsletterQuery filterById( mixed $id = null, string $comparison = null)

Filter the query on the id column

Example usage: $query->filterById(1234); // WHERE id = 1234 $query->filterById(array(12, 34)); // WHERE id IN (12, 34) $query->filterById(array('min' => 12)); // WHERE id > 12

Parameters

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.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 296
NewsletterQuery filterByEmail( string $email = null, string $comparison = null)

Filter the query on the email column

Example usage: $query->filterByEmail('fooValue'); // WHERE email = 'fooValue' $query->filterByEmail('%fooValue%'); // WHERE email LIKE '%fooValue%'

Parameters

string $email The value to use as filter. Accepts wildcards (* and % trigger a LIKE)
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 325
NewsletterQuery filterByFirstname( string $firstname = null, string $comparison = null)

Filter the query on the firstname column

Example usage: $query->filterByFirstname('fooValue'); // WHERE firstname = 'fooValue' $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%'

Parameters

string $firstname The value to use as filter. Accepts wildcards (* and % trigger a LIKE)
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 354
NewsletterQuery filterByLastname( string $lastname = null, string $comparison = null)

Filter the query on the lastname column

Example usage: $query->filterByLastname('fooValue'); // WHERE lastname = 'fooValue' $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%'

Parameters

string $lastname The value to use as filter. Accepts wildcards (* and % trigger a LIKE)
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 383
NewsletterQuery filterByLocale( string $locale = null, string $comparison = null)

Filter the query on the locale column

Example usage: $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue' $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%'

Parameters

string $locale The value to use as filter. Accepts wildcards (* and % trigger a LIKE)
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 415
NewsletterQuery filterByUnsubscribed( boolean|string $unsubscribed = null, string $comparison = null)

Filter the query on the unsubscribed column

Example usage: $query->filterByUnsubscribed(true); // WHERE unsubscribed = true $query->filterByUnsubscribed('yes'); // WHERE unsubscribed = true

Parameters

boolean|string $unsubscribed 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').
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 444
NewsletterQuery filterByCreatedAt( mixed $createdAt = null, string $comparison = null)

Filter the query on the created_at column

Example usage: $query->filterByCreatedAt('2011-03-14'); // WHERE createdat = '2011-03-14' $query->filterByCreatedAt('now'); // WHERE createdat = '2011-03-14' $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'

Parameters

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.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 487
NewsletterQuery filterByUpdatedAt( mixed $updatedAt = null, string $comparison = null)

Filter the query on the updated_at column

Example usage: $query->filterByUpdatedAt('2011-03-14'); // WHERE updatedat = '2011-03-14' $query->filterByUpdatedAt('now'); // WHERE updatedat = '2011-03-14' $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'

Parameters

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.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

NewsletterQuery The current query, for fluid interface

at line 517
NewsletterQuery prune( Newsletter $newsletter = null)

Exclude object from result

Parameters

Newsletter $newsletter Object to remove from the list of results

Return Value

NewsletterQuery The current query, for fluid interface

at line 532
int doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the newsletter table.

Parameters

ConnectionInterface $con the connection to use

Return Value

int The number of affected rows (if supported by underlying database driver).

at line 569
int delete( ConnectionInterface $con = null)

Performs a DELETE on the database, given a ChildNewsletter or Criteria object OR a primary key value.

Parameters

ConnectionInterface $con

Return Value

int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows if supported by native driver or if emulated using Propel.

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.

at line 610
NewsletterQuery recentlyUpdated( int $nbDays = 7)

Filter by the latest updated

Parameters

int $nbDays Maximum age of the latest update in days

Return Value

NewsletterQuery The current query, for fluid interface

at line 622
NewsletterQuery recentlyCreated( int $nbDays = 7)

Filter by the latest created

Parameters

int $nbDays Maximum age of in days

Return Value

NewsletterQuery The current query, for fluid interface

at line 632
NewsletterQuery lastUpdatedFirst()

Order by update date desc

Return Value

NewsletterQuery The current query, for fluid interface

at line 642
NewsletterQuery firstUpdatedFirst()

Order by update date asc

Return Value

NewsletterQuery The current query, for fluid interface

at line 652
NewsletterQuery lastCreatedFirst()

Order by create date desc

Return Value

NewsletterQuery The current query, for fluid interface

at line 662
NewsletterQuery firstCreatedFirst()

Order by create date asc

Return Value

NewsletterQuery The current query, for fluid interface

at line 65
ChildNewsletterQuery orderById($order = Criteria::ASC)

Order by the id column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery orderByEmail($order = Criteria::ASC)

Order by the email column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery orderByFirstname($order = Criteria::ASC)

Order by the firstname column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery orderByLastname($order = Criteria::ASC)

Order by the lastname column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery orderByLocale($order = Criteria::ASC)

Order by the locale column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery orderByUnsubscribed($order = Criteria::ASC)

Order by the unsubscribed column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

Parameters

$order

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupById()

Group by the id column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupByEmail()

Group by the email column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupByFirstname()

Group by the firstname column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupByLastname()

Group by the lastname column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupByLocale()

Group by the locale column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupByUnsubscribed()

Group by the unsubscribed column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupByCreatedAt()

Group by the created_at column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery groupByUpdatedAt()

Group by the updated_at column

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery leftJoin($relation)

Adds a LEFT JOIN clause to the query

Parameters

$relation

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery rightJoin($relation)

Adds a RIGHT JOIN clause to the query

Parameters

$relation

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletterQuery innerJoin($relation)

Adds a INNER JOIN clause to the query

Parameters

$relation

Return Value

ChildNewsletterQuery

at line 65
ChildNewsletter findOne( ConnectionInterface $con = null)

Return the first ChildNewsletter matching the query

Parameters

ConnectionInterface $con

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneOrCreate( ConnectionInterface $con = null)

Return the first ChildNewsletter matching the query, or a new ChildNewsletter object populated from the query conditions when no match is found

Parameters

ConnectionInterface $con

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneById( int $id)

Return the first ChildNewsletter filtered by the id column

Parameters

int $id

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneByEmail( string $email)

Return the first ChildNewsletter filtered by the email column

Parameters

string $email

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneByFirstname( string $firstname)

Return the first ChildNewsletter filtered by the firstname column

Parameters

string $firstname

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneByLastname( string $lastname)

Return the first ChildNewsletter filtered by the lastname column

Parameters

string $lastname

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneByLocale( string $locale)

Return the first ChildNewsletter filtered by the locale column

Parameters

string $locale

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneByUnsubscribed( boolean $unsubscribed)

Return the first ChildNewsletter filtered by the unsubscribed column

Parameters

boolean $unsubscribed

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneByCreatedAt( string $created_at)

Return the first ChildNewsletter filtered by the created_at column

Parameters

string $created_at

Return Value

ChildNewsletter

at line 65
ChildNewsletter findOneByUpdatedAt( string $updated_at)

Return the first ChildNewsletter filtered by the updated_at column

Parameters

string $updated_at

Return Value

ChildNewsletter

at line 65
array findById( int $id)

Return ChildNewsletter objects filtered by the id column

Parameters

int $id

Return Value

array

at line 65
array findByEmail( string $email)

Return ChildNewsletter objects filtered by the email column

Parameters

string $email

Return Value

array

at line 65
array findByFirstname( string $firstname)

Return ChildNewsletter objects filtered by the firstname column

Parameters

string $firstname

Return Value

array

at line 65
array findByLastname( string $lastname)

Return ChildNewsletter objects filtered by the lastname column

Parameters

string $lastname

Return Value

array

at line 65
array findByLocale( string $locale)

Return ChildNewsletter objects filtered by the locale column

Parameters

string $locale

Return Value

array

at line 65
array findByUnsubscribed( boolean $unsubscribed)

Return ChildNewsletter objects filtered by the unsubscribed column

Parameters

boolean $unsubscribed

Return Value

array

at line 65
array findByCreatedAt( string $created_at)

Return ChildNewsletter objects filtered by the created_at column

Parameters

string $created_at

Return Value

array

at line 65
array findByUpdatedAt( string $updated_at)

Return ChildNewsletter objects filtered by the updated_at column

Parameters

string $updated_at

Return Value

array