[ Index ] |
|
Code source de Symfony 1.0.0 |
1 <?php 2 3 /* 4 * $Id: SqliteDataSQLBuilder.php 137 2005-11-17 14:11:19Z fabien $ 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/engine/builder/sql/DataSQLBuilder.php'; 24 25 /** 26 * SQLite class for building data dump SQL. 27 * 28 * @author Hans Lellelid <hans@xmpl.org> 29 * @package propel.engine.builder.sql.sqlite 30 */ 31 class SqliteDataSQLBuilder extends DataSQLBuilder { 32 33 /** 34 * Returns string processed by sqlite_udf_encode_binary() to ensure that binary contents will be handled correctly by sqlite. 35 * @param mixed $blob Blob or string 36 * @return string encoded text 37 */ 38 protected function getBlobSql($blob) 39 { 40 // they took magic __toString() out of PHP5.0.0; this sucks 41 if (is_object($blob)) { 42 $blob = $blob->__toString(); 43 } 44 return "'" . sqlite_udf_encode_binary($blob) . "'"; 45 } 46 47 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |