gedcomx-php-client
  • Namespace
  • Class

Namespaces

  • Gedcomx
    • Agent
    • Atom
    • Common
    • Conclusion
    • Extensions
      • FamilySearch
        • Platform
          • Artifacts
          • Discussions
          • Tree
          • Users
        • Rs
          • Client
            • FamilyTree
            • Helpers
            • Memories
            • Util
        • Rt
        • Types
    • GedcomxFile
    • Links
    • Records
    • Rs
      • Client
        • Exception
        • Options
        • Util
    • Rt
    • Search
    • Source
    • Support
    • Types
    • Util
    • Vocab

Classes

  • Collection
  • Duration
  • FormalDate
  • JsonMapper
  • SimpleDate
  • XmlMapper

Class Collection

Gedcomx\Util\Collection implements ArrayAccess, Countable, IteratorAggregate

Direct known subclasses

Gedcomx\Rs\Client\Util\RdfCollection

Namespace: Gedcomx\Util
Located at Util/Collection.php

Methods summary

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

Create a new collection

Create a new collection

Parameters

$items
public static static
# make( mixed $items )

Create new collection instance

Create new collection instance

Parameters

$items

Returns

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

Parameters

$key
$default

Returns

mixed
public mixed
# getKey( mixed $value, mixed $default = null )

Parameters

$value
$default

Returns

mixed
public mixed
# first( mixed $default = null )

Parameters

$default

Returns

mixed
public boolean
# contains( mixed $value )

Determine if an item exists in the collection

Determine if an item exists in the collection

Parameters

$value

Returns

boolean
public
# each( Closure $callback )

Execute a callback over each item.

Execute a callback over each item.

Parameters

$callback

Returns


$this
public string
# toJson( integer $options = 0 )

json_encode the item array

json_encode the item array

Parameters

$options

Returns

string
public Traversable
# getIterator( )

(PHP 5 >= 5.0.0)
Retrieve an external iterator

(PHP 5 >= 5.0.0)
Retrieve an external iterator

Returns

Traversable

An instance of an object implementing Iterator or Traversable

Link

http://php.net/manual/en/iteratoraggregate.getiterator.php

Implementation of

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

(PHP 5 >= 5.0.0)
Whether a offset exists

(PHP 5 >= 5.0.0)
Whether a offset exists

Parameters

$offset

An offset to check for.

Returns

boolean

true on success or false on failure.

<

p> The return value will be casted to boolean if non-boolean was returned.

Link

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

Implementation of

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

(PHP 5 >= 5.0.0)
Offset to retrieve

(PHP 5 >= 5.0.0)
Offset to retrieve

Parameters

$offset

The offset to retrieve.

Returns

mixed
Can return all value types.

Link

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

Implementation of

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

(PHP 5 >= 5.0.0)
Offset to set

(PHP 5 >= 5.0.0)
Offset to set

Parameters

$offset

The offset to assign the value to.

$value

The value to set.

Link

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

Implementation of

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

(PHP 5 >= 5.0.0)
Offset to unset

(PHP 5 >= 5.0.0)
Offset to unset

Parameters

$offset

The offset to unset.

Link

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

Implementation of

ArrayAccess::offsetUnset()
public integer
# count( )

(PHP 5 >= 5.1.0)
Count elements of an object

(PHP 5 >= 5.1.0)
Count elements of an object

Returns

integer

The custom count as an integer.

<

p> The return value is cast to an integer.

Link

http://php.net/manual/en/countable.count.php

Implementation of

Countable::count()
public array
# toArray( )

Get the array representation of an object

Get the array representation of an object

Returns

array
public mixed
# jsonSerialize( )

(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON

(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON

Returns

mixed

data which can be serialized by json_encode, which is a value of any type other than a resource.

Link

http://php.net/manual/en/jsonserializable.jsonserialize.php
gedcomx-php-client API documentation generated by ApiGen