dhii/data-key-value-aware-abstract

Traits for objects that are aware of a key, a value, or both.

v0.1-alpha4 2018-02-11 15:58 UTC

This package is auto-updated.

Last update: 2024-12-07 03:41:23 UTC


README

Build Status Code Climate Test Coverage Latest Stable Version Latest Unstable Version This package complies with Dhii standards

Traits for objects that are aware of a key, a value, or both.

Traits

  • KeyAwareTrait - Allows storage and retrieval of a key. The key can be any scalar value, in which case it will be normalized to string, or a Stringable or null, in which case it will be preserved.
  • ValueAwareTrait - Allows storage and retrieval of a value. A value can be anything.
  • NameAwareTrait - Allows storage and retrieval of a name. A name is a string or stringable that identifies something in a narrow scope.