AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Traversables
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • SmartObj

Class SmartObj

Some smarter array functions. This is a very work-in-progress class.

Alo\Traversables\SmartObjimplementsIteratorAggregate,ArrayAccess,Countable

Direct known subclasses

Alo\Locale

Namespace:Alo\Traversables
Author:Art <a.molcanovas@gmail.com>
Located atsys/class/alo/traversables/smartobj.php

Methods summary

public
#__construct(array$initial= [])

Initialises our smart array-based object

Initialises our smart array-based object

Parameters

$initial
array
$initial The initial array to set

Author

Art <a.molcanovas@gmail.com>
public integer
#count( )

Returns the number of items in the data object

Returns the number of items in the data object

Returns

integer

Author

Art <a.molcanovas@gmail.com>

Implementation of

Countable::count()
public staticAlo\Traversables\SmartObj
#smartObj(array$initial= [])

Initialises our smart array-based object

Initialises our smart array-based object

Parameters

$initial
array
$initial The initial array to set

Returns

Alo\Traversables\SmartObj

Author

Art <a.molcanovas@gmail.com>
public mixed
#__get(string$k)

Returns an array value

Returns an array value

Parameters

$k
string
$k The value's key

Returns

mixed

Author

Art <a.molcanovas@gmail.com>
public
#__set(string$k,mixed$v)

Sets an array value

Sets an array value

Parameters

$k
string
$k The key
$v
mixed
$v The value

Author

Art <a.molcanovas@gmail.com>
public array
#toArray( )

Returns the data set

Returns the data set

Returns

array

Author

Art <a.molcanovas@gmail.com>
publicAlo\Traversables\SmartObj
#uniqueRecursive( )

Removes all the duplicate values from an array

Removes all the duplicate values from an array

Returns

Alo\Traversables\SmartObj

Author

Art <a.molcanovas@gmail.com>
protected
#uniqueRecursiveInternal(array& $curr)

Internal handler for uniquefyRecursively

Internal handler for uniquefyRecursively

Parameters

$curr
array
$curr Reference to the currently processed step

Author

Art <a.molcanovas@gmail.com>
publicArrayIterator
#getIterator( )

Returns the array iterator for our data

Returns the array iterator for our data

Returns

ArrayIterator

Author

Art <a.molcanovas@gmail.com>

Implementation of

IteratorAggregate::getIterator()
public boolean
#offsetExists(mixed$offset)

Checks whether a offset exists

Checks whether a offset exists

Parameters

$offset
mixed
$offset An offset to check for.

Returns

boolean

Author

Art <a.molcanovas@gmail.com>

Link

http://php.net/manual/en/arrayaccess.offsetexists.php

Implementation of

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

Gets an offset

Gets an offset

Parameters

$offset
mixed
$offset The offset to retrieve.

Returns

mixed

Author

Art <a.molcanovas@gmail.com>

Link

http://php.net/manual/en/arrayaccess.offsetget.php

Implementation of

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

Sets an offset

Sets an offset

Parameters

$offset
mixed
$offset The offset to assign the value to.
$value
mixed
$value The value to set.

Author

Art <a.molcanovas@gmail.com>

Link

http://php.net/manual/en/arrayaccess.offsetset.php

Implementation of

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

Unsets an offset

Unsets an offset

Parameters

$offset
mixed
$offset The offset to unset.

Author

Art <a.molcanovas@gmail.com>

Link

http://php.net/manual/en/arrayaccess.offsetunset.php

Implementation of

ArrayAccess::offsetUnset()

Magic methods summary

Properties summary

protected array$data
#

The array we're working with

The array we're working with

AloFramework documentation API documentation generated byApiGen 2.8.0