helpers\BaseUrl $urlManager

$urlManager public static property (available since version 2.0.8) URL manager to use for creating URLs public static yii\web\UrlManager $urlManager = null

helpers\BaseStringHelper truncateWords()

truncateWords() public static method Truncates a string to the number of words specified. public static string truncateWords ( $string, $count, $suffix = '...', $asHtml = false )$string string The string to truncate. $count integer How many words from original string to include into truncated string. $suffix string String to append to the end of truncated string. $asHtml boolean Whether to treat the string being truncated as HTML and preserve proper HTML tags. This parameter is ava

helpers\BaseStringHelper truncateHtml()

truncateHtml() protected static method (available since version 2.0.1) Truncate a string while preserving the HTML. protected static string truncateHtml ( $string, $count, $suffix, $encoding = false )$string string The string to truncate $count integer $suffix string String to append to the end of the truncated string. $encoding string|boolean

helpers\BaseStringHelper truncate()

truncate() public static method Truncates a string to the number of characters specified. public static string truncate ( $string, $length, $suffix = '...', $encoding = null, $asHtml = false )$string string The string to truncate. $length integer How many characters from original string to include into truncated string. $suffix string String to append to the end of truncated string. $encoding string The charset to use, defaults to charset currently used by application. $asHtml boo

helpers\BaseStringHelper startsWith()

startsWith() public static method Check if given string starts with specified substring. Binary and multibyte safe. public static boolean startsWith ( $string, $with, $caseSensitive = true )$string string Input string $with string Part to search inside the $string $caseSensitive boolean Case sensitive search. Default is true. When case sensitive is enabled, $with must exactly match the starting of the string in order to get a true value. return boolean Returns true if first input s

helpers\BaseStringHelper explode()

explode() public static method (available since version 2.0.4) Explodes string into array, optionally trims values and skips empty ones public static array explode ( $string, $delimiter = ',', $trim = true, $skipEmpty = false )$string string String to be exploded. $delimiter string Delimiter. Default is ','. $trim mixed Whether to trim each element. Can be: boolean - to trim normally; string - custom characters to trim. Will be passed as a second argument to trim() function. callable

helpers\BaseStringHelper endsWith()

endsWith() public static method Check if given string ends with specified substring. Binary and multibyte safe. public static boolean endsWith ( $string, $with, $caseSensitive = true )$string string Input string to check $with string Part to search inside of the $string. $caseSensitive boolean Case sensitive search. Default is true. When case sensitive is enabled, $with must exactly match the ending of the string in order to get a true value. return boolean Returns true if first in

helpers\BaseStringHelper dirname()

dirname() public static method Returns parent directory's path. This method is similar to dirname() except that it will treat both \ and / as directory separators, independent of the operating system. See also http://www.php.net/manual/en/function.basename.php. public static string dirname ( $path )$path string A path string. return string The parent directory's path.

helpers\BaseStringHelper countWords()

countWords() public static method (available since version 2.0.8) Counts words in a string public static integer countWords ( $string )$string string

helpers\BaseStringHelper byteSubstr()

byteSubstr() public static method Returns the portion of string specified by the start and length parameters. This method ensures the string is treated as a byte array by using mb_substr(). See also http://www.php.net/manual/en/function.substr.php. public static string byteSubstr ( $string, $start, $length = null )$string string The input string. Must be one character or longer. $start integer The starting position $length integer The desired portion length. If not specified or null,