2017 © Pedro Peláez
 

library util

This package contains a set of various utility resources, which can be used independently.

image

aedart/util

This package contains a set of various utility resources, which can be used independently.

  • Saturday, March 3, 2018
  • by aedart
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,267 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 18 Versions
  • 101 % Grown

The README.md

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Deprecated - Util

Package has been replaced by aedart/athenaeum, (*2)

This package contains a set of various utility resources, which can be used independently., (*3)

Contents

How to install

composer require aedart/util

This package uses composer. If you do not know what that is or how it works, I recommend that you read a little about, before attempting to use this package., (*4)

Partial Collection

If you need to create a concrete collection, that contains specific elements only, then you might find the IPartialCollection interface and the PartialCollectionTrait useful., (*5)

Example

In this example, we create a concrete collection which can only contain integer values., (*6)

<?php
use \Aedart\Util\Contracts\Collections\PartialCollection;
use Aedart\Util\Traits\Collections\PartialCollectionTrait;

class MyCollection implements PartialCollection
{
    use PartialCollectionTrait;

    public function put($key, $value)
    {
        if(!is_int($value)){
            throw new \Exception(sprintf('Value must be of the type integer, %s given', var_export($value, true)));
        }

        $this->getInternalCollection()->put($key, $value);
    }

    public function populate(array $data = []) : void
    {
        // ... Implementation not shown here ...
    }

    public function offsetExists($offset)
    {
        // ... Implementation not shown here ...
    }

    public function offsetGet($offset)
    {
        // ... Implementation not shown here ...
    }

    public function offsetSet($offset, $value)
    {
        // ... Implementation not shown here ...
    }

    public function offsetUnset($offset)
    {
        // ... Implementation not shown here ...
    }
}

Behind the scenes

The PartialCollectionTrait uses a Illuminate\Support\Collection and provides internal access to it via the getInternalCollection() and setInternalCollection() methods., (*7)

In other words, you can choose to form your concrete collections as you see fit, and expose only those methods that you wish., (*8)

Contribution

Have you found a defect ( bug or design flaw ), or do you wish improvements? In the following sections, you might find some useful information on how you can help this project. In any case, I thank you for taking the time to help me improve this project's deliverables and overall quality., (*9)

Bug Report

If you are convinced that you have found a bug, then at the very least you should create a new issue. In that given issue, you should as a minimum describe the following;, (*10)

  • Where is the defect located
  • A good, short and precise description of the defect (Why is it a defect)
  • How to replicate the defect
  • (A possible solution for how to resolve the defect)

When time permits it, I will review your issue and take action upon it., (*11)

Fork, code and send pull-request

A good and well written bug report can help me a lot. Nevertheless, if you can or wish to resolve the defect by yourself, here is how you can do so;, (*12)

  • Fork this project
  • Create a new local development branch for the given defect-fix
  • Write your code / changes
  • Create executable test-cases (prove that your changes are solid!)
  • Commit and push your changes to your fork-repository
  • Send a pull-request with your changes
  • Drink a Beer - you earned it :)

As soon as I receive the pull-request (_and have time for it_), I will review your changes and merge them into this project. If not, I will inform you why I choose not to., (*13)

Acknowledgement

Versioning

This package follows Semantic Versioning 2.0.0, (*14)

License

BSD-3-Clause, Read the LICENSE file included in this package, (*15)

The Versions

03/03 2018

dev-master

9999999-dev https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

03/03 2018

5.0.0

5.0.0.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

05/09 2017

4.0.0

4.0.0.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

27/01 2017

3.0.0

3.0.0.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

08/01 2017

2.1.0

2.1.0.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

28/08 2016

2.0.0

2.0.0.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

28/08 2016

1.5.1

1.5.1.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

03/01 2016

1.5.0

1.5.0.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

17/10 2015

1.4.0

1.4.0.0 https://github.com/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

04/10 2015

1.3.0

1.3.0.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

21/06 2015

1.2.0

1.2.0.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

24/05 2015

1.1.1

1.1.1.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

24/05 2015

1.1.0

1.1.0.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

25/04 2015

1.0.4

1.0.4.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

03/04 2015

1.0.3

1.0.3.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

04/03 2015

1.0.2

1.0.2.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

04/03 2015

1.0.1

1.0.1.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util

04/03 2015

1.0.0

1.0.0.0 https://bitbucket.org/aedart/util

This package contains a set of various utility resources, which can be used independently.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

array util