Source for file ILinqProvider.php
Documentation is available at ILinqProvider.php
* Copyright (c) 2008 - 2009 PHPLinq
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* @copyright Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq)
* @license http://www.gnu.org/licenses/lgpl.txt LGPL
* @version 0.4.0, 2009-01-27
* @copyright Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq)
* Can this provider type handle data in $source?
public static function handles($source);
* Create a new class instance
* @param PHPLinq_ILinqProvider $parentProvider Optional parent PHPLinq_ILinqProvider instance, used with join conditions
* @return PHPLinq_ILinqProvider
public function __construct($name, PHPLinq_ILinqProvider $parentProvider = null);
* @return PHPLinq_Expression
* Add child provider, used with joins
* @param PHPLinq_ILinqProvider $provider
* Retrieve data in data source
* @return PHPLinq_ILinqProvider
public function in($source);
* @param string $expression Expression which creates a resulting element
public function select($expression = null);
public function selectMany();
* @param string $expression Expression checking if an element should be contained
* @return PHPLinq_ILinqProvider
public function where($expression);
* @return PHPLinq_Initiator
public function join($name);
* @param string $expression Expression representing join condition
* @return PHPLinq_ILinqProvider
public function on($expression);
public function groupJoin();
* @return PHPLinq_ILinqProvider
public function take($n);
* Take elements while $expression evaluates to true
* @param string $expression Expression to evaluate
* @return PHPLinq_ILinqProvider
* @return PHPLinq_ILinqProvider
public function skip($n);
* Skip elements while $expression evaluates to true
* @param string $expression Expression to evaluate
* @return PHPLinq_ILinqProvider
* Select the elements of a certain type
* @param string $type Type name
public function ofType($type);
* @return PHPLinq_ILinqProvider
public function concat($source);
* @param string $expression Expression to order elements by
* @param string $comparer Comparer function (taking 2 arguments, returning -1, 0, 1)
* @return PHPLinq_ILinqProvider
public function orderBy($expression, $comparer = null);
* @param string $expression Expression to order elements by
* @param string $comparer Comparer function (taking 2 arguments, returning -1, 0, 1)
* @return PHPLinq_ILinqProvider
* @param string $expression Expression to order elements by
* @param string $comparer Comparer function (taking 2 arguments, returning -1, 0, 1)
* @return PHPLinq_ILinqProvider
public function thenBy($expression, $comparer = null);
* @param string $expression Expression to order elements by
* @param string $comparer Comparer function (taking 2 arguments, returning -1, 0, 1)
* @return PHPLinq_ILinqProvider
* @param bool $preserveKeys Preserve keys?
* @return PHPLinq_ILinqProvider
public function reverse($preserveKeys = null);
public function groupBy();
* @param string $expression Expression to retrieve the key value.
* @return PHPLinq_ILinqProvider
public function intersect();
public function except();
public function equalAll();
* @param string $expression Expression which creates a resulting element
public function first($expression = null);
* @param string $expression Expression which creates a resulting element
* @param mixed $defaultValue Default value to return if nothing is found
public function firstOrDefault ($expression = null, $defaultValue = null);
* @param string $expression Expression which creates a resulting element
public function last($expression = null);
* @param string $expression Expression which creates a resulting element
* @param mixed $defaultValue Default value to return if nothing is found
public function lastOrDefault ($expression = null, $defaultValue = null);
* @param string $expression Expression which creates a resulting element
public function single($expression = null);
* @param string $expression Expression which creates a resulting element
* @param mixed $defaultValue Default value to return if nothing is found
public function singleOrDefault ($expression = null, $defaultValue = null);
* @param mixed $index Index
* @return mixed Element at $index
* Element at index or default
* @param mixed $index Index
* @param mixed $defaultValue Default value to return if nothing is found
* @return mixed Element at $index
* @param string $expression Expression checking if an element is contained
public function any($expression);
* @param string $expression Expression checking if an all elements are contained
public function all($expression);
* @param mixed $element Is the $element contained?
* @return int Element count
* @return mixed Sum of elements
* @return mixed Minimum of elements
* @return mixed Maximum of elements
* @return mixed Average of elements
* @param string $expression Expression defining the aggregate
* @return mixed aggregate
public function aggregate($seed = 0, $expression);
|