CodeIgniter v4.5 API

ArrayCast extends BaseCast
in package
implements CastInterface

Class ArrayCast

(PHP) [array --> string] --> (DB driver) --> (DB column) string [ <-- string] <-- (DB driver) <-- (DB column) string

Table of Contents

Interfaces

CastInterface

Methods

get()  : mixed
Takes a value from DataSource, returns its value for PHP.
set()  : mixed
Takes a PHP value, returns its value for DataSource.
invalidTypeValueError()  : never

Methods

get()

Takes a value from DataSource, returns its value for PHP.

public static get(mixed $value[, array<string|int, mixed> $params = [] ][, object|null $helper = null ]) : mixed
Parameters
$value : mixed

Data from database driver

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

Additional param

$helper : object|null = null

Helper object. E.g., database connection

Return values
mixed

PHP native value

set()

Takes a PHP value, returns its value for DataSource.

public static set(mixed $value[, array<string|int, mixed> $params = [] ][, object|null $helper = null ]) : mixed
Parameters
$value : mixed

PHP native value

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

Additional param

$helper : object|null = null

Helper object. E.g., database connection

Return values
mixed

Data to pass to database driver

invalidTypeValueError()

protected static invalidTypeValueError(mixed $value) : never
Parameters
$value : mixed
Return values
never

        
On this page

Search results