Overview

Packages

  • Pinoco
    • PAL

Classes

  • Pinoco
  • Pinoco_Delegate
  • Pinoco_DynamicVars
  • Pinoco_HttpRequestVars
  • Pinoco_List
  • Pinoco_MIMEType
  • Pinoco_NativeRenderer
  • Pinoco_NothingVars
  • Pinoco_NullRenderer
  • Pinoco_OptionalParam
  • Pinoco_Pagination
  • Pinoco_PDOStatementWrapper
  • Pinoco_PDOWrapper
  • Pinoco_Renderer
  • Pinoco_Router
  • Pinoco_TALRenderer
  • Pinoco_TestEnvironment
  • Pinoco_Validator
  • Pinoco_ValidatorContext
  • Pinoco_Vars

Interfaces

  • Pinoco_ArrayConvertible

Functions

  • __pinoco_autoload_impl
  • Overview
  • Package
  • Class
  • Tree

Class Pinoco_Vars

Variable model

Pinoco_Vars implements IteratorAggregate, ArrayAccess, Countable, Pinoco_ArrayConvertible

Direct known subclasses

Pinoco_DynamicVars, Pinoco_NothingVars, Pinoco_TestEnvironment

Indirect known subclasses

Pinoco, Pinoco_HttpRequestVars, Pinoco_Pagination, Pinoco_Validator, Pinoco_ValidatorContext
Package: Pinoco
Copyright: Copyright 2010-2012, Hisateru Tanaka <tanakahisateru@gmail.com>
License: License (http://www.opensource.org/licenses/mit-license.php)
Author: Hisateru Tanaka <tanakahisateru@gmail.com>
Located at Pinoco/Vars.php
Methods summary
public
# __construct( )

Constructor to make an empty instance.

Constructor to make an empty instance.

public static Pinoco_Vars
# fromArray( mixed $src )

Makes a new object from Array.

Makes a new object from Array.

Parameters

$src
mixed
$src

Returns

Pinoco_Vars

Implementation of

Pinoco_ArrayConvertible::fromArray()
public static Pinoco_Vars
# wrap( array & $srcref )

Wraps an existing Array.

Wraps an existing Array.

Parameters

$srcref
array
&$srcref

Returns

Pinoco_Vars

Throws

InvalidArgumentException

Implementation of

Pinoco_ArrayConvertible::wrap()
public mixed
# get( string $name, mixed $default = Pinoco_OptionalParam::UNSPECIFIED )

Returns a value or default by name.

Returns a value or default by name.

Parameters

$name
string
$name
$default
mixed
$default

Returns

mixed

Implementation of

Pinoco_ArrayConvertible::get()
public mixed
# rget( string $expression, mixed $default = Pinoco_OptionalParam::UNSPECIFIED )

Returns a value or default by tree expression.

Returns a value or default by tree expression.

Parameters

$expression
string
$expression
$default
mixed
$default

Returns

mixed

Implementation of

Pinoco_ArrayConvertible::rget()
public boolean
# has( string $name )

Checks if this object has certain property or not. If "setloose" is set as true then it returns true always.

Checks if this object has certain property or not. If "setloose" is set as true then it returns true always.

Parameters

$name
string
$name

Returns

boolean
public Pinoco_List
# keys( )

Returns all property names in this object. Elements of returned list are sorted by its name.

Returns all property names in this object. Elements of returned list are sorted by its name.

Returns

Pinoco_List
public Pinoco_List
# values( )

Returns values of all properties in this object. Values are sorted by its key name.

Returns values of all properties in this object. Values are sorted by its key name.

Returns

Pinoco_List
public
# __get( mixed $name )
public
# set( string $name, mixed $value )

Sets a value to this object as given name.

Sets a value to this object as given name.

Parameters

$name
string
$name
$value
mixed
$value
public
# registerAsMethod( string $name, callable $callable )

Extends existing instance with any callable object. The instance would be passed to the 1st argument of callback, then trailing arguments are filled as is, just like Python's OOP.

Extends existing instance with any callable object. The instance would be passed to the 1st argument of callback, then trailing arguments are filled as is, just like Python's OOP.

Parameters

$name
string
$name
$callable
callable
$callable
public
# registerAsDynamic( string $name, callable $callable, array $context = array() )

Sets a value to this object as given named dynamic value. The callback evaluated every time when fetched.

Sets a value to this object as given named dynamic value. The callback evaluated every time when fetched.

Parameters

$name
string
$name
$callable
callable
$callable
$context
array
$context
public
# registerAsLazy( string $name, callable $callable, array $context = array() )

Sets a value to this object as given named lazy value. The callback evaluated as one-shot.

Sets a value to this object as given named lazy value. The callback evaluated as one-shot.

Parameters

$name
string
$name
$callable
callable
$callable
$context
array
$context
public
# markAsDirty( string $name )

Clear lazy property's internal cache. It would be regenerated at the next fetching.

Clear lazy property's internal cache. It would be regenerated at the next fetching.

Parameters

$name
string
$name
public
# setDefault( mixed $value )

Sets a default value for non existence property access.

Sets a default value for non existence property access.

Parameters

$value
mixed
$value
public
# setLoose( boolean $flag )

Makes has() result always true.

Makes has() result always true.

Parameters

$flag
boolean
$flag
public
# remove( string $name )

Removes a property by name.

Removes a property by name.

Parameters

$name
string
$name
public
# __set( mixed $name, mixed $value )
public
# __isset( mixed $name )
public
# __unset( mixed $name )
public
# __call( mixed $name, mixed $arguments )
public integer
# count( )

Returns a number of entries in this object.

Returns a number of entries in this object.

Returns

integer

Implementation of

Countable::count()
public
# getIterator( )

Implementation of

IteratorAggregate::getIterator()
public
# offsetSet( mixed $offset, mixed $value )

Implementation of

ArrayAccess::offsetSet()
public
# offsetExists( mixed $offset )

Implementation of

ArrayAccess::offsetExists()
public
# offsetUnset( mixed $offset )

Implementation of

ArrayAccess::offsetUnset()
public
# offsetGet( mixed $offset )

Implementation of

ArrayAccess::offsetGet()
public array
# toArray( array $filter = null, mixed $default = null, string $modifier = "%s" )

Exports properties to Array.

Exports properties to Array.

Parameters

$filter
array
$filter
$default
mixed
$default
$modifier
string
$modifier

Returns

array

Implementation of

Pinoco_ArrayConvertible::toArray()
public array
# toArrayRecurse( integer $depth = null )

Exports properties to Array recursively.

Exports properties to Array recursively.

Parameters

$depth
integer
$depth

Returns

array

Implementation of

Pinoco_ArrayConvertible::toArrayRecurse()
public
# import( mixed $src, array|boolean $filter = false, mixed $default = null, string $modifier = "%s" )

Imports properties from an array, object or another Vars.

Imports properties from an array, object or another Vars.

Parameters

$src
mixed
$src
$filter
array|boolean
$filter
$default
mixed
$default
$modifier
string
$modifier

Throws

InvalidArgumentException
public
# __toString( )
Pinoco 0.8.0 Documentation API documentation generated by ApiGen 2.8.0