wCMF
3.6
|
Public Member Functions | |
execute ($type, $queryString, $buildDepth, $orderby=null, &$pagingInfo, $attribs=null) | |
toString ($buildDepth=BUILDDEPTH_SINGLE, $attribs=null) | |
buildQuery ($buildDepth, $attribs=null) | |
mapToDatabase ($type, $valueName) | |
Public Attributes | |
$_typeNode = null | |
$_queryString = '' | |
$_query = '' | |
StringQuery executes queries from a string representation. Queries are constructed like WHERE clauses in sql, except that foreign key relations between the different types are not necessary. Attributes have to be defined with the appropriate type prepended, e.g. Author.name instead of name.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
The following example shows the usage:
Definition at line 44 of file class.StringQuery.php.
StringQuery::execute | ( | $type, | |
$queryString, | |||
$buildDepth, | |||
$orderby = null , |
|||
& | $pagingInfo, | ||
$attribs = null |
|||
) |
Execute the query
type | The type to search for. |
queryString | The query definition string |
buildDepth | One of the BUILDDEPTH constants or a number describing the number of generations to load (except BUILDDEPTH_REQUIRED) or false if only oids should be returned |
orderby | An array holding names of attributes to ORDER by (maybe null). [default: null] |
pagingInfo | A reference paging info instance (maybe null). [default: null] |
attribs | An array of attributes to load (null to load all, if buildDepth != false). [default: null] |
Definition at line 61 of file class.StringQuery.php.
References BUILDDEPTH_SINGLE, buildQuery(), ObjectQuery\executeString(), PersistenceFacade\getInstance(), ObjectQuery\getMapper(), PersistenceFacade\isKnownType(), and WCMFException\throwEx().
StringQuery::toString | ( | $buildDepth = BUILDDEPTH_SINGLE , |
|
$attribs = null |
|||
) |
Get the used query
buildDepth |
attribs | An array of attributes to load (null to load all, if buildDepth != false). [default: null] |
Definition at line 89 of file class.StringQuery.php.
References buildQuery(), Message\get(), and WCMFException\throwEx().
StringQuery::buildQuery | ( | $buildDepth, | |
$attribs = null |
|||
) |
Build the query
buildDepth |
attribs | An array of attributes to load (null to load all, if buildDepth != false). [default: null] |
Definition at line 102 of file class.StringQuery.php.
References $_queryString, NodeUtil\getConnectionToAncestor(), NodeUtil\getConnectionToDescendant(), ObjectQuery\getMapper(), ObjectQuery\getRelationCondition(), ObjectQuery\getTableName(), PersistenceFacade\isKnownType(), mapToDatabase(), StringUtil\splitQuoted(), and WCMFException\throwEx().
Referenced by execute(), and toString().
StringQuery::mapToDatabase | ( | $type, | |
$valueName | |||
) |
Map a application type and value name to the appropriate database names
type | The type to map |
valueName | The name of the value to map |
Definition at line 230 of file class.StringQuery.php.
References BUILDDEPTH_SINGLE, PersistenceFacade\getInstance(), and ObjectQuery\getMapper().
Referenced by buildQuery().
StringQuery::$_typeNode = null |
Definition at line 46 of file class.StringQuery.php.
StringQuery::$_queryString = '' |
Definition at line 47 of file class.StringQuery.php.
Referenced by buildQuery().
StringQuery::$_query = '' |
Definition at line 48 of file class.StringQuery.php.