Universeorange.com/Docs/

R3m/framework Features Core class

The Core class has these methods.

Methods:

Binary

Core::binary();

binary() returns the named binary, useful in the cli.

Object

Core::object($input, $output, $type);

object can convert json to array or object or visa versa.
$input is a json String, an Array or an Object.
$output is one of these constants: Core::OBJECT_ARRAY, Core::OBJECT_JSON or Core::OBJECT_OBJECT.
$output can also be Core::OBJECT_JSON_DATA or Core::OBJECT_JSON_LINE.
$type is only used with $output Core::OBJECT_JSON and is default Core::OBJECT_TYPE_ROOT and can be Core::OBJECT_TYPE_CHILD (which removes {}).

Redirect

Core::redirect($url);

Redirects to the given $url.

Is_array_nested

Core::is_array_nested($array=[]);

Checks if the array is of type nested.

Array_object

Core::array_object($array=[]);

Converts an array to an object.

Object_merge

Core::object_merge(...$object);

Merge 2 or more objects together.

Object_is_empty

Core::object_is_empty($object);

Checks if the object has a property set.

Is_cli

Core::is_cli();

Checks if the App is in CLI mode or not.

Execute

Core::execute(String $command, Array &$output=[], String $type='');

Executes a cli command, type is Core::SHELL_NORMAL, Core::SHELL_DETACHED or Core::SHELL_PROCESS.

Uuid

Core::uuid();

Generates an uuid.

Ucfirst_sentence

Core::ucfirst_sentence(String $string='', String $delimiter='.');

Create capitalized sentences.

Other methods:

These methods are used in the Data class

Last modified: 2021-06-07

© 2021 universeorange.com