JsonAPI Formatter.
More...
|
| __construct ($baseRoute="") |
|
| cleanRestObject ($o, &$classname=null) |
| {Returns the array of attributes corresponding to an object $o.- Parameters
-
object | $o | |
string | $classname | |
- Returns
- array
}
|
|
| get ($objects, $pages=null) |
| {Returns a formated JSON response for an array of objects $objects.- Parameters
-
array | $objects | |
array | null | $pages | |
- Returns
- string
}
|
|
| getOne ($object) |
|
| getDatas ($objects, &$classname=null) |
| Returns an array of datas from an array of objects.
|
|
| getJSONDatas ($datas) |
|
| format ($arrayResponse) |
| Formats a response array.
|
|
| getModel ($controllerName) |
| Returns the model name corresponding to $controlleName.
|
|
| toJson ($data) |
| Formats an array of datas in JSON.
|
|
| formatException ($e) |
| Returns a JSON representation of the exception $e.
|
|
|
static | toXML ($data, &$xml_data) |
|
JsonAPI Formatter.
Ubiquity\controllers\rest\formatters$JsonApiResponseFormatter This class is part of Ubiquity
- Author
- jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
- Version
- 1.1.1
- Since
- Ubiquity 2.0.11
Definition at line 18 of file JsonApiResponseFormatter.php.
◆ __construct()
__construct |
( |
|
$baseRoute = "" | ) |
|
◆ addPageLinks()
addPageLinks |
( |
& |
$r, |
|
|
|
$classname, |
|
|
|
$pages |
|
) |
| |
|
protected |
◆ addRelationshipsLink()
addRelationshipsLink |
( |
& |
$r, |
|
|
|
$pk, |
|
|
|
$pkMember, |
|
|
|
$frontClassname, |
|
|
|
$rFrontClassname, |
|
|
|
$member |
|
) |
| |
|
protected |
◆ addSelfLink()
addSelfLink |
( |
& |
$r, |
|
|
|
$pk, |
|
|
|
$frontClassname |
|
) |
| |
|
protected |
◆ cleanRestObject()
cleanRestObject |
( |
|
$o, |
|
|
& |
$classname = null |
|
) |
| |
{Returns the array of attributes corresponding to an object $o.
- Parameters
-
object | $o | |
string | $classname | |
- Returns
- array
}
- See also
- \Ubiquity\controllers\rest\formatters\ResponseFormatter::cleanRestObject()
Reimplemented from ResponseFormatter.
Definition at line 34 of file JsonApiResponseFormatter.php.
◆ get()
get |
( |
|
$objects, |
|
|
|
$pages = null |
|
) |
| |
{Returns a formated JSON response for an array of objects $objects.
- Parameters
-
array | $objects | |
array | null | $pages | |
- Returns
- string
}
- See also
- \Ubiquity\controllers\rest\formatters\ResponseFormatter::get()
Reimplemented from ResponseFormatter.
Definition at line 117 of file JsonApiResponseFormatter.php.
◆ getFrontClassname()
getFrontClassname |
( |
|
$classname | ) |
|
|
private |
◆ getLink()
getLink |
( |
|
$pattern, |
|
|
|
$params = [ ] |
|
) |
| |
|
private |
◆ getOne()
◆ $_included
◆ $baseRoute
◆ $pageLink
$pageLink = "%baseRoute%/%classname%/?page[number]=%pageNumber%&page[size]=%pageSize%" |
|
private |
◆ $relationLink
$relationLink = "%baseRoute%/%classname%/%id%/%member%/" |
|
private |
◆ $selfLink
$selfLink = "%baseRoute%/%classname%/%id%/" |
|
private |
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity/src/Ubiquity/controllers/rest/formatters/JsonApiResponseFormatter.php