class ApiQuery extends ModelCriteria

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

Methods

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

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

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

Returns a new ChildApiQuery object.

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

filterByLabel( string $label = null, string $comparison = null)

Filter the query on the label column

filterByApiKey( string $apiKey = null, string $comparison = null)

Filter the query on the api_key column

filterByProfileId( mixed $profileId = null, string $comparison = null)

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

filterByProfile( Profile|ObjectCollection $profile, string $comparison = null)

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

joinProfile( string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Adds a JOIN clause to the query using the Profile relation

useProfileQuery( string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Use the Profile relation Profile object

prune( Api $api = null)

Exclude object from result

int
doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the api table.

int
delete( ConnectionInterface $con = null)

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

ChildApiQuery
orderById($order = Criteria::ASC)

Order by the id column

ChildApiQuery
orderByLabel($order = Criteria::ASC)

Order by the label column

ChildApiQuery
orderByApiKey($order = Criteria::ASC)

Order by the api_key column

ChildApiQuery
orderByProfileId($order = Criteria::ASC)

Order by the profile_id column

ChildApiQuery
orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

ChildApiQuery
orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

ChildApiQuery
groupById()

Group by the id column

ChildApiQuery
groupByLabel()

Group by the label column

ChildApiQuery
groupByApiKey()

Group by the api_key column

ChildApiQuery
groupByProfileId()

Group by the profile_id column

ChildApiQuery
groupByCreatedAt()

Group by the created_at column

ChildApiQuery
groupByUpdatedAt()

Group by the updated_at column

ChildApiQuery
leftJoin($relation)

Adds a LEFT JOIN clause to the query

ChildApiQuery
rightJoin($relation)

Adds a RIGHT JOIN clause to the query

ChildApiQuery
innerJoin($relation)

Adds a INNER JOIN clause to the query

ChildApiQuery
leftJoinProfile($relationAlias = null)

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

ChildApiQuery
rightJoinProfile($relationAlias = null)

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

ChildApiQuery
innerJoinProfile($relationAlias = null)

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

ChildApi
findOne( ConnectionInterface $con = null)

Return the first ChildApi matching the query

ChildApi
findOneOrCreate( ConnectionInterface $con = null)

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

ChildApi
findOneById( int $id)

Return the first ChildApi filtered by the id column

ChildApi
findOneByLabel( string $label)

Return the first ChildApi filtered by the label column

ChildApi
findOneByApiKey( string $api_key)

Return the first ChildApi filtered by the api_key column

ChildApi
findOneByProfileId( int $profile_id)

Return the first ChildApi filtered by the profile_id column

ChildApi
findOneByCreatedAt( string $created_at)

Return the first ChildApi filtered by the created_at column

ChildApi
findOneByUpdatedAt( string $updated_at)

Return the first ChildApi filtered by the updated_at column

array
findById( int $id)

Return ChildApi objects filtered by the id column

array
findByLabel( string $label)

Return ChildApi objects filtered by the label column

array
findByApiKey( string $api_key)

Return ChildApi objects filtered by the api_key column

array
findByProfileId( int $profile_id)

Return ChildApi objects filtered by the profile_id column

array
findByCreatedAt( string $created_at)

Return ChildApi objects filtered by the created_at column

array
findByUpdatedAt( string $updated_at)

Return ChildApi objects filtered by the updated_at column

Details

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

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

Returns a new ChildApiQuery object.

Parameters

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

Return Value

ApiQuery

at line 117
Api|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

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

at line 199
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 220
ApiQuery filterByPrimaryKey( mixed $key)

Filter the query by primary key

Parameters

mixed $key Primary key to use for the query

Return Value

ApiQuery The current query, for fluid interface

at line 233
ApiQuery 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

ApiQuery The current query, for fluid interface

at line 257
ApiQuery 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

ApiQuery The current query, for fluid interface

at line 295
ApiQuery filterByLabel( string $label = null, string $comparison = null)

Filter the query on the label column

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

Parameters

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

ApiQuery The current query, for fluid interface

at line 324
ApiQuery filterByApiKey( string $apiKey = null, string $comparison = null)

Filter the query on the api_key column

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

Parameters

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

ApiQuery The current query, for fluid interface

at line 358
ApiQuery filterByProfileId( mixed $profileId = null, string $comparison = null)

Filter the query on the profile_id column

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

Parameters

mixed $profileId The value to use as filter. Use scalar values for equality. Use array values for in_array() equivalent. Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ApiQuery The current query, for fluid interface

See also

filterByProfile()

at line 401
ApiQuery 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

ApiQuery The current query, for fluid interface

at line 444
ApiQuery 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

ApiQuery The current query, for fluid interface

at line 475
ApiQuery filterByProfile( Profile|ObjectCollection $profile, string $comparison = null)

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

Parameters

Profile|ObjectCollection $profile The related object(s) to use as filter
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ApiQuery The current query, for fluid interface

at line 500
ApiQuery joinProfile( string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Adds a JOIN clause to the query using the Profile relation

Parameters

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

Return Value

ApiQuery The current query, for fluid interface

at line 535
ProfileQuery useProfileQuery( string $relationAlias = null, string $joinType = Criteria::LEFT_JOIN)

Use the Profile relation Profile 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

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

See also

useQuery()

at line 549
ApiQuery prune( Api $api = null)

Exclude object from result

Parameters

Api $api Object to remove from the list of results

Return Value

ApiQuery The current query, for fluid interface

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

Deletes all rows from the api table.

Parameters

ConnectionInterface $con the connection to use

Return Value

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

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

Performs a DELETE on the database, given a ChildApi 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 642
ApiQuery recentlyUpdated( int $nbDays = 7)

Filter by the latest updated

Parameters

int $nbDays Maximum age of the latest update in days

Return Value

ApiQuery The current query, for fluid interface

at line 654
ApiQuery recentlyCreated( int $nbDays = 7)

Filter by the latest created

Parameters

int $nbDays Maximum age of in days

Return Value

ApiQuery The current query, for fluid interface

at line 664
ApiQuery lastUpdatedFirst()

Order by update date desc

Return Value

ApiQuery The current query, for fluid interface

at line 674
ApiQuery firstUpdatedFirst()

Order by update date asc

Return Value

ApiQuery The current query, for fluid interface

at line 684
ApiQuery lastCreatedFirst()

Order by create date desc

Return Value

ApiQuery The current query, for fluid interface

at line 694
ApiQuery firstCreatedFirst()

Order by create date asc

Return Value

ApiQuery The current query, for fluid interface

at line 64
ChildApiQuery orderById($order = Criteria::ASC)

Order by the id column

Parameters

$order

Return Value

ChildApiQuery

at line 64
ChildApiQuery orderByLabel($order = Criteria::ASC)

Order by the label column

Parameters

$order

Return Value

ChildApiQuery

at line 64
ChildApiQuery orderByApiKey($order = Criteria::ASC)

Order by the api_key column

Parameters

$order

Return Value

ChildApiQuery

at line 64
ChildApiQuery orderByProfileId($order = Criteria::ASC)

Order by the profile_id column

Parameters

$order

Return Value

ChildApiQuery

at line 64
ChildApiQuery orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

Parameters

$order

Return Value

ChildApiQuery

at line 64
ChildApiQuery orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

Parameters

$order

Return Value

ChildApiQuery

at line 64
ChildApiQuery groupById()

Group by the id column

Return Value

ChildApiQuery

at line 64
ChildApiQuery groupByLabel()

Group by the label column

Return Value

ChildApiQuery

at line 64
ChildApiQuery groupByApiKey()

Group by the api_key column

Return Value

ChildApiQuery

at line 64
ChildApiQuery groupByProfileId()

Group by the profile_id column

Return Value

ChildApiQuery

at line 64
ChildApiQuery groupByCreatedAt()

Group by the created_at column

Return Value

ChildApiQuery

at line 64
ChildApiQuery groupByUpdatedAt()

Group by the updated_at column

Return Value

ChildApiQuery

at line 64
ChildApiQuery leftJoin($relation)

Adds a LEFT JOIN clause to the query

Parameters

$relation

Return Value

ChildApiQuery

at line 64
ChildApiQuery rightJoin($relation)

Adds a RIGHT JOIN clause to the query

Parameters

$relation

Return Value

ChildApiQuery

at line 64
ChildApiQuery innerJoin($relation)

Adds a INNER JOIN clause to the query

Parameters

$relation

Return Value

ChildApiQuery

at line 64
ChildApiQuery leftJoinProfile($relationAlias = null)

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

Parameters

$relationAlias

Return Value

ChildApiQuery

at line 64
ChildApiQuery rightJoinProfile($relationAlias = null)

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

Parameters

$relationAlias

Return Value

ChildApiQuery

at line 64
ChildApiQuery innerJoinProfile($relationAlias = null)

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

Parameters

$relationAlias

Return Value

ChildApiQuery

at line 64
ChildApi findOne( ConnectionInterface $con = null)

Return the first ChildApi matching the query

Parameters

ConnectionInterface $con

Return Value

ChildApi

at line 64
ChildApi findOneOrCreate( ConnectionInterface $con = null)

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

Parameters

ConnectionInterface $con

Return Value

ChildApi

at line 64
ChildApi findOneById( int $id)

Return the first ChildApi filtered by the id column

Parameters

int $id

Return Value

ChildApi

at line 64
ChildApi findOneByLabel( string $label)

Return the first ChildApi filtered by the label column

Parameters

string $label

Return Value

ChildApi

at line 64
ChildApi findOneByApiKey( string $api_key)

Return the first ChildApi filtered by the api_key column

Parameters

string $api_key

Return Value

ChildApi

at line 64
ChildApi findOneByProfileId( int $profile_id)

Return the first ChildApi filtered by the profile_id column

Parameters

int $profile_id

Return Value

ChildApi

at line 64
ChildApi findOneByCreatedAt( string $created_at)

Return the first ChildApi filtered by the created_at column

Parameters

string $created_at

Return Value

ChildApi

at line 64
ChildApi findOneByUpdatedAt( string $updated_at)

Return the first ChildApi filtered by the updated_at column

Parameters

string $updated_at

Return Value

ChildApi

at line 64
array findById( int $id)

Return ChildApi objects filtered by the id column

Parameters

int $id

Return Value

array

at line 64
array findByLabel( string $label)

Return ChildApi objects filtered by the label column

Parameters

string $label

Return Value

array

at line 64
array findByApiKey( string $api_key)

Return ChildApi objects filtered by the api_key column

Parameters

string $api_key

Return Value

array

at line 64
array findByProfileId( int $profile_id)

Return ChildApi objects filtered by the profile_id column

Parameters

int $profile_id

Return Value

array

at line 64
array findByCreatedAt( string $created_at)

Return ChildApi objects filtered by the created_at column

Parameters

string $created_at

Return Value

array

at line 64
array findByUpdatedAt( string $updated_at)

Return ChildApi objects filtered by the updated_at column

Parameters

string $updated_at

Return Value

array