Property | Type | Description | |
---|---|---|---|
$registered_expose_classes | array | Temporary used during processExposeDepth to prevent you traversing up and down bi-directional relations | |
$route | The matched route | ||
$route_expose | array | The route expose array - If explicitly set it overrides any default config settings |
Method | Description | |
---|---|---|
configureExposeDepth ( Drest\EntityManagerRegistry $emr, integer $exposureDepth, integer $exposureRelationsFetchType = null ) : |
Set the default exposure fields using the configured exposure depth | |
configurePullRequest ( array $requestOptions, DrestCommon\Request\Request $request ) : |
Configure the expose object to filter out fields that have been explicitly requested by the client. | |
configurePushRequest ( array $pushed ) : DrestCommon\ResultSet | Configure the expose object to filter out fields that are not allowed to be use by the client. | |
create ( |
Create an instance of ExposeFields | |
current ( ) | ||
key ( ) | ||
next ( ) | ||
rewind ( ) | ||
toArray ( ) : array | Get the expose fields | |
valid ( ) |
Method | Description | |
---|---|---|
filterPushExpose ( array $requested, array $actual ) : array | Filter out requested expose fields against what's allowed | |
filterRequestedExpose ( array &$requested, array &$actual ) | Filter out requested expose fields against what's allowed | |
parseExposeString ( string $string ) : array | An awesome solution was posted on (link below) to parse these using a regex http://stackoverflow.com/questions/16415558/regex-top-level-contents-from-a-string | |
processExposeDepth ( array &$fields, string $class, Drest\EntityManagerRegistry $emr, integer $depth, integer $fetchType = null ) | Recursive function to generate default expose columns | |
recurseExposeString ( string $string, array &$results ) | Recursively process the passed expose string |
Method | Description | |
---|---|---|
__construct ( |
Create an instance of ExposeFields - use create() method | |
parseStringParts ( string $string ) : stdClass | Get information on parsed (top-level) brackets |
public configureExposeDepth ( Drest\EntityManagerRegistry $emr, integer $exposureDepth, integer $exposureRelationsFetchType = null ) : |
||
$emr | Drest\EntityManagerRegistry | |
$exposureDepth | integer | |
$exposureRelationsFetchType | integer | |
return | $this object instance |
public configurePullRequest ( array $requestOptions, DrestCommon\Request\Request $request ) : |
||
$requestOptions | array | |
$request | DrestCommon\Request\Request | |
return | $this object instance |
public configurePushRequest ( array $pushed ) : DrestCommon\ResultSet | ||
$pushed | array | - the data push on the request |
return | DrestCommon\ResultSet |
public static create ( |
||
$route | - requires a matched route | |
return |
protected filterRequestedExpose ( array &$requested, array &$actual ) | ||
$requested | array | - The requested expose definition - invalid / not allowed data is stripped off |
$actual | array | - current allowed expose definition |
protected parseExposeString ( string $string ) : array | ||
$string | string | |
return | array | $result |
protected processExposeDepth ( array &$fields, string $class, Drest\EntityManagerRegistry $emr, integer $depth, integer $fetchType = null ) | ||
$fields | array | - array to be populated recursively (referenced) |
$class | string | - name of the class to process |
$emr | Drest\EntityManagerRegistry | - entity manager registry used to fetch class information |
$depth | integer | - maximum depth you want to travel through the relations |
$fetchType | integer | - The fetch type to be used |
protected recurseExposeString ( string $string, array &$results ) | ||
$string | string | - the string to be processed |
$results | array | - passed by reference |
protected array $registered_expose_classes | ||
return | array |
protected RouteMetaData,Drest\Mapping $route | ||
return |
protected array $route_expose | ||
return | array |