StubbingContext

class StubbingContext implements StubbingContextInterface Methods __construct($binaryDir, $stubDir, Filesystem $filesystem, $icuVersion) string getBinaryDir() Returns the directory where the binary resource bundles are stored. string getStubDir() Returns the directory where the stub resource bundles are stored. Filesystem getFilesystem() Returns a tool for manipulating the filesystem. string getIcuVersion() Returns the ICU version of the bundles being converted. De

StructuredBundleReader::readEntry()

mixed readEntry(string $path, string $locale, array $indices, Boolean $fallback = true) Reads an entry from a resource bundle. An entry can be selected from the resource bundle by passing the path to that entry in the bundle. For example, if the bundle is structured like this: TopLevel NestedLevel Entry: Value Then the value can be read by calling: $reader->readEntry('...', 'en', array('TopLevel', 'NestedLevel', 'Entry')); Parameters string $path The path to th

StructuredBundleReaderInterface

interface StructuredBundleReaderInterface implements BundleReaderInterface Reads individual entries of a resource file. Methods mixed read(string $path, string $locale) Reads a resource bundle. from BundleReaderInterface string[] getLocales(string $path) Reads the available locales of a resource bundle. from BundleReaderInterface mixed readEntry(string $path, string $locale, array $indices, Boolean $fallback = true) Reads an entry from a resource bundle. Details

StringUtils deprecated::safeStrlen()

static int safeStrlen(string $string) Returns the number of bytes in a string. Parameters string $string The string whose length we wish to obtain Return Value int

StringUtils deprecated

class StringUtils deprecated since 2.8, to be removed in 3.0. String utility functions. Methods static bool equals(string $knownString, string $userInput) Compares two strings. static int safeStrlen(string $string) Returns the number of bytes in a string. Details static bool equals(string $knownString, string $userInput) Compares two strings. This method implements a constant-time algorithm to compare strings. Regardless of the used imp

StringUtils deprecated::equals()

static bool equals(string $knownString, string $userInput) Compares two strings. This method implements a constant-time algorithm to compare strings. Regardless of the used implementation, it will leak length information. Parameters string $knownString The string of known length to compare against string $userInput The string that the user can control Return Value bool true if the two strings are the same, false otherwise

StringUtil::trim()

static string trim(string $string) Returns the trimmed data. Parameters string $string Return Value string

StructuredBundleReader

class StructuredBundleReader implements StructuredBundleReaderInterface A structured reader wrapping an existing resource bundle reader. Methods __construct(BundleReaderInterface $reader) Creates an entry reader based on the given resource bundle reader. mixed read(string $path, string $locale) Reads a resource bundle. string[] getLocales(string $path) Reads the available locales of a resource bundle. mixed readEntry(string $path, string $locale, array $indices, Boolean $f

StructuredBundleReader::getLocales()

string[] getLocales(string $path) Reads the available locales of a resource bundle. Parameters string $path The path to the resource bundle. Return Value string[] A list of supported locale codes.

StringUtil::fqcnToBlockPrefix()

static string|null fqcnToBlockPrefix(string $fqcn) Converts a fully-qualified class name to a block prefix. Parameters string $fqcn The fully-qualified class name Return Value string|null The block prefix or null if not a valid FQCN