Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Can add a fieldLocation, usable for search/sort on query builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephpy committed Feb 13, 2017
1 parent 8b59d5b commit 270648b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/Driver/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ public function orderBy($field, $order)
return $this;
}

/**
* @param string $field field
* @param string $location location
*/
public function addFieldLocation($field, $location)
{
self::$fieldLocation[$field] = $location;
}

/**
* @param string $field field
*
Expand All @@ -215,15 +224,7 @@ public static function getFieldLocation($field)
*/
public function getAvailableFields()
{
return array(
'context',
'verb',
'createdAt',
'type',
'text',
'model',
'identifier',
);
return array_keys(self::$fieldLocation);
}

/**
Expand Down

0 comments on commit 270648b

Please sign in to comment.