Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Releases: chillerlan/php-traits

1.1.7

23 Jan 04:36
Compare
Choose a tag to compare
  • repo move

1.1.6

22 Jan 00:05
Compare
Choose a tag to compare
  • added Container
    • __fromIterable()
    • __toJSON()
    • __fromJSON()
  • changed Enumerable
    • __each($callback) to __each(callable $callback), while __map() will happily accept anything that goes through is_callable() (the callable type hint does not accept strings, unlike array_map())
  • several fixes

1.1.5

21 Jan 22:22
Compare
Choose a tag to compare
  • added ContainerInterface and EnumerableInterface
  • changed Enumerable::__findAll() and Enumerable::__reject() to accept callable instead of \Closure

1.1.4

13 Jan 17:25
Compare
Choose a tag to compare
  • Enumerable
    • added __last()
    • added __clear()
    • added __inspect():string
    • added __findAll(Closure $callback):array
    • added __reject(Closure $callback):array
    • added __equal(array $y):bool

1.1.3

09 Jan 22:29
Compare
Choose a tag to compare
  • 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 a DotEnv object as optional 2nd argument
      • changed __get(), __set() so that they will access the DotEnv instance in case the property is not found (or private, respectively) in the Container instance
  • Env
    • added __issetEnv(string $var):bool
  • DotEnv
    • added __isset(), isset() and __unset() aliases

1.1.2

03 Jan 22:44
Compare
Choose a tag to compare
  • 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

30 Dec 03:05
Compare
Choose a tag to compare
  • added ByteArray, ArraySearch and DotArray

1.1.0

16 Dec 16:26
Compare
Choose a tag to compare
  • added support for PHP's built-in interfaces
  • cleanup

1.0.2

26 Nov 04:18
Compare
Choose a tag to compare
  • added Env and DotEnv

1.0.1

25 Nov 03:27
Compare
Choose a tag to compare
  • added Enumerable