Menu

## Arrayable
in package
Uses Microable

Arrayable.php : 5

### Table of Contents

#### Properties

$macros : array<string|int, mixed>
$array : array<string|int, mixed>

#### Methods

__call() : mixed
  Dynamically handle calls to the class.
__callStatic() : mixed
  Dynamically handle calls to the class.
__construct() : mixed
__get() : mixed
__isset() : mixed
__set() : mixed
__toString() : string
__unset() : mixed
add() : Arrayable
  Add a key value pair to the array If only the key is provided, the key will be the value
addAfter() : static
addBefore() : static
all() : array<string|int, mixed>
arrayType() : string
  Get the type of the array
at() : mixed
chunk() : static
each() : static
filter() : Arrayable
  Filter the array
first() : mixed
flush() : static
flushMacros() : void
  Remove all the macros we had registered
get() : mixed
  Get an item from the array
has() : bool
  Check if the array has a key
hasMacro() : bool
  Check if we have a method in the balonables
isAssoc() : bool
  Checks if an array is associative
isEmpty() : bool
  Checks if the array is empty
isFilled() : bool
isMixed() : bool
  Checks if an array has both numeric and string keys
keys() : array<string|int, mixed>
  Get the keys of the array
keysToLowerCase() : static
keysToUpperCase() : static
last() : mixed
macro() : void
  Add a new mixable to the macros
map() : Arrayable
  Map through the array
merge() : Arrayable
  Merge a whole into the current array
mixin() : void
  Mix another object into the class.
pop() : mixed
reduce() : Arrayable
  Reduce the array
remove() : Arrayable
  Remove an item from the array
replace() : static
reverse() : static
shift() : mixed
size() : int
  Get the size of the array
slice() : static
sort() : static
sortKeys() : static
sortValues() : static
toArray() : array<string|int, mixed>
  Convert the arrayable to an array
toArrayable() : Arrayable
toJson() : string
  Convert the arrayable to json
unshift() : static
values() : array<string|int, mixed>
  Get the values of the array
valuesToLowerCase() : static

### Properties

#### $macros

Microable.php : 14
`protected static array<string|int, mixed> $macros = []`

#### $array

Arrayable.php : 9
`private array<string|int, mixed> $array = []`

### Methods

#### __call()

Microable.php : 101

Dynamically handle calls to the class.

`public __call(string $method, array<string|int, mixed> $parameters) : mixed`

##### Parameters

$method : string
$parameters : array<string|int, mixed>

##### Tags

throws
  BadMethodCallException

#### __callStatic()

Microable.php : 75

Dynamically handle calls to the class.

`public static __callStatic(string $method, array<string|int, mixed> $parameters) : mixed`

##### Parameters

$method : string
$parameters : array<string|int, mixed>

##### Tags

throws
  BadMethodCallException

#### __construct()

Arrayable.php : 11
`public __construct([array<string|int, mixed> $array = [] ]) : mixed`

##### Parameters

$array : array<string|int, mixed> = []

#### __get()

Arrayable.php : 321
`public __get(mixed $name) : mixed`

##### Parameters

$name : mixed

#### __isset()

Arrayable.php : 331
`public __isset(mixed $name) : mixed`

##### Parameters

$name : mixed

#### __set()

Arrayable.php : 326
`public __set(mixed $name, mixed $value) : mixed`

##### Parameters

$name : mixed
$value : mixed

#### __toString()

Arrayable.php : 219
`public __toString() : string`

##### Return values

string

#### __unset()

Arrayable.php : 336
`public __unset(mixed $name) : mixed`

##### Parameters

$name : mixed

#### add()

Arrayable.php : 285

Add a key value pair to the array If only the key is provided, the key will be the value

`public add(string $key[, mixed|null $value = null ]) : Arrayable`

##### Parameters

$key : string
$value : mixed|null = null

##### Return values

Arrayable

#### addAfter()

Arrayable.php : 357
`public addAfter(mixed $positionKey, mixed $key[, mixed $value = null ]) : static`

##### Parameters

$positionKey : mixed
$key : mixed
$value : mixed = null

##### Return values

static

#### addBefore()

Arrayable.php : 370
`public addBefore(string $positionKey, string $key[, mixed $value = null ]) : static`

##### Parameters

$positionKey : string
$key : string
$value : mixed = null

##### Return values

static

#### all()

Arrayable.php : 413
`public all() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### arrayType()

Arrayable.php : 64

Get the type of the array

`public arrayType([array<string|int, mixed>|null $arr = null ]) : string`

##### Parameters

$arr : array<string|int, mixed>|null = null

##### Return values

string

#### at()

Arrayable.php : 424
`public at(int $index) : mixed`

##### Parameters

$index : int

#### chunk()

Arrayable.php : 165
`public chunk(int $size[, bool $preserve_keys = false ]) : static`

##### Parameters

$size : int
$preserve_keys : bool = false

##### Return values

static

#### each()

Arrayable.php : 127
`public each(callable $callback) : static`

##### Parameters

$callback : callable

##### Return values

static

#### filter()

Arrayable.php : 109

Filter the array

`public filter(callable $callback) : Arrayable`

##### Parameters

$callback : callable

##### Return values

Arrayable

#### first()

Arrayable.php : 199
`public first() : mixed`

#### flush()

Arrayable.php : 418
`public flush() : static`

##### Return values

static

#### flushMacros()

Microable.php : 61

Remove all the macros we had registered

`public static flushMacros() : void`

#### get()

Arrayable.php : 232

Get an item from the array

`public get(string|null $name[, bool|null $checkUpperAndLower = true ]) : mixed`

If checkUpperAndLower is set to true, the method will check for uppercase and lowercase cases

##### Parameters

$name : string|null
$checkUpperAndLower : bool|null = true

#### has()

Arrayable.php : 311

Check if the array has a key

`public has(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool

#### hasMacro()

Microable.php : 53

Check if we have a method in the balonables

`public static hasMacro(string $name) : bool`

##### Parameters

$name : string

##### Return values

bool

#### isAssoc()

Arrayable.php : 27

Checks if an array is associative

`public isAssoc([array<string|int, mixed>|null $arr = null ]) : bool`

##### Parameters

$arr : array<string|int, mixed>|null = null

##### Return values

bool

#### isEmpty()

Arrayable.php : 268

Checks if the array is empty

`public isEmpty() : bool`

##### Return values

bool

#### isFilled()

Arrayable.php : 273
`public isFilled() : bool`

##### Return values

bool

#### isMixed()

Arrayable.php : 38

Checks if an array has both numeric and string keys

`public isMixed([array<string|int, mixed>|null $arr = null ]) : bool`

##### Parameters

$arr : array<string|int, mixed>|null = null

##### Return values

bool

#### keys()

Arrayable.php : 79

Get the keys of the array

`public keys() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### keysToLowerCase()

Arrayable.php : 171
`public keysToLowerCase() : static`

##### Return values

static

#### keysToUpperCase()

Arrayable.php : 177
`public keysToUpperCase() : static`

##### Return values

static

#### last()

Arrayable.php : 205
`public last() : mixed`

#### macro()

Microable.php : 22

Add a new mixable to the macros

`public static macro(string $key, $value) : void`

##### Parameters

$key : string
$value :

#### map()

Arrayable.php : 98

Map through the array

`public map(callable $callback) : Arrayable`

##### Parameters

$callback : callable

##### Return values

Arrayable

#### merge()

Arrayable.php : 346

Merge a whole into the current array

`public merge(array<string|int, mixed> $array) : Arrayable`

##### Parameters

$array : array<string|int, mixed>

##### Return values

Arrayable

#### mixin()

Microable.php : 35

Mix another object into the class.

`public static mixin(object $mixin[, bool $replace = true ]) : void`

##### Parameters

$mixin : object
$replace : bool = true

##### Tags

throws
  ReflectionException

#### pop()

Arrayable.php : 394
`public pop() : mixed`

#### reduce()

Arrayable.php : 121

Reduce the array

`public reduce(callable $callback[, null $initial = null ]) : Arrayable`

##### Parameters

$callback : callable
$initial : null = null

##### Return values

Arrayable

#### remove()

Arrayable.php : 300

Remove an item from the array

`public remove(string $key) : Arrayable`

##### Parameters

$key : string

##### Return values

Arrayable

#### replace()

Arrayable.php : 383
`public replace(string $key[, mixed $value = null ]) : static`

##### Parameters

$key : string
$value : mixed = null

##### Return values

static

#### reverse()

Arrayable.php : 153
`public reverse() : static`

##### Return values

static

#### shift()

Arrayable.php : 389
`public shift() : mixed`

#### size()

Arrayable.php : 259

Get the size of the array

`public size() : int`

##### Return values

int

#### slice()

Arrayable.php : 159
`public slice(int $offset[, int $length = null ][, mixed $preserve_keys = false ]) : static`

##### Parameters

$offset : int
$length : int = null
$preserve_keys : mixed = false

##### Return values

static

#### sort()

Arrayable.php : 135
`public sort(callable $callback) : static`

##### Parameters

$callback : callable

##### Return values

static

#### sortKeys()

Arrayable.php : 141
`public sortKeys(callable $callback) : static`

##### Parameters

$callback : callable

##### Return values

static

#### sortValues()

Arrayable.php : 147
`public sortValues(callable $callback) : static`

##### Parameters

$callback : callable

##### Return values

static

#### toArray()

Arrayable.php : 194

Convert the arrayable to an array

`public toArray() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### toArrayable()

Arrayable.php : 352
`public static toArrayable(array<string|int, mixed> $array) : Arrayable`

##### Parameters

$array : array<string|int, mixed>

##### Return values

Arrayable

#### toJson()

Arrayable.php : 214

Convert the arrayable to json

`public toJson() : string`

##### Return values

string

#### unshift()

Arrayable.php : 399
`public unshift(array<string|int, mixed> $value) : static`

##### Parameters

$value : array<string|int, mixed>

##### Return values

static

#### values()

Arrayable.php : 88

Get the values of the array

`public values() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### valuesToLowerCase()

Arrayable.php : 184
`public valuesToLowerCase() : static`

##### Return values

static

## Search results