Recipe functions: server and client — part 2
Generated from brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be — do not edit by hand.
frontend
Section titled “frontend”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
frontend | yes | no | Server: frontend() | Reads the X-Brezel-Frontend request header. |
getOrigin
Section titled “getOrigin”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
getOrigin | no | yes | Client: getOrigin() | Returns the browser origin. |
getState
Section titled “getState”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
getState | no | yes | Client: getState(key: string) | Reads temporary client state. |
hasRole
Section titled “hasRole”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
hasRole | yes | yes | Server: hasRole(slug); Client: hasRole(slug: string) | Checks whether the current user has a role. |
hash.check
Section titled “hash.check”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
hash.check | yes | no | Server: hash.check(value, string hash) | Checks a value against a password hash. |
hash.make
Section titled “hash.make”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
hash.make | yes | no | Server: hash.make(value) | Hashes a value. |
imagecreatefromstring
Section titled “imagecreatefromstring”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
imagecreatefromstring | yes | no | Server: imagecreatefromstring(...args) | Creates a GD image from binary image data. |
imagepng
Section titled “imagepng”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
imagepng | yes | no | Server: imagepng(...args) | Calls imagejpeg in this API revision despite its name. |
imagerotate
Section titled “imagerotate”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
imagerotate | yes | no | Server: imagerotate(...args) | Rotates a GD image. |
in_array
Section titled “in_array”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
in_array | yes | no | Server: in_array(mixed needle, array haystack, bool strict = false) | Checks array membership. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
int | yes | no | Server: int(value) | Converts to an integer. |
intval
Section titled “intval”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
intval | yes | no | Server: intval(...args) | Converts to an integer using PHP intval. |
invalid
Section titled “invalid”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
invalid | yes | no | Server: invalid(string message) | Creates a validation message. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
ip | yes | no | Server: ip() | Returns the request IP address. |
ireplace
Section titled “ireplace”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
ireplace | yes | no | Server: ireplace(array|string search, array|string replace, array|string subject, count = null) | Case-insensitive string replacement. |
isRoot
Section titled “isRoot”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
isRoot | yes | yes | Server: isRoot(); Client: isRoot() | Checks whether the current user is root. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
join | yes | yes | Server: join(string glue, pieces); Client: join(glue, list) | Joins values with a separator. |
json.decode
Section titled “json.decode”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
json.decode | yes | yes | Server: json.decode(string json, assoc = false); Client: json.decode(string) | Decodes a JSON string. |
json.encode
Section titled “json.encode”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
json.encode | yes | yes | Server: json.encode(value, bool pretty = false); Client: json.encode(json) | Encodes a value as JSON. |
json_resource
Section titled “json_resource”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
json_resource | yes | no | Server: json_resource(entities, user = null, withModule = false) | Serializes entities as API resources. |
language
Section titled “language”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
language | yes | no | Server: language(...input) | Wraps a language code. |
languages
Section titled “languages”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
languages | yes | no | Server: languages(bool hydrate = false) | Lists languages. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
len | yes | yes | Server: len(x); Client: len(countable) | Returns string length or collection size. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
list | yes | no | Server: list(list) | Wraps a list for recipe operations. |
localStorage
Section titled “localStorage”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
localStorage | no | yes | Client: localStorage(x: string) | Reads a custom client value or browser local storage. |
locale
Section titled “locale”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
locale | yes | no | Server: locale() | Returns the application locale. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
max | yes | yes | Server: max(...x); Client: max(x) | Maximum value; client accepts a list. |
mb_len
Section titled “mb_len”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
mb_len | yes | no | Server: mb_len(x) | Multibyte string length. |
mb_strimwidth
Section titled “mb_strimwidth”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
mb_strimwidth | yes | no | Server: mb_strimwidth(...args) | Trims a string to a display width. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
min | yes | yes | Server: min(mixed value, mixed ...values); Client: min(x) | Minimum value; client accepts a list. |
module
Section titled “module”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
module | yes | no | Server: module(string identifier) | Finds a module by identifier. |
moduleIdentifier
Section titled “moduleIdentifier”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
moduleIdentifier | yes | no | Server: moduleIdentifier(arg) | Obtains a module identifier. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
now | yes | no | Server: now() | Current server timestamp as a string. |
period
Section titled “period”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
period | yes | no | Server: period(...input) | Creates a date period wrapper. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
pow | yes | yes | Server: pow(mixed num, mixed exponent); Client: pow(x, y) | Raises a number to a power. |