atkSelector __construct(
atkNode
$node
)
|
|
Constructor.
Parameters:
|
atkNode |
$node: |
this selector's node |
API Tags:
Deprecated alias for atkSelector::getAllRows().
API Tags:
| See: | atkSelector::getAllRows |
| Deprecated: | |
| Access: | public |
Closes the current statement used for this selector.
Also clears the row and row count cache.
API Tags:
Returns the row count (used when calling count on an atkSelector object, don't use this if you want to efficiently retrieve the row count using a count() select statement, use rowCount instead!
API Tags:
| Return: | row count |
| Access: | public |
Implementation of:
- Countable::count
Distinct selection?
Parameters:
|
boolean |
$distinct: |
distinct selection? |
API Tags:
Exclude the following list of attributes.
Parameters:
|
array |
$excludes: |
list of excludes |
API Tags:
Deprecated alias for atkSelector::getFirstRow().
API Tags:
| See: | atkSelector::getFirstRow |
| Deprecated: | |
| Access: | public |
Return all rows.
API Tags:
| Return: | all rows |
| Access: | public |
Redefined in descendants as:
Returns the first found row.
API Tags:
| Return: | first row |
| Access: | public |
Returns the available indices for the index field based on the criteria.
API Tags:
| Return: | available indices |
| Access: | public |
Returns this selector's iterator.
NOTE: if you call this method multiple times, the same iterator will be returned, unless you have closed the selector first
API Tags:
Implementation of:
- IteratorAggregate::getIterator
Redefined in descendants as:
Return row count.
API Tags:
| Return: | row count |
| Access: | public |
Redefined in descendants as:
atkSelector ignoreDefaultFilters(
[boolean
$ignore = true]
)
|
|
Ignore default node filters.
Parameters:
|
boolean |
$ignore: |
ignore default node filters? |
API Tags:
atkSelector ignoreForceLoad(
[boolean
$ignore = true]
)
|
|
Ignore force load flags.
Parameters:
|
boolean |
$ignore: |
ignore force load flags |
API Tags:
Ignore criteria set in the postvars, like search criteria etc.
Parameters:
|
boolean |
$ignore: |
ignore postvars? |
API Tags:
atkSelector ignorePrimaryKey(
[boolean
$ignore = true]
)
|
|
Don't forcefully load the primary key. The result records also won't contain the special "atkprimkey" entry.
Parameters:
|
boolean |
$ignore: |
ignore primary key |
API Tags:
Include only the following list of attributes.
Parameters:
|
array |
$includes: |
list of includes |
API Tags:
Limit the results bij the given limit (and from the optional offset).
Parameters:
|
int |
$limit: |
limit |
|
int |
$offset: |
offset |
API Tags:
Set the select mode.
Parameters:
|
string |
$mode: |
select mode |
API Tags:
boolean offsetExists(
string|int
$key
)
|
|
Does the given offset exist?
Parameters:
API Tags:
| Return: | offset exists? |
| Access: | public |
Implementation of:
- ArrayAccess::offsetExists
mixed offsetGet(
string|int
$key
)
|
|
Returns the given offset.
Parameters:
API Tags:
Implementation of:
- ArrayAccess::offsetGet
void offsetSet(
string|int
$key, mixed
$value
)
|
|
Sets the value for the given offset.
Parameters:
|
string|int |
$key: |
|
|
mixed |
$value: |
|
API Tags:
Implementation of:
- ArrayAccess::offsetSet
void offsetUnset(
string|int
$key
)
|
|
Unset the given element.
Parameters:
API Tags:
Implementation of:
- ArrayAccess::offsetUnset
Order by the given order by string.
Parameters:
|
string |
$order: |
order by string |
API Tags:
Deprecated alias for atkSelector::getRowCount().
API Tags:
| See: | atkSelector::getRowCount |
| Deprecated: | |
| Access: | public |
array transformRow(
array
$row
)
|
|
Transform raw database row to node compatible row for the current iterator.
Parameters:
|
array |
$row: |
raw database row |
API Tags:
| Return: | node compatible row |
| Access: | public |
atkSelector where(
string
$condition, [array
$params = array()]
)
|
|
Adds a condition..
Parameters:
|
string |
$condition: |
where clause |
|
array |
$params: |
bind parameters |
API Tags:
void _applyAttributesToQuery(
atkQuery
$query,
$attrsByLoadType
)
|
|
Apply attributes to query, e.g. add columns etc.
Parameters:
|
atkQuery |
$query: |
query object |
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
void _applyConditionsToQuery(
atkQuery
$query
)
|
|
Apply set conditions to query.
Parameters:
API Tags:
void _applyFiltersToQuery(
atkQuery
$query
)
|
|
Apply node filters to query.
Parameters:
API Tags:
void _applyPostedFilterToQuery(
atkQuery
$query
)
|
|
Apply posted filter to query.
Parameters:
API Tags:
void _applyPostedIndexValueToQuery(
atkQuery
$query
)
|
|
Apply posted index value to query.
Parameters:
API Tags:
void _applyPostedSearchCriteriaToQuery(
atkQuery
$query,
$attrsByLoadType
)
|
|
Apply posted (normal) search criteria to query
Parameters:
|
atkQuery |
$query: |
query object |
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
void _applyPostedSearchMethodToQuery(
atkQuery
$query
)
|
|
Set search method for query.
Parameters:
API Tags:
void _applyPostedSmartSearchCriteriaToQuery(
atkQuery
$query
)
|
|
Apply posted smart search criteria to query.
Parameters:
API Tags:
void _applyPostvarsToQuery(
atkQuery
$query,
$attrsByLoadType
)
|
|
Apply criteria that are part of the postvars (e.g. filter, index, search criteria)
Parameters:
|
atkQuery |
$query: |
query |
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
atkQuery _buildCountQuery(
$attrsByLoadType
)
|
|
Build count query object.
Parameters:
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
| Return: | query object |
| Access: | protected |
atkQuery _buildQuery(
$attrsByLoadType
)
|
|
Build base query object.
Parameters:
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
| Return: | query object |
| Access: | protected |
Redefined in descendants as:
atkQuery _buildSelectQuery(
$attrsByLoadType
)
|
|
Build select query object.
Parameters:
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
| Return: | query object |
| Access: | protected |
array _getAttributesByLoadType(
)
|
|
Returns the attributes for each load type (PRELOAD, ADDTOQUERY, POSTLOAD)
API Tags:
| Return: | attributes by load type |
| Access: | protected |
array _getBindParameters(
)
|
|
Returns all bind parameters for all conditions.
API Tags:
| Return: | bind parameters |
| Access: | protected |
Returns the node's database.
API Tags:
Returns the node for this selector.
API Tags:
Is attribute load required?
Parameters:
API Tags:
| Return: | load required? |
| Access: | protected |
Are we searching?
API Tags:
array _transformRow(
array
$row, atkQuery
$query,
$attrsByLoadType
)
|
|
Transform raw database row to node compatible row.
Parameters:
|
array |
$row: |
raw database row |
|
atkQuery |
$query: |
query object |
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
| Return: | node compatible row |
| Access: | protected |
array _transformRows(
array
$rows, atkQuery
$query,
$attrsByLoadType
)
|
|
Transform raw database rows to node compatible rows.
Parameters:
|
array |
$rows: |
raw database rows |
|
atkQuery |
$query: |
query object |
|
array |
$attrsByLoadType: |
attributes by load type |
API Tags:
| Return: | node compatible rows |
| Access: | protected |
Redefined in descendants as: