2017 © Pedro Peláez
 

library xsv-base

Module with some utils on which other modules can base in Zend Expressive

image

sebrogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  • Tuesday, July 31, 2018
  • by SebRogala
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 53 % Grown

The README.md

XsvBase

Module with some utils on which other modules can base in Zend Expressive 3., (*1)

To install simply use composer:, (*2)

composer require sebrogala/xsv-base:^3.0

Body Params Middleware

Enchanted version which allows to use $request->getParsedBody() on PUT request. For more details [see original Middleware][1]. To use new version you have to remove (if already used) invokable from config:, (*3)

'dependencies' => [
        'invokables' => [
            Helper\BodyParams\BodyParamsMiddleware::class => Helper\BodyParams\BodyParamsMiddleware::class,
            /* ... */
        ],
        'factories' => [
            /* ... */
        ],
    ],

and put new key to 'factories' key, so final should look like:, (*4)

'dependencies' => [
        'invokables' => [
            /* ... */
        ],
        'factories' => [
            Helper\BodyParams\BodyParamsMiddleware::class => Xsv\Base\Factory\BodyParams\BodyParamsFactory::class,
            /* ... */
        ],
    ],

Or if you didn't have one yet, you can simply copy 'body-params-factory.local.php.dist' file from 'data' folder to config/autoload and remove .dist extension., (*5)

Common Dependency Injection

If constructor is used only for assigning local variables (Dependency Injection) and it's in common pattern like Handlers, Actions, InputFilter or anything that follows naming convention with type name on the end of class name, there can be used Abstract Factory:, (*6)

Copy xsv-base-config.global.php.dist to config/autoload folder and configure your common types there., (*7)

Handy copy commands

cp vendor/sebrogala/xsv-base/data/xsv-base-config.global.php.dist config/autoload/xsv-base-config.global.php
cp vendor/sebrogala/xsv-base/data/App/Entity.php.dist src/App/src/Entity.php
cp vendor/sebrogala/xsv-base/data/App/Repository.php.dist src/App/src/Repository.php
cp vendor/sebrogala/xsv-base/data/App/RepositoryInterface.php.dist src/App/src/RepositoryInterface.php
cp vendor/sebrogala/xsv-base/data/App/UuidGen.php.dist src/App/src/UuidGen.php

The Versions

31/07 2018

dev-master

9999999-dev https://github.com/SebRogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

19/07 2018

3.1.0

3.1.0.0 https://github.com/SebRogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

16/07 2018

3.0.2

3.0.2.0 https://github.com/SebRogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

03/07 2018

3.0.1

3.0.1.0 https://github.com/SebRogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

01/06 2018

3.0.0

3.0.0.0 https://github.com/SebRogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

15/02 2018

2.0.0

2.0.0.0 https://github.com/SebRogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

04/09 2016

0.1

0.1.0.0 https://github.com/SebRogala/xsv-base

Module with some utils on which other modules can base in Zend Expressive

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires