locale(string $locale)
modifier. Example:forceLocaleFallback()
modifier:skip(int $skip)
and take(int $take)
. Example:NOTE: Not all methods are compatible with all functions. The SDK will throw anMBurgeInvalidRequestException
exception. Check our API references for more info.
NOTE: loading a lot of relations in one request can have a negative impact on performances.
include(array $include)
: generic method, you can pass an array of desired relations.includeBlocks()
: it will include blocks. Available only on getProject()
.includeSections()
: it will include sections. Available only on getBlocks()
and getBlock()
.includeElements()
: it will include elements. Available only on getSections()
and getSection()
.includeStructure()
: it will include block structure. Available only on getProject()
, getBlocks()
and getBlock()
.includeBeacons()
: it will include beacons. Available only on getProject()
, getSections()
and getSection()
.includeContracts()
: it will include blocks. Available only on getProject()
.sortBy(string $value, string $direction = 'asc')
. the first argument specify on which value do the sorting, and the second the direction. Example:NOTE: this method is only available on functions that returns a list of items.
NOTE: Not all methods are compatible with all functions. The SDK will throw anMBurgeInvalidRequestException
exception. Check our API references for more info.
NOTE: these methods are only available on functions that returns a list of items.
filterByIds(array $ids)
: it filters based an array on id with an exact match. Available only on getBlocks()
and getSections()
.filterByRelation(int $block_id, int $section_id)
: it filters based on related sections. Available only on getSections()
.filterByValue(array $values, string $element_name = null)
: it filters based on array of values. Specifying the second parameter element_name
the filtering in done only on elements the match the name. Available only on getSections()
.filterByTitle(string $title)
: it filters based on title. Available only on getBlocks()
.filterByGeofence(float $latNE, float $latSW, float $lngNE, float $lngSW)
: it filters based on geofence rectangle. Available only on getSections()
.istance(float $latitude, float $longitude)
by providing your coordinates. Example:NOTE: this method is only available on functionsgetSections()
.
forceSlug()
. Example:NOTE: this method is only available on functionsgetSection()
.
cache(int $cache_ttl = 0)
to automatically cache the response. The TTL is in seconds. Example:transformBlocks($blocks)
. Example: