2017 © Pedro Peláez
 

library object-errors

Library that adds a possibility to collect errors for objects

image

imponeer/object-errors

Library that adds a possibility to collect errors for objects

  • Thursday, July 5, 2018
  • by MekDrop
  • Repository
  • 2 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 36 % Grown

The README.md

License Packagist PHP Packagist, (*1)

Object Errors

Library that can be used for collecting errors on objects., (*2)

Installation

To install and use this package, we recommend to use Composer:, (*3)

composer require imponeer/object-errors

Otherwise you need to include manualy files from src/ directory., (*4)

Example


use Imponeer/ObjectErrors/ErrorsCollection; class Object { /** * Errors variable * * @var null|ErrorsCollection */ public $errors = null; /** * Constructor (binds new instance of ErrorsCollection to $errors var) */ public function __constructor() { $this->errors = new ErrorsCollection(); } /** * This method do something */ public function doSomething() { // here we should do something if ($failed) { $this->errors->add("Some error"); } } /** * Renders object content * * @return string */ public function render() { if ($this->errors->isEmpty()) { return 'Everything fine'; } else { return $this->errors->getHTML(); } } }

How to contribute?

If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try interactive GitHub tutorial., (*5)

If you found any bug or have some questions, use issues tab and write there your questions., (*6)

The Versions

05/07 2018

dev-master

9999999-dev

Library that adds a possibility to collect errors for objects

  Sources   Download

MIT

The Requires

  • ext-json *
  • php >=5.6

 

The Development Requires

by Raimondas Rimkevičius

collection errors object

05/07 2018

dev-dependabot/composer/phpunit/phpunit-tw-5.2|tw-7.0

dev-dependabot/composer/phpunit/phpunit-tw-5.2|tw-7.0

Library that adds a possibility to collect errors for objects

  Sources   Download

MIT

The Requires

  • ext-json *
  • php >=5.6

 

The Development Requires

by Raimondas Rimkevičius

collection errors object

14/03 2018

1.0.0

1.0.0.0

Library that adds a possibility to collect errors for objects

  Sources   Download

MIT

The Requires

  • ext-json *
  • php >=5.6

 

The Development Requires

by Raimondas Rimkevičius

collection errors object