source: pro-violet-viettel/sourcecode/api.violet.vn/www/plugins/sfPropel13Plugin/lib/vendor/propel/adapter/DBNone.php

Last change on this file was 289, checked in by dungnv, 11 years ago
File size: 2.7 KB
Line 
1<?php
2
3/*
4 *  $Id: DBNone.php 898 2008-01-02 00:18:44Z hans $
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 adapter  is used when you do not have a database installed.
25 *
26 * @author     Hans Lellelid <hans@xmpl.org> (Propel)
27 * @author     Jon S. Stevens <jon@clearink.com> (Torque)
28 * @author     Brett McLaughlin <bmclaugh@algx.net> (Torque)
29 * @version    $Revision: 898 $
30 * @package    propel.adapter
31 */
32class DBNone extends DBAdapter {
33
34        /**
35         * @see        DBAdapter::initConnection()
36         */
37        public function initConnection(PDO $con, array $settings)
38        {
39        }
40
41        /**
42         * This method is used to ignore case.
43         *
44         * @param      in The string to transform to upper case.
45         * @return     The upper case string.
46         */
47        public function toUpperCase($in)
48        {
49                return $in;
50        }
51
52        /**
53         * This method is used to ignore case.
54         *
55         * @param      in The string whose case to ignore.
56         * @return     The string in a case that can be ignored.
57         */
58        public function ignoreCase($in)
59        {
60                return $in;
61        }
62
63        /**
64         * Returns SQL which concatenates the second string to the first.
65         *
66         * @param      string String to concatenate.
67         * @param      string String to append.
68         * @return     string
69         */
70        public function concatString($s1, $s2)
71        {
72                return ($s1 . $s2);
73        }
74
75        /**
76         * Returns SQL which extracts a substring.
77         *
78         * @param      string String to extract from.
79         * @param      int Offset to start from.
80         * @param      int Number of characters to extract.
81         * @return     string
82         */
83        public function subString($s, $pos, $len)
84        {
85                return substr($s, $pos, $len);
86        }
87
88        /**
89         * Returns SQL which calculates the length (in chars) of a string.
90         *
91         * @param      string String to calculate length of.
92         * @return     string
93         */
94        public function strLength($s)
95        {
96                return strlen($s);
97        }
98
99}
Note: See TracBrowser for help on using the repository browser.