You are here

interface StringWrapperInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-stdlib/src/StringWrapper/StringWrapperInterface.php \Zend\Stdlib\StringWrapper\StringWrapperInterface

Hierarchy

Expanded class hierarchy of StringWrapperInterface

All classes that implement StringWrapperInterface

3 files declare their use of StringWrapperInterface
Entry.php in vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Entry.php
Feed.php in vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php
StringUtils.php in vendor/zendframework/zend-stdlib/src/StringUtils.php

File

vendor/zendframework/zend-stdlib/src/StringWrapper/StringWrapperInterface.php, line 12

Namespace

Zend\Stdlib\StringWrapper
View source
interface StringWrapperInterface {

  /**
   * Check if the given character encoding is supported by this wrapper
   * and the character encoding to convert to is also supported.
   *
   * @param string      $encoding
   * @param string|null $convertEncoding
   */
  public static function isSupported($encoding, $convertEncoding = null);

  /**
   * Get a list of supported character encodings
   *
   * @return string[]
   */
  public static function getSupportedEncodings();

  /**
   * Set character encoding working with and convert to
   *
   * @param string      $encoding         The character encoding to work with
   * @param string|null $convertEncoding  The character encoding to convert to
   * @return StringWrapperInterface
   */
  public function setEncoding($encoding, $convertEncoding = null);

  /**
   * Get the defined character encoding to work with (upper case)
   *
   * @return string
   */
  public function getEncoding();

  /**
   * Get the defined character encoding to convert to (upper case)
   *
   * @return string|null
   */
  public function getConvertEncoding();

  /**
   * Returns the length of the given string
   *
   * @param string $str
   * @return int|false
   */
  public function strlen($str);

  /**
   * Returns the portion of string specified by the start and length parameters
   *
   * @param string   $str
   * @param int      $offset
   * @param int|null $length
   * @return string|false
   */
  public function substr($str, $offset = 0, $length = null);

  /**
   * Find the position of the first occurrence of a substring in a string
   *
   * @param string $haystack
   * @param string $needle
   * @param int    $offset
   * @return int|false
   */
  public function strpos($haystack, $needle, $offset = 0);

  /**
   * Convert a string from defined encoding to the defined convert encoding
   *
   * @param string  $str
   * @param bool $reverse
   * @return string|false
   */
  public function convert($str, $reverse = false);

  /**
   * Wraps a string to a given number of characters
   *
   * @param  string  $str
   * @param  int $width
   * @param  string  $break
   * @param  bool $cut
   * @return string
   */
  public function wordWrap($str, $width = 75, $break = "\n", $cut = false);

  /**
   * Pad a string to a certain length with another string
   *
   * @param  string  $input
   * @param  int $padLength
   * @param  string  $padString
   * @param  int $padType
   * @return string
   */
  public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT);

}

Members

Namesort descending Modifiers Type Description Overrides
StringWrapperInterface::convert public function Convert a string from defined encoding to the defined convert encoding 1
StringWrapperInterface::getConvertEncoding public function Get the defined character encoding to convert to (upper case) 1
StringWrapperInterface::getEncoding public function Get the defined character encoding to work with (upper case) 1
StringWrapperInterface::getSupportedEncodings public static function Get a list of supported character encodings 4
StringWrapperInterface::isSupported public static function Check if the given character encoding is supported by this wrapper and the character encoding to convert to is also supported. 1
StringWrapperInterface::setEncoding public function Set character encoding working with and convert to 1
StringWrapperInterface::strlen public function Returns the length of the given string 4
StringWrapperInterface::strPad public function Pad a string to a certain length with another string 1
StringWrapperInterface::strpos public function Find the position of the first occurrence of a substring in a string 4
StringWrapperInterface::substr public function Returns the portion of string specified by the start and length parameters 4
StringWrapperInterface::wordWrap public function Wraps a string to a given number of characters 1