Download the PHP package koded/stdlib without Composer
On this page you can find all versions of the php package koded/stdlib. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package stdlib
Short Description A standard library for shareable classes and functions
License BSD-3-Clause
Informations about the package stdlib
Koded Standard Library
A standard library for shareable classes and functions.
Classes
Immutable
get(string $index, $default = null)
has($index): bool
equals(string $propertyA, string $propertyB): bool
find(string $index, $default = null)
extract(array $keys): array
filter(iterable $data, string $prefix, bool $lowercase = true, bool $trim = true): array
namespace(string $prefix, bool $lowercase = true, bool $trim = true)
count()
toArray(): array
toJSON(int $options = 0): string
toXML(string $root): string
toArguments(): Arguments
Arguments
(implements Immutable
methods)
set(string $index, $value)
import(array $values)
upsert(string $index, $value)
bind(string $index, &$variable)
pull(string $index, $default = null)
delete(string $index)
clear()
toImmutable(): Immutable
ExtendedArguments
ExtendedArguments extends Arguments
flatten(): ExtendedArguments
Supports dot-notation for index names. Example:
Config
Class Config
works as a parameter bag that provides ways to fill it
from files or other Config
instances. There are 2 common patterns
to populate the config,
either you can fill the Config instance from config files:
or alternatively you can define the configuration options in the instance
that calls fromObject
,
Other interesting way to load configuration is from an environment variable that points to a file
In this case, before launching the application you have to set the env variable to the file you want to use. On Linux and OSX use the export statement
or somewhere in your app bootstrap phase before constructing the Api instance
fromEnvironment( array $variableNames, string $namespace = '', bool $lowercase = true, bool $trim = true ): Configuration
fromJsonFile(string $file): Configuration
fromPhpFile(string $file): Configuration
fromEnvVariable(string $variable): Configuration
fromIniFile(string $file): Configuration
fromObject($object): Configuration
withParameters(array $parameters): Configuration
silent(bool $silent): Configuration
build(string $context): Configuration
Mime
type(string $extension, int $index = 0): string
types(string $extension): array
supports(string $type): bool
extensions(string $type): array
UUID
Class UUID generates Universally Unique Identifiers
following the RFC 4122.
v1($address = null): string
v3(string $namespace, $name): string
v4(): string
v5(string $namespace, string $name): string
valid(string $uuid): bool
matches(string $uuid, int $version = 4): bool
toBase64(string $uuid): string
fromBase64(string $base64): string
ULID
Class ULID generates Universally Unique Lexicographically Sortable Identifiers
generate(int $count = 1): self
fromULID(string $ulid): self
fromUUID(string $ulid): self
fromTimestamp(float $timestamp): self
fromDateTime(string $datetime): self
toULID(): array|string
toUUID(): array|string
toDateTime(): array|DateTime
count(): int
valid(string $uuid): bool
Functions
Code quality
License
The code is distributed under the terms of The 3-Clause BSD license.
All versions of stdlib with dependencies
ext-json Version *
ext-dom Version *
ext-libxml Version *
ext-simplexml Version *
ext-ctype Version *
ext-mbstring Version *