This repository has been archived by the owner on May 15, 2021. It is now read-only.
Releases: chillerlan/php-traits
Releases · chillerlan/php-traits
1.1.7
- repo move
1.1.6
- added
Container
__fromIterable()
__toJSON()
__fromJSON()
- changed
Enumerable
__each($callback)
to__each(callable $callback)
, while__map()
will happily accept anything that goes throughis_callable()
(thecallable
type hint does not accept strings, unlikearray_map()
)
- several fixes
1.1.5
- added
ContainerInterface
andEnumerableInterface
- changed
Enumerable::__findAll()
andEnumerable::__reject()
to acceptcallable
instead of\Closure
1.1.4
Enumerable
- added
__last()
- added
__clear()
- added
__inspect():string
- added
__findAll(Closure $callback):array
- added
__reject(Closure $callback):array
- added
__equal(array $y):bool
- added
1.1.3
Container
- added
__isset(string $property):bool
- added
__isPrivate(string $property):bool
(protected) - added
__unset(string $property)
- added
__toString():string
which returns a JSON string - changed
__get()
,__set()
and__toArray()
so that they won't return private properties - changed
__construct()
so that it will accept aDotEnv
object as optional 2nd argument- changed
__get()
,__set()
so that they will access theDotEnv
instance in case the property is not found (or private, respectively) in theContainer
instance
- changed
- added
Env
- added __issetEnv(string $var):bool
DotEnv
- added
__isset()
,isset()
and__unset()
aliases
- added
1.1.2
- allow magic getter & setter for
Env
:$var = $env->var
$env->var = $var
- added an option to avoid using the global
$_ENV
variable$env = new DotEnv('/path/to/config', '.env', false)
isset($_ENV['var']) // -> false
- variables are still accessible via
$env->var
or$env->get('var')
1.1.1
- added
ByteArray
,ArraySearch
andDotArray
1.1.0
- added support for PHP's built-in interfaces
- cleanup
1.0.2
- added
Env
andDotEnv
1.0.1
- added
Enumerable