APP
public
mixed
APP
= \TEST_APP . 'TestApp' . \DS
public
mixed
APP
= \TEST_APP . 'TestApp' . \DS
public
mixed
APP_DIR
= 'TestApp'
public
mixed
CACHE
= \TMP . 'cache' . \DS
public
mixed
CAKE
= \CORE_PATH . 'src' . \DS
public
mixed
CAKE_CORE_INCLUDE_PATH
= \ROOT
public
mixed
CONFIG
= \TEST_APP . 'config' . \DS
public
mixed
CORE_PATH
= \CAKE_CORE_INCLUDE_PATH . \DS
public
mixed
CORE_TEST_CASES
= \CORE_TESTS . 'TestCase'
public
mixed
CORE_TESTS
= \CORE_PATH . 'tests' . \DS
public
mixed
DAY
= 86400
Defines DS as short form of DIRECTORY_SEPARATOR.
public
mixed
DS
= \DIRECTORY_SEPARATOR
public
mixed
DS
= \DIRECTORY_SEPARATOR
public
mixed
E_RECOVERABLE_ERROR
= 4096
public
mixed
HOUR
= 3600
public
mixed
LOGS
= \TMP . 'logs' . \DS
public
mixed
MINUTE
= 60
public
mixed
MONTH
= 2592000
public
mixed
ROOT
= \dirname(__DIR__)
public
mixed
SECOND
= 1
public
mixed
SESSIONS
= \TMP . 'sessions' . \DS
public
mixed
TEST_APP
= \CORE_TESTS . 'test_app' . \DS
public
mixed
TESTS
= __DIR__ . \DS
public
float
TIME_START
= \microtime(\true)
public
mixed
TMP
= \sys_get_temp_dir() . \DS
public
mixed
WEEK
= 604800
public
mixed
WWW_ROOT
= \TEST_APP . 'webroot' . \DS
public
mixed
YEAR
= 31536000
Prints out debug information about given variable and returns the variable that was passed.
debug(mixed $var[, bool|null $showHtml = null ][, bool $showFrom = true ]) : mixed
Only runs if debug mode is enabled.
Variable to show debug information for.
If set to true, the method prints the debug data in a browser-friendly way.
If set to true, the method prints from where the function was called.
The same $var that was passed
Outputs a stack trace based on the supplied options.
stackTrace([array<string, mixed> $options = [] ]) : void
depth
- The number of stack frames to return. Defaults to 999args
- Should arguments for functions be shown? If true, the arguments for each method call
will be displayed.start
- The stack frame to start generating a trace from. Defaults to 1Format for outputting stack trace
Command to return the eval-able code to startup PsySH in interactive debugger Works the same way as eval(\Psy\sh()); psy/psysh must be loaded in your project
breakpoint() : string|null
eval(breakpoint());
Prints out debug information about given variable and dies.
dd(mixed $var[, bool|null $showHtml = null ]) : void
Only runs if debug mode is enabled. It will otherwise just continue code execution and ignore this function.
Variable to show debug information for.
If set to true, the method prints the debug data in a browser-friendly way.
Returns a new {@link \Cake\Collection\Collection} object wrapping the passed argument.
collection(iterable<string|int, mixed> $items) : Collection
The items from which the collection will be built.
Convenience method for htmlspecialchars.
h(mixed $text[, bool $double = true ][, string|null $charset = null ]) : mixed
Text to wrap through htmlspecialchars. Also works with arrays, and objects.
Arrays will be mapped and have all their elements escaped. Objects will be string cast if they
implement a __toString
method. Otherwise, the class name will be used.
Other scalar types will be returned unchanged.
Encode existing html entities.
Character set to use when escaping.
Defaults to config value in mb_internal_encoding()
or 'UTF-8'.
Wrapped text.
Splits a dot syntax plugin name into its plugin and class name.
pluginSplit(string $name[, bool $dotAppend = false ][, string|null $plugin = null ]) : array<string|int, mixed>
If $name does not have a dot, then index 0 will be null.
Commonly used like
list($plugin, $name) = pluginSplit($name);
The name you want to plugin split.
Set to true if you want the plugin to have a '.' appended to it.
Optional default plugin to use if no plugin is found. Defaults to null.
Array with 2 indexes. 0 => plugin name, 1 => class name.
Split the namespace from the classname.
namespaceSplit(string $class) : array<string|int, string>
Commonly used like list($namespace, $className) = namespaceSplit($class);
.
The full class name, ie Cake\Core\App
.
Array with 2 indexes. 0 => namespace, 1 => classname.
print_r() convenience function.
pr(mixed $var) : mixed
In terminals this will act similar to using print_r() directly, when not run on CLI
print_r() will also wrap <pre>
tags around the output of given variable. Similar to debug().
This function returns the same variable that was passed.
Variable to print out.
the same $var that was passed to this function
JSON pretty print convenience function.
pj(mixed $var) : mixed
In terminals this will act similar to using json_encode() with JSON_PRETTY_PRINT directly, when not run on CLI
will also wrap <pre>
tags around the output of given variable. Similar to pr().
This function returns the same variable that was passed.
Variable to print out.
the same $var that was passed to this function
Gets an environment variable from available sources, and provides emulation for unsupported or inconsistent environment variables (i.e. DOCUMENT_ROOT on IIS, or SCRIPT_NAME in CGI mode). Also exposes some additional custom environment information.
env(string $key[, string|bool|null $default = null ]) : string|bool|null
Environment variable name.
Specify a default value in case the environment variable is not defined.
Environment variable setting.
Triggers an E_USER_WARNING.
triggerWarning(string $message) : void
The warning message.
Helper method for outputting deprecation warnings
deprecationWarning(string $message[, int $stackFrame = 1 ]) : void
The message to output as a deprecation warning.
The stack frame to include in the error. Defaults to 1 as that should point to application/plugin code.
Returns the objects class or var type of it's not an object
getTypeName(mixed $var) : string
Variable to check
Returns the class name or variable type
Returns a translated string if one is found; Otherwise, the submitted message.
__(string $singular, mixed ...$args) : string
Text to translate.
Array with arguments or multiple arguments in function.
The translated text.
Returns correct plural form of message identified by $singular and $plural for count $count.
__n(string $singular, string $plural, int $count, mixed ...$args) : string
Some languages have more than one form for plural messages dependent on the count.
Singular text to translate.
Plural text.
Count.
Array with arguments or multiple arguments in function.
Plural form of translated string.
Allows you to override the current domain for a single message lookup.
__d(string $domain, string $msg, mixed ...$args) : string
Domain.
String to translate.
Array with arguments or multiple arguments in function.
Translated string.
Allows you to override the current domain for a single plural message lookup.
__dn(string $domain, string $singular, string $plural, int $count, mixed ...$args) : string
Returns correct plural form of message identified by $singular and $plural for count $count from domain $domain.
Domain.
Singular string to translate.
Plural.
Count.
Array with arguments or multiple arguments in function.
Plural form of translated string.
Returns a translated string if one is found; Otherwise, the submitted message.
__x(string $context, string $singular, mixed ...$args) : string
The context is a unique identifier for the translations string that makes it unique within the same domain.
Context of the text.
Text to translate.
Array with arguments or multiple arguments in function.
Translated string.
Returns correct plural form of message identified by $singular and $plural for count $count.
__xn(string $context, string $singular, string $plural, int $count, mixed ...$args) : string
Some languages have more than one form for plural messages dependent on the count. The context is a unique identifier for the translations string that makes it unique within the same domain.
Context of the text.
Singular text to translate.
Plural text.
Count.
Array with arguments or multiple arguments in function.
Plural form of translated string.
Allows you to override the current domain for a single message lookup.
__dx(string $domain, string $context, string $msg, mixed ...$args) : string
The context is a unique identifier for the translations string that makes it unique within the same domain.
Domain.
Context of the text.
String to translate.
Array with arguments or multiple arguments in function.
Translated string.
Returns correct plural form of message identified by $singular and $plural for count $count.
__dxn(string $domain, string $context, string $singular, string $plural, int $count, mixed ...$args) : string
Allows you to override the current domain for a single message lookup. The context is a unique identifier for the translations string that makes it unique within the same domain.
Domain.
Context of the text.
Singular text to translate.
Plural text.
Count.
Array with arguments or multiple arguments in function.
Plural form of translated string.
Returns an array URL from a route path string.
urlArray(string $path[, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Route path.
An array specifying any additional parameters.
Can be also any special parameters supported by Router::url()
.
URL