Свойство | Тип | Описание | |
---|---|---|---|
$deSerializer | RESTfulAPI_DeSerializer | Current deSerializer instance | |
$requestedData | array | Stores the currently requested data |
Метод | Описание | |
---|---|---|
createModel ( string $model, SS_HTTPRequest $request ) : DataObject | Create object of class $model | |
deleteModel ( string $model, integer $id, SS_HTTPRequest $request ) : null | array | Delete object of Class $model and ID $id | |
findModel ( string $model, boolean | integr $id = false, array $queryParams, SS_HTTPRequest $request ) : DataObject | DataList | Finds 1 or more objects of class $model | |
getdeSerializer ( ) : RESTfulAPI_DeSerializer | Return current RESTfulAPI DeSerializer instance | |
handleQuery ( SS_HTTPRequest $request ) : DataObjec | DataList | All requests pass through here and are redirected depending on HTTP verb and params | |
parseQueryParameters ( array $params ) : array | Parse the query parameters to appropriate Column, Value, Search Filter Modifiers array( array( 'Column' => ColumnName, 'Value' => ColumnValue, 'Modifier' => ModifierType ) ) | |
updateModel ( String | DataObject $model, integer $id, $request ) : DataObject | Update databse record or $model |
public createModel ( string $model, SS_HTTPRequest $request ) : DataObject | ||
$model | string | |
$request | SS_HTTPRequest | |
Результат | DataObject |
public findModel ( string $model, boolean | integr $id = false, array $queryParams, SS_HTTPRequest $request ) : DataObject | DataList | ||
$model | string | Model(s) class to find |
$id | boolean | integr | The ID of the model to find or false |
$queryParams | array | Query parameters and modifiers |
$request | SS_HTTPRequest | The original HTTP request |
Результат | DataObject | DataList | Result of the search (note: DataList can be empty) |
public getdeSerializer ( ) : RESTfulAPI_DeSerializer | ||
Результат | RESTfulAPI_DeSerializer | DeSerializer instance |
public handleQuery ( SS_HTTPRequest $request ) : DataObjec | DataList | ||
$request | SS_HTTPRequest | HTTP request |
Результат | DataObjec | DataList | DataObject/DataList result or stdClass on error |
public parseQueryParameters ( array $params ) : array | ||
$params | array | raw GET vars array |
Результат | array | formatted query parameters |
public updateModel ( String | DataObject $model, integer $id, $request ) : DataObject | ||
$model | String | DataObject | the model or class to update |
$id | integer | The ID of the model to update |
Результат | DataObject | The updated model |
public RESTfulAPI_DeSerializer $deSerializer | ||
Результат | RESTfulAPI_DeSerializer |
public array $requestedData | ||
Результат | array |