2017 © Pedro Peláez
 

library record

Data HashMap implementation

image

psx/record

Data HashMap implementation

  • Sunday, February 25, 2018
  • by k42b3
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22,309 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 15 % Grown

The README.md

Record

About

This package provides a simple HashMap implementation inspired by the Java HashMap API. The following example shows how to use the record class:, (*1)

<?php

use PSX\Record\Record;

$record = new Record();
$record->put('foo', 'bar');
$record->putAll(['bar' => 'foo']);

$record->containsKey('foo'); // checks whether the key exists
$record->containsValue('bar'); // checks whether the value exists (strict type check)

$record->get('foo');
$record->getOrDefault('foo', false);
$record->foo; // property access
$record['foo']; // array access

$record->remove('bar');

$record->keySet(); // returns all keys as indexed array
$record->size(); // returns the size of the map
$record->values(); // returns all values as indexed array

\json_encode($record); // results in {"foo": "bar"}

$record = Record::from(['foo' => 'bar']); // create a record from an array

The Versions

25/02 2018

dev-master

9999999-dev http://phpsx.org

Data HashMap implementation

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

data record hashmap

25/02 2018

v1.0.3

1.0.3.0 http://phpsx.org

Data HashMap implementation

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

data record hashmap

14/02 2018

v1.0.2

1.0.2.0 http://phpsx.org

Data HashMap implementation

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

data record hashmap

16/12 2016

v1.0.1

1.0.1.0 http://phpsx.org

Data HashMap implementation

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

data record hashmap

08/05 2016

v1.0.0

1.0.0.0 http://phpsx.org

Data HashMap implementation

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

data record hashmap

02/04 2016

v0.1.0

0.1.0.0 http://phpsx.org

Data HashMap implementation

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

data record hashmap