프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |