Skip to content

Latest commit

 

History

History
81 lines (46 loc) · 1.17 KB

PHPCollections-Collections-Pair.md

File metadata and controls

81 lines (46 loc) · 1.17 KB

PHPCollections\Collections\Pair

A simple key / value pair object representation.

  • Class name: Pair
  • Namespace: PHPCollections\Collections

Properties

$key

private mixed $key

The key for the Pair object.

  • Visibility: private

$value

private mixed $value

The value for the Pair object.

  • Visibility: private

Methods

__construct

void PHPCollections\Collections\Pair::__construct(mixed $key, mixed $value)

Initializes class properties.

  • Visibility: public

Arguments

  • $key mixed
  • $value mixed

__get

mixed PHPCollections\Collections\Pair::__get(string $name)

Allows access to the key property by its value.

  • Visibility: public

Arguments

  • $name string

getKey

mixed PHPCollections\Collections\Pair::getKey()

Returns the key property.

  • Visibility: public

getValue

mixed PHPCollections\Collections\Pair::getValue()

Returns the value property.

  • Visibility: public

setValue

void PHPCollections\Collections\Pair::setValue(mixed $value)

Sets the value of the value property.

  • Visibility: public

Arguments

  • $value mixed