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

Source for file PHPLinq.php

Documentation is available at PHPLinq.php

  1. <?php
  2. /**
  3.  * PHPLinq
  4.  *
  5.  * Copyright (c) 2008 - 2009 PHPLinq
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2.1 of the License, or (at your option) any later version.
  11.  * 
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  * 
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the Free Software
  19.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  20.  *
  21.  * @category   PHPLinq
  22.  * @package    PHPLinq
  23.  * @copyright  Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq)
  24.  * @license    http://www.gnu.org/licenses/lgpl.txt    LGPL
  25.  * @version    0.4.0, 2009-01-27
  26.  */
  27.  
  28.  
  29. /** PHPLinq */
  30. require_once('PHPLinq.php');
  31.  
  32. /** PHPLinq_Exception */
  33. require_once('PHPLinq/Exception.php');
  34.  
  35. /** PHPLinq_ILinqProvider */
  36. require_once('PHPLinq/ILinqProvider.php');
  37.  
  38. /** PHPLinq_Initiator */
  39. require_once('PHPLinq/Initiator.php');
  40.  
  41.  
  42. /**
  43.  * LinqToObjects initiator - Set variable name to use as default
  44.  *
  45.  * @param string $name 
  46.  * @return PHPLinq_Initiator 
  47.  */
  48. function linqfrom($name{
  49.     return new PHPLinq_Initiator($name);
  50. }
  51.  
  52. // Create easy-to-use initiator ("from")
  53. if (!function_exists('from')) {
  54.     /**
  55.      * Set variable name to use as default
  56.      *
  57.      * @param string $name 
  58.      * @return PHPLinq_Initiator 
  59.      */
  60.     function from($name{
  61.         return linqfrom($name);
  62.     }
  63. else {
  64.     error_log('A function with the name "from" already exists. Use linqfrom($name) instead of from($name).'E_NOTICE);
  65. }

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