[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/propel/adapter/ -> DBNone.php (source)

   1  <?php
   2  
   3  /*
   4   *  $Id: DBNone.php 64 2005-05-13 02:43:56Z root $
   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  require_once 'propel/adapter/DBAdapter.php';
  24  
  25  /**
  26   * This DatabaseHandler is used when you do not have a database
  27   * installed.
  28   *
  29   * @author Hans Lellelid <hans@xmpl.org> (Propel)
  30   * @author Jon S. Stevens <jon@clearink.com> (Torque)
  31   * @author Brett McLaughlin <bmclaugh@algx.net> (Torque)
  32   * @version $Revision: 64 $
  33   * @package propel.adapter
  34   */
  35  class DBNone extends DBAdapter {
  36  
  37      /**
  38       * @return null
  39       */
  40      public function getConnection()
  41      {
  42          return null;
  43      }
  44  
  45      /**
  46       * @see DBAdapter::init()
  47       */
  48      public function init($url, $username, $password)
  49      {
  50      }
  51  
  52      /**
  53       * This method is used to ignore case.
  54       *
  55       * @param in The string to transform to upper case.
  56       * @return The upper case string.
  57       */
  58      public function toUpperCase($in)
  59      {
  60          return $in;
  61      }
  62  
  63      /**
  64       * This method is used to ignore case.
  65       *
  66       * @param in The string whose case to ignore.
  67       * @return The string in a case that can be ignored.
  68       */
  69      public function ignoreCase($in)
  70      {
  71          return $in;
  72      }    
  73  
  74      /**
  75       * Returns SQL which concatenates the second string to the first.
  76       *
  77       * @param string String to concatenate.
  78       * @param string String to append.
  79       * @return string 
  80       */
  81      public function concatString($s1, $s2)
  82      {
  83          return ($s1 . $s2);
  84      }
  85  
  86      /**
  87       * Returns SQL which extracts a substring.
  88       *
  89       * @param string String to extract from.
  90       * @param int Offset to start from.
  91       * @param int Number of characters to extract.
  92       * @return string 
  93       */
  94      public function subString($s, $pos, $len)
  95      {
  96          return substr($s, $pos, $len);
  97      }
  98  
  99      /**
 100       * Returns SQL which calculates the length (in chars) of a string.
 101       *
 102       * @param string String to calculate length of.
 103       * @return string 
 104       */
 105      public function strLength($s)
 106      {
 107          return strlen($s);
 108      }
 109   
 110      /**
 111       * Locks the specified table.
 112       *
 113       * @param Connection $con The Creole connection to use.
 114       * @param string $table The name of the table to lock.
 115       * @throws SQLException No Statement could be created or executed.
 116       */
 117      public function lockTable(Connection $con, $table)
 118      {
 119      }
 120  
 121      /**
 122       * Unlocks the specified table.
 123       *
 124       * @param Connection $con The Creole connection to use.
 125       * @param string $table The name of the table to unlock.
 126       * @throws SQLException No Statement could be created or executed.
 127       */
 128      public function unlockTable(Connection $con, $table)
 129      {
 130      }
 131  }


Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7