class ApiQuery extends ApiQuery

Skeleton subclass for performing query and update operations on the 'api' table.

You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.

Methods

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

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

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

Returns a new ChildApiQuery object.

from  ApiQuery
Api|array|mixed
findPk( mixed $key, ConnectionInterface $con = null)

Find object by primary key.

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

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

from  ApiQuery
filterByPrimaryKey( mixed $key)

Filter the query by primary key

from  ApiQuery
filterByPrimaryKeys( array $keys)

Filter the query by a list of primary keys

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

Filter the query on the id column

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

Filter the query on the label column

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

Filter the query on the api_key column

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

Filter the query on the profile_id column

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

Filter the query on the created_at column

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

Filter the query on the updated_at column

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

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

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

Adds a JOIN clause to the query using the Profile relation

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

Use the Profile relation Profile object

from  ApiQuery
prune( Api $api = null)

Exclude object from result

from  ApiQuery
int
doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the api table.

from  ApiQuery
int
delete( ConnectionInterface $con = null)

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

from  ApiQuery
recentlyUpdated( int $nbDays = 7)

Filter by the latest updated

from  ApiQuery
recentlyCreated( int $nbDays = 7)

Filter by the latest created

from  ApiQuery
lastUpdatedFirst()

Order by update date desc

from  ApiQuery
firstUpdatedFirst()

Order by update date asc

from  ApiQuery
lastCreatedFirst()

Order by create date desc

from  ApiQuery
firstCreatedFirst()

Order by create date asc

from  ApiQuery
ChildApiQuery
orderById($order = Criteria::ASC)

Order by the id column

from  ApiQuery
ChildApiQuery
orderByLabel($order = Criteria::ASC)

Order by the label column

from  ApiQuery
ChildApiQuery
orderByApiKey($order = Criteria::ASC)

Order by the api_key column

from  ApiQuery
ChildApiQuery
orderByProfileId($order = Criteria::ASC)

Order by the profile_id column

from  ApiQuery
ChildApiQuery
orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

from  ApiQuery
ChildApiQuery
orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

from  ApiQuery
ChildApiQuery
groupById()

Group by the id column

from  ApiQuery
ChildApiQuery
groupByLabel()

Group by the label column

from  ApiQuery
ChildApiQuery
groupByApiKey()

Group by the api_key column

from  ApiQuery
ChildApiQuery
groupByProfileId()

Group by the profile_id column

from  ApiQuery
ChildApiQuery
groupByCreatedAt()

Group by the created_at column

from  ApiQuery
ChildApiQuery
groupByUpdatedAt()

Group by the updated_at column

from  ApiQuery
ChildApiQuery
leftJoin($relation)

Adds a LEFT JOIN clause to the query

from  ApiQuery
ChildApiQuery
rightJoin($relation)

Adds a RIGHT JOIN clause to the query

from  ApiQuery
ChildApiQuery
innerJoin($relation)

Adds a INNER JOIN clause to the query

from  ApiQuery
ChildApiQuery
leftJoinProfile($relationAlias = null)

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

from  ApiQuery
ChildApiQuery
rightJoinProfile($relationAlias = null)

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

from  ApiQuery
ChildApiQuery
innerJoinProfile($relationAlias = null)

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

from  ApiQuery
ChildApi
findOne( ConnectionInterface $con = null)

Return the first ChildApi matching the query

from  ApiQuery
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

from  ApiQuery
ChildApi
findOneById( int $id)

Return the first ChildApi filtered by the id column

from  ApiQuery
ChildApi
findOneByLabel( string $label)

Return the first ChildApi filtered by the label column

from  ApiQuery
ChildApi
findOneByApiKey( string $api_key)

Return the first ChildApi filtered by the api_key column

from  ApiQuery
ChildApi
findOneByProfileId( int $profile_id)

Return the first ChildApi filtered by the profile_id column

from  ApiQuery
ChildApi
findOneByCreatedAt( string $created_at)

Return the first ChildApi filtered by the created_at column

from  ApiQuery
ChildApi
findOneByUpdatedAt( string $updated_at)

Return the first ChildApi filtered by the updated_at column

from  ApiQuery
array
findById( int $id)

Return ChildApi objects filtered by the id column

from  ApiQuery
array
findByLabel( string $label)

Return ChildApi objects filtered by the label column

from  ApiQuery
array
findByApiKey( string $api_key)

Return ChildApi objects filtered by the api_key column

from  ApiQuery
array
findByProfileId( int $profile_id)

Return ChildApi objects filtered by the profile_id column

from  ApiQuery
array
findByCreatedAt( string $created_at)

Return ChildApi objects filtered by the created_at column

from  ApiQuery
array
findByUpdatedAt( string $updated_at)

Return ChildApi objects filtered by the updated_at column

from  ApiQuery

Details

in ApiQuery 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'

in ApiQuery 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

in 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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()

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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()

in ApiQuery 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

in ApiQuery 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).

in ApiQuery 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.

in ApiQuery 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

in ApiQuery 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

in ApiQuery at line 664
ApiQuery lastUpdatedFirst()

Order by update date desc

Return Value

ApiQuery The current query, for fluid interface

in ApiQuery at line 674
ApiQuery firstUpdatedFirst()

Order by update date asc

Return Value

ApiQuery The current query, for fluid interface

in ApiQuery at line 684
ApiQuery lastCreatedFirst()

Order by create date desc

Return Value

ApiQuery The current query, for fluid interface

in ApiQuery at line 694
ApiQuery firstCreatedFirst()

Order by create date asc

Return Value

ApiQuery The current query, for fluid interface

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

Order by the id column

Parameters

$order

Return Value

ChildApiQuery

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

Order by the label column

Parameters

$order

Return Value

ChildApiQuery

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

Order by the api_key column

Parameters

$order

Return Value

ChildApiQuery

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

Order by the profile_id column

Parameters

$order

Return Value

ChildApiQuery

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

Order by the created_at column

Parameters

$order

Return Value

ChildApiQuery

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

Order by the updated_at column

Parameters

$order

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery groupById()

Group by the id column

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery groupByLabel()

Group by the label column

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery groupByApiKey()

Group by the api_key column

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery groupByProfileId()

Group by the profile_id column

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery groupByCreatedAt()

Group by the created_at column

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery groupByUpdatedAt()

Group by the updated_at column

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery leftJoin($relation)

Adds a LEFT JOIN clause to the query

Parameters

$relation

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery rightJoin($relation)

Adds a RIGHT JOIN clause to the query

Parameters

$relation

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery innerJoin($relation)

Adds a INNER JOIN clause to the query

Parameters

$relation

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery leftJoinProfile($relationAlias = null)

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

Parameters

$relationAlias

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery rightJoinProfile($relationAlias = null)

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

Parameters

$relationAlias

Return Value

ChildApiQuery

in ApiQuery at line 64
ChildApiQuery innerJoinProfile($relationAlias = null)

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

Parameters

$relationAlias

Return Value

ChildApiQuery

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

Return the first ChildApi matching the query

Parameters

ConnectionInterface $con

Return Value

ChildApi

in ApiQuery 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

in ApiQuery at line 64
ChildApi findOneById( int $id)

Return the first ChildApi filtered by the id column

Parameters

int $id

Return Value

ChildApi

in ApiQuery at line 64
ChildApi findOneByLabel( string $label)

Return the first ChildApi filtered by the label column

Parameters

string $label

Return Value

ChildApi

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery 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

in ApiQuery at line 64
array findById( int $id)

Return ChildApi objects filtered by the id column

Parameters

int $id

Return Value

array

in ApiQuery at line 64
array findByLabel( string $label)

Return ChildApi objects filtered by the label column

Parameters

string $label

Return Value

array

in ApiQuery at line 64
array findByApiKey( string $api_key)

Return ChildApi objects filtered by the api_key column

Parameters

string $api_key

Return Value

array

in ApiQuery at line 64
array findByProfileId( int $profile_id)

Return ChildApi objects filtered by the profile_id column

Parameters

int $profile_id

Return Value

array

in ApiQuery at line 64
array findByCreatedAt( string $created_at)

Return ChildApi objects filtered by the created_at column

Parameters

string $created_at

Return Value

array

in ApiQuery at line 64
array findByUpdatedAt( string $updated_at)

Return ChildApi objects filtered by the updated_at column

Parameters

string $updated_at

Return Value

array