2017 © Pedro Peláez
 

library common

Common helpers and classes for ICanBoogie

image

icanboogie/common

Common helpers and classes for ICanBoogie

  • Thursday, April 6, 2017
  • by olvlvl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 130,495 Installations
  • PHP
  • 15 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 9 % Grown

The README.md

Common

Release Code Coverage Packagist, (*1)

This package provides basic classes and helpers shared by many ICanBoogie packages. It provides offset exceptions, property exceptions, some interfaces, and helpers to transform strings and arrays., (*2)

Installation

composer require icanboogie/common

Exceptions

Offset exceptions

The package defines the following exceptions related to array offset:, (*3)

Property exceptions

The following exceptions related to object properties defined by the package:, (*4)

<?php

use ICanBoogie\PropertyNotDefined;

class A
{
    private $id;

    public function __get(string $property)
    {
        if ($property === 'id') {
            return $this->id;
        }

        throw new PropertyNotDefined([ $property, $this ]);
    }
}

Interfaces

The package defines the following interfaces:, (*5)

  • ToArray: Should be implemented by classes whose instances can be converted into arrays.
  • ToArrayRecursive: Should be implemented by classes whose instances can be converted into arrays recursively.
<?php

use ICanBoogie\ToArray;
use ICanBoogie\ToArrayRecursive;

class A implements ToArrayRecursive
{
    use ToArrayRecursiveTrait;

    public function to_array(): array
    {
        return (array) $this;
    }
}

Continuous Integration

The project is continuously tested by GitHub actions., (*6)

Tests Static Analysis Code Style, (*7)

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you're expected to uphold this code., (*8)

Contributing

See CONTRIBUTING for details., (*9)

The Versions

06/04 2017

dev-master

9999999-dev https://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3

 

The Development Requires

toolkit

06/04 2017

v1.3.1

1.3.1.0 https://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3

 

The Development Requires

toolkit

04/03 2016

v1.3.0

1.3.0.0 http://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

toolkit

21/10 2014

v1.2.2.1

1.2.2.1 http://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

toolkit

19/09 2014

v1.2.2

1.2.2.0 http://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

toolkit

17/03 2014

v1.2.1

1.2.1.0 http://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

toolkit

05/03 2014

v1.2

1.2.0.0 http://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

toolkit

09/01 2014

dev-property_error_info

dev-property_error_info http://icanboogie.org/

Common helpers and classes for ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

toolkit