helpers.php
Table of Contents
Functions
- hyde() : HydeKernel
- Get the available HydeKernel instance.
- unslash() : string
- Remove trailing slashes from the start and end of a string.
- asset() : string
- Get a relative link or URL to an asset in the media directory.
- route() : Route|null
- Get a page route instance by its key. Casting it to a string will return a relative link to the page.
- url() : string
- Get a qualified URL to the supplied path if a base URL is set.
- hyde() : HydeKernel
- Get the available HydeKernel instance.
- unslash() : string
- Remove trailing slashes from the start and end of a string.
- unixsum() : string
- A EOL agnostic wrapper for calculating MD5 checksums.
- unixsum_file() : string
- Shorthand for {@see unixsum()} but loads a file.
- make_title() : string
- normalize_newlines() : string
- strip_newlines() : string
- trim_slashes() : string
- evaluate_arrayable() : array<string|int, mixed>
- yaml_encode() : string
- yaml_decode() : mixed
- path_join() : string
- normalize_slashes() : string
Functions
hyde()
Get the available HydeKernel instance.
hyde() : HydeKernel
Return values
HydeKernelunslash()
Remove trailing slashes from the start and end of a string.
This function will be replaced by unslash() in v2.0
unslash(string $string) : string
Parameters
- $string : string
Tags
Return values
stringasset()
Get a relative link or URL to an asset in the media directory.
asset(string $name[, bool $preferQualifiedUrl = false ]) : string
Parameters
- $name : string
- $preferQualifiedUrl : bool = false
Return values
stringroute()
Get a page route instance by its key. Casting it to a string will return a relative link to the page.
route(string $key) : Route|null
Parameters
- $key : string
Return values
Route|nullurl()
Get a qualified URL to the supplied path if a base URL is set.
url([string $path = '' ]) : string
Parameters
- $path : string = ''
Return values
stringhyde()
Get the available HydeKernel instance.
hyde() : HydeKernel
Return values
HydeKernelunslash()
Remove trailing slashes from the start and end of a string.
unslash(string $string) : string
Parameters
- $string : string
Return values
stringunixsum()
A EOL agnostic wrapper for calculating MD5 checksums.
unixsum(string $string) : string
This function is not cryptographically secure.
Parameters
- $string : string
Return values
stringunixsum_file()
Shorthand for {@see unixsum()} but loads a file.
unixsum_file(string $file) : string
Parameters
- $file : string
Return values
stringmake_title()
make_title(string $value) : string
Parameters
- $value : string
Return values
stringnormalize_newlines()
normalize_newlines(string $string) : string
Parameters
- $string : string
Return values
stringstrip_newlines()
strip_newlines(string $string) : string
Parameters
- $string : string
Return values
stringtrim_slashes()
trim_slashes(string $string) : string
Parameters
- $string : string
Return values
stringevaluate_arrayable()
evaluate_arrayable(array<string|int, mixed>|Arrayable $array) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>|Arrayable
Return values
array<string|int, mixed>yaml_encode()
yaml_encode(mixed $input[, int $inline = 2 ][, int $indent = 4 ][, int $flags = 0 ]) : string
Parameters
- $input : mixed
- $inline : int = 2
- $indent : int = 4
- $flags : int = 0
Return values
stringyaml_decode()
yaml_decode(string $input[, int $flags = 0 ]) : mixed
Parameters
- $input : string
- $flags : int = 0
path_join()
path_join(string $directory, string ...$paths) : string
Parameters
- $directory : string
- $paths : string
Return values
stringnormalize_slashes()
normalize_slashes(string $string) : string
Parameters
- $string : string