class ResourceQuery extends ModelCriteria

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

Methods

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

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

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

Returns a new ChildResourceQuery object.

Resource|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

filterByCode( string $code = null, string $comparison = null)

Filter the query on the code 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

filterByProfileResource( ProfileResource|ObjectCollection $profileResource, string $comparison = null)

Filter the query by a related \Thelia\Model\ProfileResource object

joinProfileResource( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Adds a JOIN clause to the query using the ProfileResource relation

useProfileResourceQuery( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Use the ProfileResource relation ProfileResource object

filterByResourceI18n( ResourceI18n|ObjectCollection $resourceI18n, string $comparison = null)

Filter the query by a related \Thelia\Model\ResourceI18n object

joinResourceI18n( string $relationAlias = null, string $joinType = 'LEFT JOIN')

Adds a JOIN clause to the query using the ResourceI18n relation

useResourceI18nQuery( string $relationAlias = null, string $joinType = 'LEFT JOIN')

Use the ResourceI18n relation ResourceI18n object

filterByProfile( Profile $profile, string $comparison = Criteria::EQUAL)

Filter the query by a related Profile object using the profile_resource table as cross reference

prune( Resource $resource = null)

Exclude object from result

int
doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the resource table.

int
delete( ConnectionInterface $con = null)

Performs a DELETE on the database, given a ChildResource 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

joinI18n( string $locale = 'en_US', string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Adds a JOIN clause to the query using the i18n relation

joinWithI18n( string $locale = 'en_US', string $joinType = Criteria::LEFT_JOIN)

Adds a JOIN clause to the query and hydrates the related I18n object.

useI18nQuery( string $locale = 'en_US', string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Use the I18n relation query object

ChildResourceQuery
orderById($order = Criteria::ASC)

Order by the id column

ChildResourceQuery
orderByCode($order = Criteria::ASC)

Order by the code column

ChildResourceQuery
orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

ChildResourceQuery
orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

ChildResourceQuery
groupById()

Group by the id column

ChildResourceQuery
groupByCode()

Group by the code column

ChildResourceQuery
groupByCreatedAt()

Group by the created_at column

ChildResourceQuery
groupByUpdatedAt()

Group by the updated_at column

ChildResourceQuery
leftJoin($relation)

Adds a LEFT JOIN clause to the query

ChildResourceQuery
rightJoin($relation)

Adds a RIGHT JOIN clause to the query

ChildResourceQuery
innerJoin($relation)

Adds a INNER JOIN clause to the query

ChildResourceQuery
leftJoinProfileResource($relationAlias = null)

Adds a LEFT JOIN clause to the query using the ProfileResource relation

ChildResourceQuery
rightJoinProfileResource($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the ProfileResource relation

ChildResourceQuery
innerJoinProfileResource($relationAlias = null)

Adds a INNER JOIN clause to the query using the ProfileResource relation

ChildResourceQuery
leftJoinResourceI18n($relationAlias = null)

Adds a LEFT JOIN clause to the query using the ResourceI18n relation

ChildResourceQuery
rightJoinResourceI18n($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the ResourceI18n relation

ChildResourceQuery
innerJoinResourceI18n($relationAlias = null)

Adds a INNER JOIN clause to the query using the ResourceI18n relation

ChildResource
findOne( ConnectionInterface $con = null)

Return the first ChildResource matching the query

ChildResource
findOneOrCreate( ConnectionInterface $con = null)

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

ChildResource
findOneById( int $id)

Return the first ChildResource filtered by the id column

ChildResource
findOneByCode( string $code)

Return the first ChildResource filtered by the code column

ChildResource
findOneByCreatedAt( string $created_at)

Return the first ChildResource filtered by the created_at column

ChildResource
findOneByUpdatedAt( string $updated_at)

Return the first ChildResource filtered by the updated_at column

array
findById( int $id)

Return ChildResource objects filtered by the id column

array
findByCode( string $code)

Return ChildResource objects filtered by the code column

array
findByCreatedAt( string $created_at)

Return ChildResource objects filtered by the created_at column

array
findByUpdatedAt( string $updated_at)

Return ChildResource objects filtered by the updated_at column

Details

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

Initializes internal state of \Thelia\Model\Base\ResourceQuery 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 84
static ResourceQuery create( string $modelAlias = null, Criteria $criteria = null)

Returns a new ChildResourceQuery object.

Parameters

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

Return Value

ResourceQuery

at line 114
Resource|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

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

at line 196
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 217
ResourceQuery filterByPrimaryKey( mixed $key)

Filter the query by primary key

Parameters

mixed $key Primary key to use for the query

Return Value

ResourceQuery The current query, for fluid interface

at line 230
ResourceQuery 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

ResourceQuery The current query, for fluid interface

at line 254
ResourceQuery 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

ResourceQuery The current query, for fluid interface

at line 292
ResourceQuery filterByCode( string $code = null, string $comparison = null)

Filter the query on the code column

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

Parameters

string $code 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

ResourceQuery The current query, for fluid interface

at line 326
ResourceQuery 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

ResourceQuery The current query, for fluid interface

at line 369
ResourceQuery 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

ResourceQuery The current query, for fluid interface

at line 400
ResourceQuery filterByProfileResource( ProfileResource|ObjectCollection $profileResource, string $comparison = null)

Filter the query by a related \Thelia\Model\ProfileResource object

Parameters

ProfileResource|ObjectCollection $profileResource the related object to use as filter
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ResourceQuery The current query, for fluid interface

at line 423
ResourceQuery joinProfileResource( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Adds a JOIN clause to the query using the ProfileResource relation

Parameters

string $relationAlias optional alias for the relation
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

ResourceQuery The current query, for fluid interface

at line 458
ProfileResourceQuery useProfileResourceQuery( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Use the ProfileResource relation ProfileResource object

Parameters

string $relationAlias optional alias for the relation, to be used as main alias in the secondary query
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

ProfileResourceQuery A secondary query class using the current class as primary query

See also

useQuery()

at line 473
ResourceQuery filterByResourceI18n( ResourceI18n|ObjectCollection $resourceI18n, string $comparison = null)

Filter the query by a related \Thelia\Model\ResourceI18n object

Parameters

ResourceI18n|ObjectCollection $resourceI18n the related object to use as filter
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ResourceQuery The current query, for fluid interface

at line 496
ResourceQuery joinResourceI18n( string $relationAlias = null, string $joinType = 'LEFT JOIN')

Adds a JOIN clause to the query using the ResourceI18n relation

Parameters

string $relationAlias optional alias for the relation
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

ResourceQuery The current query, for fluid interface

at line 531
ResourceI18nQuery useResourceI18nQuery( string $relationAlias = null, string $joinType = 'LEFT JOIN')

Use the ResourceI18n relation ResourceI18n object

Parameters

string $relationAlias optional alias for the relation, to be used as main alias in the secondary query
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

ResourceI18nQuery A secondary query class using the current class as primary query

See also

useQuery()

at line 547
ResourceQuery filterByProfile( Profile $profile, string $comparison = Criteria::EQUAL)

Filter the query by a related Profile object using the profile_resource table as cross reference

Parameters

Profile $profile the related object to use as filter
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ResourceQuery The current query, for fluid interface

at line 562
ResourceQuery prune( Resource $resource = null)

Exclude object from result

Parameters

Resource $resource Object to remove from the list of results

Return Value

ResourceQuery The current query, for fluid interface

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

Deletes all rows from the resource table.

Parameters

ConnectionInterface $con the connection to use

Return Value

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

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

Performs a DELETE on the database, given a ChildResource 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 655
ResourceQuery recentlyUpdated( int $nbDays = 7)

Filter by the latest updated

Parameters

int $nbDays Maximum age of the latest update in days

Return Value

ResourceQuery The current query, for fluid interface

at line 667
ResourceQuery recentlyCreated( int $nbDays = 7)

Filter by the latest created

Parameters

int $nbDays Maximum age of in days

Return Value

ResourceQuery The current query, for fluid interface

at line 677
ResourceQuery lastUpdatedFirst()

Order by update date desc

Return Value

ResourceQuery The current query, for fluid interface

at line 687
ResourceQuery firstUpdatedFirst()

Order by update date asc

Return Value

ResourceQuery The current query, for fluid interface

at line 697
ResourceQuery lastCreatedFirst()

Order by create date desc

Return Value

ResourceQuery The current query, for fluid interface

at line 707
ResourceQuery firstCreatedFirst()

Order by create date asc

Return Value

ResourceQuery The current query, for fluid interface

at line 723
ResourceQuery joinI18n( string $locale = 'en_US', string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Adds a JOIN clause to the query using the i18n relation

Parameters

string $locale Locale to use for the join condition, e.g. 'fr_FR'
string $relationAlias optional alias for the relation
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.

Return Value

ResourceQuery The current query, for fluid interface

at line 741
ResourceQuery joinWithI18n( string $locale = 'en_US', string $joinType = Criteria::LEFT_JOIN)

Adds a JOIN clause to the query and hydrates the related I18n object.

Shortcut for $c->joinI18n($locale)->with()

Parameters

string $locale Locale to use for the join condition, e.g. 'fr_FR'
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.

Return Value

ResourceQuery The current query, for fluid interface

at line 762
ResourceI18nQuery useI18nQuery( string $locale = 'en_US', string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Use the I18n relation query object

Parameters

string $locale Locale to use for the join condition, e.g. 'fr_FR'
string $relationAlias optional alias for the relation
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.

Return Value

ResourceI18nQuery A secondary query class using the current class as primary query

See also

useQuery()

at line 61
ChildResourceQuery orderById($order = Criteria::ASC)

Order by the id column

Parameters

$order

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery orderByCode($order = Criteria::ASC)

Order by the code column

Parameters

$order

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

Parameters

$order

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

Parameters

$order

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery groupById()

Group by the id column

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery groupByCode()

Group by the code column

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery groupByCreatedAt()

Group by the created_at column

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery groupByUpdatedAt()

Group by the updated_at column

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery leftJoin($relation)

Adds a LEFT JOIN clause to the query

Parameters

$relation

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery rightJoin($relation)

Adds a RIGHT JOIN clause to the query

Parameters

$relation

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery innerJoin($relation)

Adds a INNER JOIN clause to the query

Parameters

$relation

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery leftJoinProfileResource($relationAlias = null)

Adds a LEFT JOIN clause to the query using the ProfileResource relation

Parameters

$relationAlias

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery rightJoinProfileResource($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the ProfileResource relation

Parameters

$relationAlias

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery innerJoinProfileResource($relationAlias = null)

Adds a INNER JOIN clause to the query using the ProfileResource relation

Parameters

$relationAlias

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery leftJoinResourceI18n($relationAlias = null)

Adds a LEFT JOIN clause to the query using the ResourceI18n relation

Parameters

$relationAlias

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery rightJoinResourceI18n($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the ResourceI18n relation

Parameters

$relationAlias

Return Value

ChildResourceQuery

at line 61
ChildResourceQuery innerJoinResourceI18n($relationAlias = null)

Adds a INNER JOIN clause to the query using the ResourceI18n relation

Parameters

$relationAlias

Return Value

ChildResourceQuery

at line 61
ChildResource findOne( ConnectionInterface $con = null)

Return the first ChildResource matching the query

Parameters

ConnectionInterface $con

Return Value

ChildResource

at line 61
ChildResource findOneOrCreate( ConnectionInterface $con = null)

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

Parameters

ConnectionInterface $con

Return Value

ChildResource

at line 61
ChildResource findOneById( int $id)

Return the first ChildResource filtered by the id column

Parameters

int $id

Return Value

ChildResource

at line 61
ChildResource findOneByCode( string $code)

Return the first ChildResource filtered by the code column

Parameters

string $code

Return Value

ChildResource

at line 61
ChildResource findOneByCreatedAt( string $created_at)

Return the first ChildResource filtered by the created_at column

Parameters

string $created_at

Return Value

ChildResource

at line 61
ChildResource findOneByUpdatedAt( string $updated_at)

Return the first ChildResource filtered by the updated_at column

Parameters

string $updated_at

Return Value

ChildResource

at line 61
array findById( int $id)

Return ChildResource objects filtered by the id column

Parameters

int $id

Return Value

array

at line 61
array findByCode( string $code)

Return ChildResource objects filtered by the code column

Parameters

string $code

Return Value

array

at line 61
array findByCreatedAt( string $created_at)

Return ChildResource objects filtered by the created_at column

Parameters

string $created_at

Return Value

array

at line 61
array findByUpdatedAt( string $updated_at)

Return ChildResource objects filtered by the updated_at column

Parameters

string $updated_at

Return Value

array