2017 © Pedro Peláez
 

library arraycollectionfactory

a type save array generator via type hinting

image

ramsondon/arraycollectionfactory

a type save array generator via type hinting

  • Thursday, October 2, 2014
  • by ramsondon
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ArrayCollectionFactory

ArrayCollectionFactory is a dynamic ArrayCollection generator for type save access via type hints in PHP., (*1)

the ArrayCollection implements \Countable, \Iterator and the dynamically created cached ArrayCollection contains the methods:, (*2)

->append(Class\of\Object $object);

->getAt($index);

->removeAt($index);

try phpunit in directory src/Ramsondon/TypedArray/Test to generate cached ArrayCollection and Interface.
the cached files will be created in src/Ramsondon/TypedArray/Cache

How to use:

    use Ramsondon\ArrayCollectionFactory;

    $factroy = new ArrayCollectionFactory();

    /* @var $collection \Ramsondon\TypedArray\Cache\ITestObjectArrayCollection */
    $collection = $factory->create('Class\\Of\\TestObject');

    $object = new Class\Of\TestObject();

    $collection->append($object);

    /* @var $testobject \Class\Of\TestObject */
    foreach ($collection as $testobject) {
        $testobject->doSomething();
    }


The Versions

02/10 2014

dev-master

9999999-dev

a type save array generator via type hinting

  Sources   Download

The Requires

  • php >=5.3.0

 

by Matthias Schmid

php array arraycollection

19/08 2014

v1.0

1.0.0.0

a type save array generator via type hinting

  Sources   Download

The Requires

  • php >=5.3.0

 

by Matthias Schmid

php array arraycollection