2017 © Pedro Peláez
 

symfony-bundle helpersbundle

Helpers bundle, that extends symfony validator, html purifier classes for easy usage

image

sharkzt/helpersbundle

Helpers bundle, that extends symfony validator, html purifier classes for easy usage

  • Monday, October 16, 2017
  • by Sharkzt
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

SharztHelpersBundle

SharztHelpersBundle is a bundle, that extends symfony validator, html purifier classes for easy usage. It is easy to use, and extensively unit tested!, (*1)

Build Status Coverage Status, (*2)

Installation

The recommended way to install bundle is through Composer:, (*3)

$ composer require sharkzt/helpersbundle

Usage Examples

Validation

``` php, (*4)

// Feel free to use as service like $validationHelper = $this->get('sharkzt_helpers.validation_helper'); $id = 111; $email = "test@mail"; $validationHelper = new ValidationHelper(new ErrorHelper()); $validationHelper->setParameter([$id, $validationHelper->integer]) ->setParameter([$id, new Choice([1, 2, 3])]) ->setParameter([$email, new Email()]);, (*5)

if (!$validationHelper->validate()) { return $this->view($validationHelper->getResponse()); }, (*6)


The `ValidationHelper` returns an array of errors if validation fails. ### Purification ``` php //Set up your service $purifierHelper = $this->get('sharkzt_helpers.purifier_helper'); $purifierHelper = new PurifierHelper(); $purifier = $purifierHelper->initialize(); $xssCode = "Hello world!" //Purify your variable, to avoid any html code in $pureString = $purifier->purify($xssCode);

The $pureString returns Hello world!., (*7)

License

HelpersBundle is released under the MIT License. See the bundled LICENSE file for details., (*8)

The Versions

16/10 2017

dev-master

9999999-dev https://github.com/Sharkzt/HelpersBundle

Helpers bundle, that extends symfony validator, html purifier classes for easy usage

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Pysarchuk

framework validation helper purification

29/09 2016

0.2.0

0.2.0.0 https://github.com/Sharkzt/HelpersBundle

Helpers bundle, that extends symfony validator, html purifier classes for easy usage

  Sources   Download

MIT

The Requires

 

by Alexander Pysarchuk

framework validation helper purification

29/09 2016

0.0.1

0.0.1.0 https://github.com/Sharkzt/HelpersBundle

Helpers bundle, that extends symfony validator, html purifier classes for easy usage

  Sources   Download

MIT

The Requires

 

by Alexander Pysarchuk

framework validation helper purification