Transactd PHP ORM 1.5.0
  • Namespace
  • Class

Namespaces

  • None
  • Transactd
    • boot
      • Laravel

Classes

  • AggregateFunction
  • CachedQueryExecuter
  • Collection
  • CollectionIterator
  • DatabaseManager
  • Model
  • QueryAdapter
  • QueryExecuter
  • Relation
  • TableForwordIterator
  • TableIterator
  • TableReverseIterator

Traits

  • JsonSerializable

Exceptions

  • IOException
  • ModelNotFoundException
  • ModelUserCancelException

Class Collection

Transactd\Collection implements ArrayAccess, Countable, IteratorAggregate uses Transactd\JsonSerializable
Namespace: Transactd
Located at Collection.php

Methods summary

public
# __construct( array $array = null, Transactd\Relation $rel = null, object $parent = null )

Parameters

$array
$rel
$parent
public
# clear( )

Remove all items.

Remove all items.

public Transactd\CollectionIterator
# getIterator( )

Returns

Transactd\CollectionIterator

Implementation of

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

Parameters

$offset

Returns

boolean

Implementation of

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

Parameters

$offset

Returns

object

Implementation of

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

Parameters

$offset
$value

Implementation of

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

Parameters

$offset

Implementation of

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

Returns

integer

Implementation of

Countable::count()
public Transactd\CollectionIterator
# range( integer $start = null, integer $end = null )

Parameters

$start
$end

Returns

Transactd\CollectionIterator
public object[]
# getNativeArray( )

Returns

object[]
public
# setNativeArray( array $a )

Parameters

$a
public
# insert( integer $index, object $child )

Parameters

$index
$child

Throws

InvalidArgumentException
public
# add( object $childs )

Parameters

$childs

Throws

InvalidArgumentException
public
# remove( integer $index )

Remove specified index item. Remove only from the collection, no database access.

Remove specified index item. Remove only from the collection, no database access.

Parameters

$index

Throws

OutOfRangeException
public boolean
# delete( null|integer $options = null )

For models items only

For models items only

Parameters

$options

Returns

boolean

Throw

IOException
public boolean
# save( null|integer $options = null )

For models items only

For models items only

Parameters

$options

Returns

boolean

Throw

BadMethodCallException, IOException
public
# setRelation( Transactd\Relation $rel )

Parameters

$rel
public
# setParent( Trnasactd\Model $parent )

Parameters

$parent
public
# renumber( string $fieldName )

Parameters

$fieldName
public
# move( integer $index, integer $destIndex )

Parameters

$index
$destIndex
public
# loadRelations( string|string[] $funcNames )

Parameters

$funcNames

Methods used from Transactd\JsonSerializable

assign(), chengeObjectType(), createInstance(), deSerializeFromJson(), fromJson(), getClassName(), serializeToJson(), toJson(), toString()

Constants summary

integer SAVE_WITHOUT_DELETE
# 0
integer SAVE_AFTER_DELETE_ITEMS

At the time of the preservation of the collection acquired in HasMany, save after delete them from the database.

At the time of the preservation of the collection acquired in HasMany, save after delete them from the database.

# 2
integer DELETE_LOGICAL_ITEMS

At the time of the preservation of the collection acquired in HasMany, save after delete objects by relation conditions, from the database.

At the time of the preservation of the collection acquired in HasMany, save after delete objects by relation conditions, from the database.

# 4
integer SAVE_ALL_BY_INSERT

Items are insert all, and use bulkInsert. Can not be combined with other options.

Items are insert all, and use bulkInsert. Can not be combined with other options.

# 8

Properties summary

public integer $saveOprions
# 6

Properties used from Transactd\JsonSerializable

$className

Transactd PHP ORM 1.5.0 API documentation generated by ApiGen