xplo.re Medusa Core Framework 3.1
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • Authentication
  • Authentication_Token
  • Autoloader
  • Cache
  • Charset
  • ClassDescriptor
  • Closure
  • Controller
  • Converter
  • Date
  • Decoder
  • Delegate
  • Dispatcher
  • Encoder
  • Env
  • Env_Field
  • Env_File
  • Env_FileList
  • Env_Request
  • Env_SERVER
  • Exchange
  • Fault
  • Field
  • Filter
  • Filter_Value
  • Formatter
  • Hash
  • IP
  • Loader
  • Locale
  • Locale_Iterator
  • Locale_Node
  • Log
  • Module
  • Module_Iterator
  • Nothing
  • Object
  • OS
  • Plugin
  • Profiler
  • Query
  • Registry
  • Resource
  • Server
  • Session
  • Session_Token
  • Set
  • Storage
  • Storage_Result
  • Storage_Statement
  • Stream
  • String
  • Translation
  • URI
  • URI_Parameters
  • UUID
  • Value
  • Version
  • View

Interfaces

  • Accessor
  • Chainable
  • Comparable
  • Configurable
  • Equality
  • Identity
  • Inquiry
  • Masquerade
  • Mutator
  • SeekableStream
  • Storable
  • Variator

Exceptions

  • Exception

Constants

  • Copyright
  • ProductName
  • UseVersion
  • Version

Functions

  • ns_expand
  • ns_file_exists
  • ns_get_version
  • ns_resolve

Class Hash

Array object implementation with full Core support.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Hash implements ArrayAccess, Countable, Core\Equality, Core\Identity, IteratorAggregate, Serializable

Direct known subclasses

Core\URI_Parameters

Namespace: Core
Package: Core
Since: 3.1
Requires: PHP 5.3
Used by: Core\Authentication::verify()
Located at Hash.inc.php

Methods summary

public
# __construct( array $array = null )

Parameters

$array

Since

3.1
public
# append( mixed $value )

Parameters

$value

See

Core\Hash::offsetSet()

Since

3.1
public boolean
# contains( mixed $value )

Parameters

$value

Returns

boolean

Since

3.1
public integer
# count( )

Returns

integer

Since

3.1

Implementation of

Countable::count()
public static Core\Hash
# createWithElements( mixed $val )

Parameters

$val

Returns

Core\Hash

Since

3.1
public static Core\Hash
# createWithKeysAndValues( array $keys, array $values )

Parameters

$keys
$values

Returns

Core\Hash

Throws

Core\Exception\InvalidArgument
Source key and value arrays are of different size.
Core\Exception\Loader

Since

3.1
public string
# elementsJoinedBy( string $separator, callable $callback = null )

Parameters

$separator
$callback

Returns

string

Since

3.1
public array
# exchangeArray( array $array )

Parameters

$array

Returns

array

Since

3.1
public
# flip( )

Exchanges keys with their associated values in the Hash.

Exchanges keys with their associated values in the Hash.

Since

3.1
public array
# getArrayCopy( )

Returns

array

Since

3.1
public Iterator
# getIterator( )

Returns

Iterator

Since

3.1

Implementation of

IteratorAggregate::getIterator()
public string
# getIteratorClass( )

Returns

string

Since

3.1
public integer
# indexOf( mixed $value )

Parameters

$value

Returns

integer

Since

3.1
public boolean
# isEqualTo( $object )

Tests, whether the current Core\Hash instance is equal to a given array or Core\Hash instance.

Tests, whether the current Core\Hash instance is equal to a given array or Core\Hash instance.

Tests for equality of all Hash values for each key, hence value types do not need to match. The order of Hash values is ignored.

Parameters

$object

or Core\Hash instance to compare current Core\Hash instance with.

Returns

boolean

Returns true, if the current Core\Hash instance and the array or Core\Hash instance provided are equal, otherwise false.

Since

3.1

Implementation of

Core\Equality::isEqualTo()
public boolean
# isIdenticalTo( $object )

Tests, whether the current Core\Hash is identical to another array or Core\Hash.

Tests, whether the current Core\Hash is identical to another array or Core\Hash.

Tests for identity of all Hash values for each key, hence value types need to match. The order of Hash values is ignored.

Parameters

$object

or Core\Hash instance to compare current Core\Hash instance with.

Returns

boolean

Returns true, if the current Core\Hash instance and the array or Core\Hash instance provided are identical, otherwise false.

Since

3.1

Implementation of

Core\Identity::isIdenticalTo()
public
# keySort( integer $method = self::RegularSortMode )

Parameters

$method

Returns


$this

Throws

Core\Exception\Loader
Core\Exception\Runtime

Since

3.1
public boolean
# offsetExists( integer $offset )

Parameters

$offset
$offest

Returns

boolean

Since

3.1

Implementation of

ArrayAccess::offsetExists()
public mixed
# offsetGet( integer $offset )

Parameters

$offset

Returns

mixed

Since

3.1

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( integer $offset, mixed $value )

Parameters

$offset
$value

Since

3.1

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( integer $offset )

Parameters

$offset

Since

3.1

Implementation of

ArrayAccess::offsetUnset()
public
# push( mixed $value )

Parameters

$value

Returns


$this

Since

3.1
public
# reverse( )

Reverses the order of elements stored by the Core\Hash instance. Indices are preserved.

Reverses the order of elements stored by the Core\Hash instance. Indices are preserved.

Since

3.1
public string
# serialize( )

Returns

string

Since

3.1

Implementation of

Serializable::serialize()
public
# setIteratorClass( string $className )

Parameters

$className

Returns


$this

Since

3.1
public
# sort( integer $method = self::RegularSortMode, integer $algorithm = self::AssociativeSortAlgorithm )

Parameters

$method
$algorithm

Returns


$this

Throws

Core\Exception\Loader
Core\Exception\Runtime

Since

3.1
public
# unfold( )

Recursively unfolds a multi-dimensional array.

Recursively unfolds a multi-dimensional array.

Returns


$this

Since

3.1
public static array
# unfoldArray( array $args )

Recursively unfolds a multi-dimensional array.

Recursively unfolds a multi-dimensional array.

Parameters

$args

Returns

array

Since

3.1
public
# unserialize( string $stream )

Parameters

$stream

Since

3.1

Implementation of

Serializable::unserialize()
public
# update( array $array )

Parameters

$array

Returns


$this

Since

3.1

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), chain(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

integer NonAssociativeSortAlgorithm

Since

3.1
# 0
integer AssociativeSortAlgorithm

Since

3.1
# 1
integer RegularSortMode

Since

3.1
# 0
integer NumericSortMode

Since

3.1
# 1
integer StringSortMode

Since

3.1
# 2
integer LocaleSortMode

Since

3.1
# 4
integer NaturalSortMode

Since

3.1
# 8
integer CaseSensitiveSortMode

Since

3.1
# 0
integer CaseInsensitiveSortMode

Since

3.1
# 16
integer ReverseSortMode

Since

3.1
# 32

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected array $_v_array

Since

3.1
# array ()
protected string $_v_iteratorClass

Since

3.1
# 'Core\\Hash\\Iterator'

Magic properties

public read-only array $array
public read-only string $iteratorClass
public read-only integer $count

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.1 API documentation generated by ApiGen