[ Index ]

PHP Cross Reference of phpBB-3.3.11-deutsch

title

Body

[close]

/phpbb/request/ -> type_cast_helper_interface.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\request;
  15  
  16  /**
  17  * An interface for type cast operations.
  18  */
  19  interface type_cast_helper_interface
  20  {
  21      /**
  22      * Set variable $result to a particular type.
  23      *
  24      * @param mixed    &$result    The variable to fill
  25      * @param mixed    $var        The contents to fill with
  26      * @param mixed    $type        The variable type. Will be used with {@link settype()}
  27      * @param bool    $multibyte    Indicates whether string values may contain UTF-8 characters.
  28      *                             Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks.
  29      */
  30  	public function set_var(&$result, $var, $type, $multibyte = false);
  31  
  32      /**
  33      * Recursively sets a variable to a given type using {@link set_var set_var}.
  34      *
  35      * @param    string    $var        The value which shall be sanitised (passed by reference).
  36      * @param    mixed    $default    Specifies the type $var shall have.
  37      *                                 If it is an array and $var is not one, then an empty array is returned.
  38      *                                 Otherwise var is cast to the same type, and if $default is an array all
  39      *                                 keys and values are cast recursively using this function too.
  40      * @param    bool    $multibyte    Indicates whether string keys and values may contain UTF-8 characters.
  41      *                                 Default is false, causing all bytes outside the ASCII range (0-127) to
  42      *                                 be replaced with question marks.
  43      */
  44  	public function recursive_set_var(&$var, $default, $multibyte);
  45  }


Generated: Sat Nov 4 14:26:03 2023 Cross-referenced by PHPXref 0.7.1