[ Index ]
 

Code source de Symfony 1.0.0

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

title

Body

[fermer]

/lib/vendor/creole/ -> CallableStatement.php (source)

   1  <?php
   2  /*
   3   *  $Id: CallableStatement.php,v 1.7 2004/03/20 04:16:49 hlellelid Exp $
   4   *
   5   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   6   * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   7   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   8   * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   9   * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  10   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  11   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  12   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  13   * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  14   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  15   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16   *
  17   * This software consists of voluntary contributions made by many individuals
  18   * and is licensed under the LGPL. For more information please see
  19   * <http://creole.phpdb.org>.
  20   */
  21  
  22  require_once 'creole/PreparedStatement.php';
  23  
  24  /**
  25   * Interface for callable statements.
  26   *
  27   * @author    Hans Lellelid <hans@xmpl.org>
  28   * @version   $Revision: 1.7 $
  29   * @package   creole
  30   */
  31  interface CallableStatement extends PreparedStatement {
  32                          
  33      /**
  34       * Register a parameter as an output param.
  35       * @param string $paramIndex The stored procedure param name (e.g. @val1).
  36       * @param int $sqlType The type of the parameter (e.g. Type::BIT)
  37       * @param int $maxLength The maximum expected length (size) of output parameter.
  38       */
  39      public function registerOutParameter($paramIndex, $sqlType, $maxLength = null);
  40      
  41      /**
  42       * 
  43       * @param mixed $paramIndex Parameter name (e.g. "@var1").
  44       * @return array
  45       * @throws SQLException if $paramIndex was not bound as output variable.
  46       */
  47      public function getArray($paramIndex);
  48      
  49      /**
  50       * 
  51       * @param mixed $paramIndex Parameter name (e.g. "@var1").
  52       * @return boolean
  53       * @throws SQLException if $paramIndex was not bound as output variable.
  54       */
  55      public function getBoolean($paramIndex);    
  56              
  57      /**
  58       * 
  59       * @param mixed $paramIndex Parameter name (e.g. "@var1").
  60       * @return Blob blob object
  61       * @throws SQLException if $paramIndex was not bound as output variable.
  62       */
  63      public function getBlob($paramIndex);
  64          
  65      /**
  66       * @param mixed $paramIndex Column name (string) or index (int).
  67       * @return Clob clob object.
  68       */
  69      public function getClob($paramIndex);     
  70      
  71      /**
  72       * Return a formatted date.
  73       * 
  74       * The default format for dates returned is preferred (in your locale, as specified using setlocale()) 
  75       * format w/o time (i.e. strftime("%x", $val)).  Override this by specifying a format second parameter.  You
  76       * can also specify a date()-style formatter; if you do, make sure there are no "%" symbols in your format string.
  77       * 
  78       * @param mixed $column Column name (string) or index (int) starting with 1 (if ResultSet::FETCHMODE_NUM was used).
  79       * @param string $format Date formatter for use w/ strftime() or date() (it will choose based on examination of format string)
  80       *                          If format is NULL, then the integer unix timestamp will be returned (no formatting performed).
  81       * @return mixed  Formatted date, or integer unix timestamp (using 00:00:00 for time) if $format was null. 
  82       * @throws SQLException - If the column specified is not a valid key in current field array.
  83       */
  84      public function getDate($column, $format = '%x');
  85  
  86      /**
  87       * @param mixed $paramIndex Column name (string) or index (int).
  88       * @return float
  89       */
  90      public function getFloat($paramIndex);    
  91  
  92      /**
  93       * @param mixed $paramIndex Column name (string) or index (int).
  94       * @return int
  95       */
  96      public function getInt($paramIndex);    
  97  
  98      /**
  99       * @param mixed $paramIndex Column name (string) or index (int).
 100       * @return string
 101       */
 102      public function getString($paramIndex);        
 103          
 104      /**
 105       * Return a formatted time.
 106       * 
 107       * The default format for times returned is preferred (in your locale, as specified using setlocale()) 
 108       * format w/o date (i.e. strftime("%X", $val)).  Override this by specifying a format second parameter.  You
 109       * can also specify a date()-style formatter; if you do, make sure there are no "%" symbols in your format string.
 110       * 
 111       * @param mixed $column Column name (string) or index (int) starting with 1 (if ResultSet::FETCHMODE_NUM was used).
 112       * @param string $format Date formatter for use w/ strftime() or date() (it will choose based on examination of format string)
 113       *                          If format is NULL, then the integer unix timestamp will be returned (no formatting performed).
 114       * @return mixed  Formatted time, or integer unix timestamp (using today's date) if $format was null. 
 115       * @throws SQLException - If the column specified is not a valid key in current field array.
 116       */
 117      public function getTime($column, $format = '%X');
 118  
 119      /**
 120       * Return a formatted timestamp.
 121       * 
 122       * The default format for timestamp is ISO standard YYYY-MM-DD HH:MM:SS (i.e. date('Y-m-d H:i:s', $val).
 123       * Override this by specifying a format second parameter.  You can also specify a strftime()-style formatter.
 124       * 
 125       * Hint: if you want to get the unix timestamp use the "U" formatter string.
 126       * 
 127       * @param mixed $column Column name (string) or index (int) starting with 1 (if ResultSet::FETCHMODE_NUM was used).
 128       * @param string $format Date formatter for use w/ strftime() or date() (it will choose based on examination of format string)
 129       *                          If format is NULL, then the integer unix timestamp will be returned (no formatting performed).
 130       * @return mixed Formatted timestamp, or integer unix timestamp (if $format was null)
 131       * @throws SQLException - If the column specified is not a valid key in current field array.
 132       */
 133      public function getTimestamp($column, $format = 'Y-m-d H:i:s');
 134  
 135  }


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