On this page
Repository
class Repository implements ArrayAccess, Repository (View source)
Traits
Properties
static protected array | $macros | The registered string macros. |
from Macroable |
protected array | $items | All of the configuration items. |
Methods
static void | macro(string $name, object|callable $macro) Register a custom macro. |
from Macroable |
static void | mixin(object $mixin, bool $replace = true) Mix another object into the class. |
from Macroable |
static bool | hasMacro(string $name) Checks if macro is registered. |
from Macroable |
static void | flushMacros() Flush the existing macros. |
from Macroable |
static mixed | __callStatic(string $method, array $parameters) Dynamically handle calls to the class. |
from Macroable |
mixed | __call(string $method, array $parameters) Dynamically handle calls to the class. |
from Macroable |
void | __construct(array $items = []) Create a new configuration repository. |
|
bool | has(string $key) Determine if the given configuration value exists. |
|
mixed | get(array|string $key, mixed $default = null) Get the specified configuration value. |
|
array | getMany(array $keys) Get many configuration values. |
|
void | set(array|string $key, mixed $value = null) Set a given configuration value. |
|
void | prepend(string $key, mixed $value) Prepend a value onto an array configuration value. |
|
void | push(string $key, mixed $value) Push a value onto an array configuration value. |
|
array | all() Get all of the configuration items for the application. |
|
bool | offsetExists(string $key) Determine if the given configuration option exists. |
|
mixed | offsetGet(string $key) Get a configuration option. |
|
void | offsetSet(string $key, mixed $value) Set a configuration option. |
|
void | offsetUnset(string $key) Unset a configuration option. |
Details
static void macro(string $name, object|callable $macro)
Register a custom macro.
static void mixin(object $mixin, bool $replace = true)
Mix another object into the class.
static bool hasMacro(string $name)
Checks if macro is registered.
static void flushMacros()
Flush the existing macros.
static mixed __callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
mixed __call(string $method, array $parameters)
Dynamically handle calls to the class.
void __construct(array $items = [])
Create a new configuration repository.
bool has(string $key)
Determine if the given configuration value exists.
mixed get(array|string $key, mixed $default = null)
Get the specified configuration value.
array getMany(array $keys)
Get many configuration values.
void set(array|string $key, mixed $value = null)
Set a given configuration value.
void prepend(string $key, mixed $value)
Prepend a value onto an array configuration value.
void push(string $key, mixed $value)
Push a value onto an array configuration value.
array all()
Get all of the configuration items for the application.
bool offsetExists(string $key)
Determine if the given configuration option exists.
mixed offsetGet(string $key)
Get a configuration option.
void offsetSet(string $key, mixed $value)
Set a configuration option.
void offsetUnset(string $key)
Unset a configuration option.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Config/Repository.html