PHPLinq
[ class tree: PHPLinq ] [ index: PHPLinq ] [ all elements ]

Class: PHPLinq_LinqToObjects

Source Location: /PHPLinq/LinqToObjects.php

Class Overview


PHPLinq_LinqToObjects


Author(s):

Copyright:

  • Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq)

Implements interfaces:

Variables

Methods



Class Details

[line 55]
PHPLinq_LinqToObjects

PHPLinq_LinqToObjects




Tags:

copyright:  Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq)


[ Top ]


Class Variables

$_childProviders = array()

[line 138]

Child PHPLinq_ILinqProvider instances, used with join conditions

Child PHPLinq_ILinqProvider instances, used with join conditions




Tags:

access:  private

Type:   PHPLinq_ILinqProvider[]


[ Top ]

$_data =  null

[line 68]

Data source

Data source




Tags:

access:  private

Type:   mixed


[ Top ]

$_distinct =  null

[line 117]

Distinct expression

Distinct expression




Tags:

access:  private

Type:   PHPLinq_Expression


[ Top ]

$_from =  ''

[line 61]

Default variable name

Default variable name




Tags:

access:  private

Type:   string


[ Top ]

$_isDestructing =

[line 152]

Is object destructing?

Is object destructing?




Tags:

access:  private

Type:   bool


[ Top ]

$_joinCondition =  null

[line 145]

Join condition

Join condition




Tags:

access:  private

Type:   PHPLinq_Expression


[ Top ]

$_ofType =  null

[line 124]

OfType expression

OfType expression




Tags:

access:  private

Type:   PHPLinq_Expression


[ Top ]

$_orderBy = array()

[line 110]

OrderBy expressions

OrderBy expressions




Tags:

access:  private

Type:   PHPLinq_Expression[]


[ Top ]

$_parentProvider =  null

[line 131]

Parent PHPLinq_ILinqProvider instance, used with join conditions

Parent PHPLinq_ILinqProvider instance, used with join conditions




Tags:

access:  private



[ Top ]

$_skip =  null

[line 89]

Skip n elements

Skip n elements




Tags:

access:  private

Type:   int?


[ Top ]

$_skipWhile =  null

[line 103]

Skip while expression is true

Skip while expression is true




Tags:

access:  private

Type:   PHPLinq_Expression


[ Top ]

$_take =  null

[line 82]

Take n elements

Take n elements




Tags:

access:  private

Type:   int?


[ Top ]

$_takeWhile =  null

[line 96]

Take while expression is true

Take while expression is true




Tags:

access:  private

Type:   PHPLinq_Expression


[ Top ]

$_where =  null

[line 75]

Where expression

Where expression




Tags:

access:  private

Type:   PHPLinq_Expression


[ Top ]



Class Methods


static method handles [line 160]

static bool handles( mixed $source)

Can this provider type handle data in $source?

Can this provider type handle data in $source?




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::handles()
Can this provider type handle data in $source?

Parameters:

mixed   $source  

[ Top ]

constructor __construct [line 171]

PHPLinq_ILinqProvider __construct( string $name, [PHPLinq_ILinqProvider $parentProvider = null])

Create a new class instance

Create a new class instance




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::__construct()
Create a new class instance

Parameters:

string   $name  
PHPLinq_ILinqProvider   $parentProvider   Optional parent PHPLinq_ILinqProvider instance, used with join conditions

[ Top ]

destructor __destruct [line 185]

void __destruct( )

Class destructor

Class destructor




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::__destruct()
Class destructor
[ Top ]

method addChildProvider [line 228]

void addChildProvider( PHPLinq_ILinqProvider $provider)

Add child provider, used with joins

Add child provider, used with joins




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::addChildProvider()
Add child provider, used with joins

Parameters:

PHPLinq_ILinqProvider   $provider  

[ Top ]

method aggregate [line 858]

mixed aggregate( [int $seed = 0], string $expression)

Aggregate

Aggregate Example: Equivalent of count(): $this->aggregate(0, '$s, $t => $s + 1');




Tags:

return:  aggregate
access:  public



Implementation of:
PHPLinq_ILinqProvider::aggregate()
Aggregate

Parameters:

int   $seed   Seed
string   $expression   Expression defining the aggregate

[ Top ]

method all [line 623]

boolean all( string $expression)

All

All




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::all()
All

Parameters:

string   $expression   Expression checking if an all elements are contained

[ Top ]

method any [line 607]

boolean any( string $expression)

Any

Any




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::any()
Any

Parameters:

string   $expression   Expression checking if an element is contained

[ Top ]

method average [line 845]

mixed average( )

Average of elements

Average of elements




Tags:

return:  Average of elements
access:  public



Implementation of:
PHPLinq_ILinqProvider::average()
Average of elements
[ Top ]

method concat [line 695]

PHPLinq_ILinqProvider concat( mixed $source)

Concatenate data

Concatenate data




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::concat()
Concatenate data

Parameters:

mixed   $source  

[ Top ]

method contains [line 639]

boolean contains( mixed $element)

Contains

Contains




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::contains()
Contains

Parameters:

mixed   $element   Is the $element contained?

[ Top ]

method count [line 809]

int count( )

Count elements

Count elements




Tags:

return:  Element count
access:  public



Implementation of:
PHPLinq_ILinqProvider::count()
Count elements
[ Top ]

method distinct [line 560]

PHPLinq_ILinqProvider distinct( string $expression)

Distinct

Distinct




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::distinct()
Distinct

Parameters:

string   $expression   Expression to retrieve the key value.

[ Top ]

method elementAt [line 660]

mixed elementAt( [mixed $index = null])

Element at index

Element at index




Tags:

return:  Element at $index
access:  public



Implementation of:
PHPLinq_ILinqProvider::elementAt()
Element at index

Parameters:

mixed   $index   Index

[ Top ]

method elementAtOrDefault [line 680]

mixed elementAtOrDefault( [mixed $index = null], [mixed $defaultValue = null])

Element at index or default

Element at index or default




Tags:

return:  Element at $index
access:  public



Implementation of:
PHPLinq_ILinqProvider::elementAtOrDefault()
Element at index or default

Parameters:

mixed   $index   Index
mixed   $defaultValue   Default value to return if nothing is found

[ Top ]

method first [line 706]

mixed first( [string $expression = null])

First

First




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::first()
First

Parameters:

string   $expression   Expression which creates a resulting element

[ Top ]

method firstOrDefault [line 722]

mixed firstOrDefault( [string $expression = null], [mixed $defaultValue = null])

FirstOrDefault

FirstOrDefault




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::firstOrDefault()
FirstOrDefault

Parameters:

string   $expression   Expression which creates a resulting element
mixed   $defaultValue   Default value to return if nothing is found

[ Top ]

method getFromName [line 237]

string getFromName( )

Retrieve "from" name

Retrieve "from" name




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::getFromName()
Retrieve "from" name
[ Top ]

method getJoinCondition [line 219]

PHPLinq_Expression getJoinCondition( )

Get join condition

Get join condition




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::getJoinCondition()
Get join condition
[ Top ]

method getSource [line 246]

mixed getSource( )

Retrieve data in data source

Retrieve data in data source




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::getSource()
Retrieve data in data source
[ Top ]

method in [line 256]

PHPLinq_ILinqProvider in( mixed $source)

Set source of data

Set source of data




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::in()
Set source of data

Parameters:

mixed   $source  

[ Top ]

method join [line 789]

PHPLinq_Initiator join( string $name)

Join

Join




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::join()
Join

Parameters:

string   $name  

[ Top ]

method last [line 737]

mixed last( [string $expression = null])

Last

Last




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::last()
Last

Parameters:

string   $expression   Expression which creates a resulting element

[ Top ]

method lastOrDefault [line 753]

mixed lastOrDefault( [string $expression = null], [mixed $defaultValue = null])

LastOrDefault

LastOrDefault




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::lastOrDefault()
LastOrDefault

Parameters:

string   $expression   Expression which creates a resulting element
mixed   $defaultValue   Default value to return if nothing is found

[ Top ]

method max [line 836]

mixed max( )

Maximum of elements

Maximum of elements




Tags:

return:  Maximum of elements
access:  public



Implementation of:
PHPLinq_ILinqProvider::max()
Maximum of elements
[ Top ]

method min [line 827]

mixed min( )

Minimum of elements

Minimum of elements




Tags:

return:  Minimum of elements
access:  public



Implementation of:
PHPLinq_ILinqProvider::min()
Minimum of elements
[ Top ]

method ofType [line 570]

void ofType( string $type)

Select the elements of a certain type

Select the elements of a certain type




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::ofType()
Select the elements of a certain type

Parameters:

string   $type   Type name

[ Top ]

method on [line 799]

PHPLinq_ILinqProvider on( string $expression)

On

On




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::on()
On

Parameters:

string   $expression   Expression representing join condition

[ Top ]

method orderBy [line 513]

PHPLinq_ILinqProvider orderBy( string $expression, [string $comparer = null])

OrderBy

OrderBy




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::orderBy()
OrderBy

Parameters:

string   $expression   Expression to order elements by
string   $comparer   Comparer function (taking 2 arguments, returning -1, 0, 1)

[ Top ]

method orderByDescending [line 525]

PHPLinq_ILinqProvider orderByDescending( string $expression, [string $comparer = null])

OrderByDescending

OrderByDescending




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::orderByDescending()
OrderByDescending

Parameters:

string   $expression   Expression to order elements by
string   $comparer   Comparer function (taking 2 arguments, returning -1, 0, 1)

[ Top ]

method reverse [line 649]

PHPLinq_ILinqProvider reverse( [bool $preserveKeys = null])

Reverse elements

Reverse elements




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::reverse()
Reverse elements

Parameters:

bool   $preserveKeys   Preserve keys?

[ Top ]

method select [line 267]

mixed select( [string $expression = null])

Select

Select




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::select()
Select

Parameters:

string   $expression   Expression which creates a resulting element

[ Top ]

method single [line 768]

mixed single( [string $expression = null])

Single

Single




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::single()
Single

Parameters:

string   $expression   Expression which creates a resulting element

[ Top ]

method singleOrDefault [line 779]

mixed singleOrDefault( [string $expression = null], [mixed $defaultValue = null])

SingleOrDefault

SingleOrDefault




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::singleOrDefault()
SingleOrDefault

Parameters:

string   $expression   Expression which creates a resulting element
mixed   $defaultValue   Default value to return if nothing is found

[ Top ]

method skip [line 479]

PHPLinq_ILinqProvider skip( int $n)

Skip $n elements

Skip $n elements




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::skip()
Skip $n elements

Parameters:

int   $n  

[ Top ]

method skipWhile [line 501]

PHPLinq_ILinqProvider skipWhile( string $expression)

Skip elements while $expression evaluates to true

Skip elements while $expression evaluates to true




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::skipWhile()
Skip elements while $expression evaluates to true

Parameters:

string   $expression   Expression to evaluate

[ Top ]

method sum [line 818]

mixed sum( )

Sum elements

Sum elements




Tags:

return:  Sum of elements
access:  public



Implementation of:
PHPLinq_ILinqProvider::sum()
Sum elements
[ Top ]

method take [line 468]

PHPLinq_ILinqProvider take( int $n)

Take $n elements

Take $n elements




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::take()
Take $n elements

Parameters:

int   $n  

[ Top ]

method takeWhile [line 490]

PHPLinq_ILinqProvider takeWhile( string $expression)

Take elements while $expression evaluates to true

Take elements while $expression evaluates to true




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::takeWhile()
Take elements while $expression evaluates to true

Parameters:

string   $expression   Expression to evaluate

[ Top ]

method thenBy [line 537]

PHPLinq_ILinqProvider thenBy( string $expression, [string $comparer = null])

ThenBy

ThenBy




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::thenBy()
ThenBy

Parameters:

string   $expression   Expression to order elements by
string   $comparer   Comparer function (taking 2 arguments, returning -1, 0, 1)

[ Top ]

method thenByDescending [line 549]

PHPLinq_ILinqProvider thenByDescending( string $expression, [string $comparer = null])

ThenByDescending

ThenByDescending




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::thenByDescending()
ThenByDescending

Parameters:

string   $expression   Expression to order elements by
string   $comparer   Comparer function (taking 2 arguments, returning -1, 0, 1)

[ Top ]

method where [line 457]

PHPLinq_ILinqProvider where( string $expression)

Where

Where




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::where()
Where

Parameters:

string   $expression   Expression checking if an element should be contained

[ Top ]

method __isDestructing [line 210]

bool __isDestructing( )

Is object destructing?

Is object destructing?




Tags:

access:  public



Implementation of:
PHPLinq_ILinqProvider::__isDestructing()
Is object destructing?
[ Top ]


Documentation generated on Tue, 27 Jan 2009 08:29:27 +0100 by phpDocumentor 1.4.1