private matchAgent ( stdClass $agent, Jenssegers\Mongodb\Eloquent\Builder $builder, |
||
$agent | stdClass | Agent to be matched. |
$builder | Jenssegers\Mongodb\Eloquent\Builder | |
$opts | Index options. | |
Résultat | Jenssegers\Mongodb\Eloquent\Builder |
private function matchAgent(\stdClass $agent, Builder $builder, IndexOptions $opts)
{
$id_key = Helpers::getAgentIdentifier($agent);
if ($id_key === 'account') {
$builder = $this->matchAgentProp('account.homePage', $agent->account->homePage, $builder, $opts);
$builder = $this->matchAgentProp('account.name', $agent->account->name, $builder, $opts);
} else {
$builder = $this->matchAgentProp($id_key, $agent->{$id_key}, $builder, $opts);
}
return $builder;
}