[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/zendframework/zend-stdlib/src/StringWrapper/ -> StringWrapperInterface.php (source)

   1  <?php
   2  /**
   3   * Zend Framework (http://framework.zend.com/)
   4   *
   5   * @link      http://github.com/zendframework/zf2 for the canonical source repository
   6   * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
   7   * @license   http://framework.zend.com/license/new-bsd New BSD License
   8   */
   9  
  10  namespace Zend\Stdlib\StringWrapper;
  11  
  12  interface StringWrapperInterface
  13  {
  14      /**
  15       * Check if the given character encoding is supported by this wrapper
  16       * and the character encoding to convert to is also supported.
  17       *
  18       * @param string      $encoding
  19       * @param string|null $convertEncoding
  20       */
  21      public static function isSupported($encoding, $convertEncoding = null);
  22  
  23      /**
  24       * Get a list of supported character encodings
  25       *
  26       * @return string[]
  27       */
  28      public static function getSupportedEncodings();
  29  
  30      /**
  31       * Set character encoding working with and convert to
  32       *
  33       * @param string      $encoding         The character encoding to work with
  34       * @param string|null $convertEncoding  The character encoding to convert to
  35       * @return StringWrapperInterface
  36       */
  37      public function setEncoding($encoding, $convertEncoding = null);
  38  
  39      /**
  40       * Get the defined character encoding to work with (upper case)
  41       *
  42       * @return string
  43       */
  44      public function getEncoding();
  45  
  46      /**
  47       * Get the defined character encoding to convert to (upper case)
  48       *
  49       * @return string|null
  50       */
  51      public function getConvertEncoding();
  52  
  53      /**
  54       * Returns the length of the given string
  55       *
  56       * @param string $str
  57       * @return int|false
  58       */
  59      public function strlen($str);
  60  
  61      /**
  62       * Returns the portion of string specified by the start and length parameters
  63       *
  64       * @param string   $str
  65       * @param int      $offset
  66       * @param int|null $length
  67       * @return string|false
  68       */
  69      public function substr($str, $offset = 0, $length = null);
  70  
  71      /**
  72       * Find the position of the first occurrence of a substring in a string
  73       *
  74       * @param string $haystack
  75       * @param string $needle
  76       * @param int    $offset
  77       * @return int|false
  78       */
  79      public function strpos($haystack, $needle, $offset = 0);
  80  
  81      /**
  82       * Convert a string from defined encoding to the defined convert encoding
  83       *
  84       * @param string  $str
  85       * @param bool $reverse
  86       * @return string|false
  87       */
  88      public function convert($str, $reverse = false);
  89  
  90      /**
  91       * Wraps a string to a given number of characters
  92       *
  93       * @param  string  $str
  94       * @param  int $width
  95       * @param  string  $break
  96       * @param  bool $cut
  97       * @return string
  98       */
  99      public function wordWrap($str, $width = 75, $break = "\n", $cut = false);
 100  
 101      /**
 102       * Pad a string to a certain length with another string
 103       *
 104       * @param  string  $input
 105       * @param  int $padLength
 106       * @param  string  $padString
 107       * @param  int $padType
 108       * @return string
 109       */
 110      public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT);
 111  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1