2017 © Pedro Peláez
 

library array-access-trait

Trait providing methods to implement array access using a container variable.

image

dgifford/array-access-trait

Trait providing methods to implement array access using a container variable.

  • Thursday, October 6, 2016
  • by dgifford
  • Repository
  • 0 Watchers
  • 0 Stars
  • 174 Installations
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

ArrayAccessTrait

Adds the basic methods for accessing properties of an object using array notation., (*1)

For example:, (*2)

$foo = new Foo;

$foo['bar'] = 'bar';

echo $foo['bar']; // 'bar'

unset( $foo['bar'] );

var_dump( isset($foo['bar']) ); // 'false'

Properties created in this way are stored in a private array called 'container'., (*3)

Any class that uses this trait must implement the ArrayAccess interface, see http://php.net/manual/en/class.arrayaccess.php., (*4)

For example:, (*5)

class Foo implements \ArrayAccess
{
}

Changelog

  • v1.0 Initial release

The Versions

06/10 2016

dev-master

9999999-dev

Trait providing methods to implement array access using a container variable.

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4

 

php trait array arrayaccess

06/10 2016

v1.1

1.1.0.0

Trait providing methods to implement array access using a container variable.

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4

 

php trait array arrayaccess

16/09 2016

v1.0

1.0.0.0

Trait providing methods to implement array access using a container variable.

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4

 

php trait array arrayaccess