Skip to content

Releases: dugajean/pouch

2.2.3

07 Jun 08:13
Compare
Choose a tag to compare
Refactor ClassTree to make more use of Finder

2.2.2

05 Jun 21:43
Compare
Choose a tag to compare
Surround callback trigger with hook off/on respectively

2.2.1

05 Jun 21:34
Compare
Choose a tag to compare
Fix hooks bug with infinite recursion

2.2 - Hooks

05 Jun 17:37
Compare
Choose a tag to compare

Changed

  • Can now store primitive types and arrays without the need of a Closure

Added

  • Ability to access array elements via dot notation
  • Feature to hook into get/set of the container and ability to manipulate your data or setup anything via callback
    • Can hook into all get/set calls
    • Can hook into specific keys
  • Ability to use count on any Pouch instance to see the count of stored items
  • Ability to load class tree with the ClassTree class without the need of a composer.json file (set ClassTree::$startPath)

2.1.2

29 May 15:05
Compare
Choose a tag to compare
Merge branch 'master' of github.com:dugajean/pouch

2.1.1

13 May 17:44
Compare
Choose a tag to compare

Added

  • Ability to bind named items during mass-bind
  • Compliance with PHAR files (Pouch works when bundled in a PHAR archive)

2.1

23 Apr 15:42
Compare
Choose a tag to compare
2.1

Added

  • Fluidly set named items
  • Mass-bind named items
  • Combine named and factory items during mass-bind

Removed

  • Third parameter from bind to make an item named

2.0 - Backward Compatible

12 Apr 21:58
Compare
Choose a tag to compare

Added

  • The concept of items to store information within the container
  • New alias method to create a reference to an existing key
  • Ability to autowire parameters only by name and no type-hint
    • Example: pouch()->bind('foo', function () { return 'foo' }, true); and then in your constructor: public function __construct($foo) {} would resolve to the string foo
  • New item method to fetch the Item object
  • Factory items can be called with different arguments every time they are needed. More about this in the wiki

Changed

  • Complete rehaul of the container storage with the Item object
  • Factories have been simplified and merged with the item concept
  • Fetching the raw closure is now way simpler
  • Extracted traits for the factory related methods and alias methods
  • Requires PHP 7.1+ instead of PHP 7.0+

Removed

  • Old Factory class, now included within the item logic

1.2

29 Mar 10:12
Compare
Choose a tag to compare
1.2

Changed

  • The get method is now the main container fetching method instead of resolve.
  • The resolve method in now used to go one step further if necessary and call getContent() if we're dealing with an internal container.

1.1.1

11 Mar 18:07
Compare
Choose a tag to compare

Added

  • Ability to provide a fully qualified class path when registering a namespace and which will then be used to resolve the namespace off it.

Fixed

  • An invalid test case.