PHP Класс Spatie\Valuestore\Valuestore

Наследование: implements ArrayAcces\ArrayAccess, implements Countabl\Countable
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$fileName string

Открытые методы

Метод Описание
all ( ) : array Get all values from the store.
allStartingWith ( string $startingWith = '' ) : array Get all keys starting with a given string from the store.
count ( ) : integer Count elements.
decrement ( string $name, integer $by = 1 ) : integer | null | string Decrement a value from the store.
flush ( ) Flush all values from the store.
flushStartingWith ( string $startingWith = '' ) Flush all values which keys start with a given string.
forget ( string $key ) Forget a value from the store.
get ( string $name, $default = null ) : null | string Get a value from the store.
has ( string $name ) : boolean * Determine if the store has a value for the given name.
increment ( string $name, integer $by = 1 ) : integer | null | string Increment a value from the store.
make ( string $fileName )
offsetExists ( mixed $offset ) : boolean Whether a offset exists.
offsetGet ( mixed $offset ) : mixed Offset to retrieve.
offsetSet ( mixed $offset, mixed $value ) Offset to set.
offsetUnset ( mixed $offset ) Offset to unset.
pull ( string $name ) : null | string Get and forget a value from the store.
push ( string $name, $pushValue ) Push a new value into an array.
put ( string | array $name, string | integer | null $value = null ) Put a value in the store.

Защищенные методы

Метод Описание
__construct ( )
filterKeysNotStartingWith ( array $values, string $startsWith ) : array
filterKeysStartingWith ( array $values, string $startsWith ) : array
setContent ( array $values )
setFileName ( string $fileName ) Set the filename where all values will be stored.
startsWith ( string $haystack, string $needle ) : boolean

Описание методов

__construct() защищенный Метод

protected __construct ( )

all() публичный Метод

Get all values from the store.
public all ( ) : array
Результат array

allStartingWith() публичный Метод

Get all keys starting with a given string from the store.
public allStartingWith ( string $startingWith = '' ) : array
$startingWith string
Результат array

count() публичный Метод

Count elements.
public count ( ) : integer
Результат integer

decrement() публичный Метод

Decrement a value from the store.
public decrement ( string $name, integer $by = 1 ) : integer | null | string
$name string
$by integer
Результат integer | null | string

filterKeysNotStartingWith() защищенный Метод

protected filterKeysNotStartingWith ( array $values, string $startsWith ) : array
$values array
$startsWith string
Результат array

filterKeysStartingWith() защищенный Метод

protected filterKeysStartingWith ( array $values, string $startsWith ) : array
$values array
$startsWith string
Результат array

flush() публичный Метод

Flush all values from the store.
public flush ( )

flushStartingWith() публичный Метод

Flush all values which keys start with a given string.
public flushStartingWith ( string $startingWith = '' )
$startingWith string

forget() публичный Метод

Forget a value from the store.
public forget ( string $key )
$key string

get() публичный Метод

Get a value from the store.
public get ( string $name, $default = null ) : null | string
$name string
$default
Результат null | string

has() публичный Метод

* Determine if the store has a value for the given name.
public has ( string $name ) : boolean
$name string
Результат boolean

increment() публичный Метод

Increment a value from the store.
public increment ( string $name, integer $by = 1 ) : integer | null | string
$name string
$by integer
Результат integer | null | string

make() публичный статический Метод

public static make ( string $fileName )
$fileName string

offsetExists() публичный Метод

Whether a offset exists.
public offsetExists ( mixed $offset ) : boolean
$offset mixed
Результат boolean

offsetGet() публичный Метод

Offset to retrieve.
public offsetGet ( mixed $offset ) : mixed
$offset mixed
Результат mixed

offsetSet() публичный Метод

Offset to set.
public offsetSet ( mixed $offset, mixed $value )
$offset mixed
$value mixed

offsetUnset() публичный Метод

Offset to unset.
public offsetUnset ( mixed $offset )
$offset mixed

pull() публичный Метод

Get and forget a value from the store.
public pull ( string $name ) : null | string
$name string
Результат null | string

push() публичный Метод

Push a new value into an array.
public push ( string $name, $pushValue )
$name string
$pushValue

put() публичный Метод

Put a value in the store.
public put ( string | array $name, string | integer | null $value = null )
$name string | array
$value string | integer | null

setContent() защищенный Метод

protected setContent ( array $values )
$values array

setFileName() защищенный Метод

Set the filename where all values will be stored.
protected setFileName ( string $fileName )
$fileName string

startsWith() защищенный Метод

protected startsWith ( string $haystack, string $needle ) : boolean
$haystack string
$needle string
Результат boolean

Описание свойств

$fileName защищенное свойство

protected string $fileName
Результат string