tp TouchPointWP Utilities PersonQuery - TenthPres/TouchPoint-WP GitHub Wiki
tp\TouchPointWP\Utilities\PersonQuery
Wrap the UserQuery class such that the returned object is a Person instead of a User.
- Class name: PersonQuery
- Namespace: \tp\TouchPointWP\Utilities
- Parent class: WP_User_Query
Methods
__construct
mixed tp\TouchPointWP\Utilities\PersonQuery::__construct(array query, bool forceResultToPerson)
Queries WordPress Users as Person objects.
- Visibility: public
Arguments
- query array - Essentially the parameters passed to WP_User_Query
- forceResultToPerson bool - If true, the output from the query will always be a Person, rather than a User.
Returns
- mixed
get_results
\tp\TouchPointWP\Utilities\PersonArray|\tp\TouchPointWP\Person[] tp\TouchPointWP\Utilities\PersonQuery::get_results()
- Visibility: public
Returns
- \tp\TouchPointWP\Utilities\PersonArray|\tp\TouchPointWP\Person[] - Generally, a Person array. Individual elements may be TouchPointWP_Exception objects if the person could not be found.
get_first_result
?\tp\TouchPointWP\Person tp\TouchPointWP\Utilities\PersonQuery::get_first_result()
- Visibility: public
Returns
- ?\tp\TouchPointWP\Person -