propel-adapter
[ class tree: propel-adapter ] [ index: propel-adapter ] [ all elements ]

Source for file DBNone.php

Documentation is available at DBNone.php

  1. <?php
  2.  
  3. /*
  4.  *  $Id: DBNone.php 521 2007-01-05 13:29:36Z heltem $
  5.  *
  6.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  7.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  8.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  9.  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  10.  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  11.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  12.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  13.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  14.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  15.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  16.  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  17.  *
  18.  * This software consists of voluntary contributions made by many individuals
  19.  * and is licensed under the LGPL. For more information please see
  20.  * <http://propel.phpdb.org>.
  21.  */
  22.  
  23. /**
  24.  * This DatabaseHandler is used when you do not have a database
  25.  * installed.
  26.  *
  27.  * @author     Hans Lellelid <hans@xmpl.org> (Propel)
  28.  * @author     Jon S. Stevens <jon@clearink.com> (Torque)
  29.  * @author     Brett McLaughlin <bmclaugh@algx.net> (Torque)
  30.  * @version    $Revision: 521 $
  31.  * @package    propel.adapter
  32.  */
  33. class DBNone extends DBAdapter {
  34.  
  35.     /**
  36.      * @see        DBAdapter::init()
  37.      */
  38.     public function init($url$username$password)
  39.     {
  40.     }
  41.  
  42.     /**
  43.      * This method is used to ignore case.
  44.      *
  45.      * @param      in The string to transform to upper case.
  46.      * @return     The upper case string.
  47.      */
  48.     public function toUpperCase($in)
  49.     {
  50.         return $in;
  51.     }
  52.  
  53.     /**
  54.      * This method is used to ignore case.
  55.      *
  56.      * @param      in The string whose case to ignore.
  57.      * @return     The string in a case that can be ignored.
  58.      */
  59.     public function ignoreCase($in)
  60.     {
  61.         return $in;
  62.     }
  63.  
  64.     /**
  65.      * Returns SQL which concatenates the second string to the first.
  66.      *
  67.      * @param      string String to concatenate.
  68.      * @param      string String to append.
  69.      * @return     string 
  70.      */
  71.     public function concatString($s1$s2)
  72.     {
  73.         return ($s1 $s2);
  74.     }
  75.  
  76.     /**
  77.      * Returns SQL which extracts a substring.
  78.      *
  79.      * @param      string String to extract from.
  80.      * @param      int Offset to start from.
  81.      * @param      int Number of characters to extract.
  82.      * @return     string 
  83.      */
  84.     public function subString($s$pos$len)
  85.     {
  86.         return substr($s$pos$len);
  87.     }
  88.  
  89.     /**
  90.      * Returns SQL which calculates the length (in chars) of a string.
  91.      *
  92.      * @param      string String to calculate length of.
  93.      * @return     string 
  94.      */
  95.     public function strLength($s)
  96.     {
  97.         return strlen($s);
  98.     }
  99.  
  100. }

Documentation generated on Thu, 22 Nov 2007 03:33:41 +0000 by phpDocumentor 1.4.0