Overview

Namespaces

  • Azalea
    • Selenium
      • App
        • Charts
        • Components
        • Encounters
        • Home
        • Login
        • Main
        • Messages
        • Patients
        • Scheduler
      • Core
      • EHR
        • UI
          • Charts
          • Documents
          • Encounters
          • Home
          • Messaging
            • Folders
          • Patients
          • Payments
          • Precerts
          • Reports
          • Scheduler
          • Settings
            • General
              • Locations
              • Roles
              • Users
        • User
      • Login
        • UI
      • PHR
        • UI
        • User
      • Toolkit
        • Exception
        • Validation
    • Util
  • None
  • tests
    • integration
      • barebones
        • controllers
          • charts
          • patients
          • system
        • models
          • billing
          • encounters
          • examples
          • messaging
          • rcm
          • system
    • unit
      • barebones
        • lib
        • utilities
          • calculations

Classes

  • Dom
  • NestedHashMap
  • ResourceLoader
  • SauceLabsTestCase
  • SeleniumTestCase
  • TestCase
  • View
  • Overview
  • Namespace
  • Class

Class NestedHashMap

Wraps a multi-dimensional associated array object (nested hash map) and provides dot notation access to it along with a few other nicities, like default values and assertHas.

Examples: $items = array( "foo" => array( "bar" => "baz" )); $arr = new NestedHashMap($items); $arr->get("foo.bar"); // "baz" $arr->has("foo.bar"); // true

Namespace: Azalea\Selenium\Toolkit
Author: jtracy
Located at selenium/Toolkit/NestedHashMap.php
Methods summary
public
# __construct( array $items = array() )

Create a new NestedHashMap object wrapping $items.

Create a new NestedHashMap object wrapping $items.

Parameters

$items
public array
# getAll( )

Returns the entire multi-array.

Returns the entire multi-array.

Returns

array
public mixed
# get( string $key, mixed $default = null )

Get a key's value.

Get a key's value.

Parameters

$key
$default

Returns

mixed

Throws

InvalidArgumentException
public boolean
# has( string $key )

Check if an item exists in the multi-array.

Check if an item exists in the multi-array.

Parameters

$key

Returns

boolean
public
# set( string $key, mixed $value )

Set a key's value.

Set a key's value.

Parameters

$key
$value
public boolean
# assertHas( string $key,… )

Throws an exception if one or more of the given keys do not exist in the multi-array.

Throws an exception if one or more of the given keys do not exist in the multi-array.

Parameters

$key,…
One or more keys

Returns

boolean

Throws

RuntimeException
protected mixed
# lookup( array $items, string $piece )

Looks up the key ($piece) in the given array ($items)

Looks up the key ($piece) in the given array ($items)

Parameters

$items
$piece

Returns

mixed

Throws

InvalidArgumentException
Properties summary
protected array $items

$items

$items

# array()
API documentation generated by ApiGen