CrossPHP
  • Namespace
  • Class
  • Download

Namespaces

  • Cross
    • Auth
    • Cache
      • Driver
      • Request
    • Core
    • DB
      • Connecter
      • Drivers
      • SQLAssembler
    • Exception
    • Http
    • I
    • Lib
      • Document
    • Module
    • MVC
    • Runtime
  • None

Classes

  • Annotate
  • Application
  • ArrayMap
  • Config
  • CrossArray
  • Delegate
  • FrameBase
  • Helper
  • HttpAuth
  • Loader
  • Rest
  • Router

Class ArrayMap

ArrayIterator implements Iterator, Traversable, ArrayAccess, SeekableIterator, Serializable, Countable
Extended by Cross\Core\ArrayMap
Namespace: Cross\Core
Package: Cross\Core
Author:

wonli wonli@live.com Class ArrayMap


Located at Core/ArrayMap.php

Methods summary

public
# __construct( array $array = array() )

构造函数

构造函数

Parameters

$array

Overrides

ArrayIterator::__construct
public static Cross\Core\ArrayMap
# init( $array )

实例化类

实例化类

Parameters

$array

Returns

Cross\Core\ArrayMap
public mixed
# __get( $index )

_get

_get

Parameters

$index

Returns

mixed
public
# __set( $index, $value )

设置

设置

Parameters

$index
$value
public boolean
# __isset( $index )

值是否存在

值是否存在

Parameters

$index

Returns

boolean
public
# __unset( $index )

清空值

清空值

Parameters

$index
public array
# toArray( array $array = array() )

转换为数组

转换为数组

Parameters

$array

Returns

array
public mixed
# __toString( )

输出字符串

输出字符串

Returns

mixed
public string
# json( )

输出为json

输出为json

Returns

string
public
# put( $index, $value )

设置值

设置值

Parameters

$index
$value
public
# set( $index, $value )

Parameters

$index
$value

See

Cross\Core\ArrayMap::put()
public array|boolean|mixed
# get( $index, null $key = null )

获取值

  • $index为字符串的时候 获取配置数组,此时设定$key 则获取数组中指定项的值
  • $index为数组的时候 获取数组中指定的配置项

获取值

  • $index为字符串的时候 获取配置数组,此时设定$key 则获取数组中指定项的值
  • $index为数组的时候 获取数组中指定的配置项

Parameters

$index
$key

Returns

array|boolean|mixed

Methods inherited from ArrayIterator

append(), asort(), count(), current(), getArrayCopy(), getFlags(), key(), ksort(), natcasesort(), natsort(), next(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), rewind(), seek(), serialize(), setFlags(), uasort(), uksort(), unserialize(), valid()

Constants summary

Constants inherited from ArrayIterator

ARRAY_AS_PROPS, STD_PROP_LIST

CrossPHP API documentation generated by ApiGen