ExtensionInterface

interface ExtensionInterface ExtensionInterface is the interface implemented by container extension classes. Methods load(array $configs, ContainerBuilder $container) Loads a specific configuration. string getNamespace() Returns the namespace to be used for this extension (XML namespace). string getXsdValidationBasePath() Returns the base path for the XSD files. string getAlias() Returns the recommended alias to use in XML. Details load(arr

ExtensionInterface::getAlias()

string getAlias() Returns the recommended alias to use in XML. This alias is also the mandatory prefix to use when using YAML. Return Value string The alias

ExtensionInterface::getFunctionTranslators()

callable[] getFunctionTranslators() Returns function translators. Return Value callable[]

ExtensionInterface::getCombinationTranslators()

callable[] getCombinationTranslators() Returns combination translators. Return Value callable[]

ExtensionInterface

interface ExtensionInterface XPath expression translator extension interface. This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect. Methods callable[] getNodeTranslators() Returns node translators. callable[] getCombinationTranslators() Returns combination translators. callable[] getFunctionTranslators() Returns function translators. callable[] getPseudoClassTranslators() Returns pseudo-class

ExtensionGuesser::register()

register(ExtensionGuesserInterface $guesser) Registers a new extension guesser. When guessing, this guesser is preferred over previously registered ones. Parameters ExtensionGuesserInterface $guesser

ExtensionGuesser::guess()

string guess(string $mimeType) Tries to guess the extension. The mime type is passed to each registered mime type guesser in reverse order of their registration (last registered is queried first). Once a guesser returns a value that is not NULL, this method terminates and returns the value. Parameters string $mimeType The mime type Return Value string The guessed extension or NULL, if none could be guessed

ExtensionGuesser

class ExtensionGuesser implements ExtensionGuesserInterface A singleton mime type to file extension guesser. A default guesser is provided. You can register custom guessers by calling the register() method on the singleton instance: $guesser = ExtensionGuesser::getInstance(); $guesser->register(new MyCustomExtensionGuesser()); The last registered guesser is preferred over previously registered ones. Methods static ExtensionGuesser getInstance() Returns the singleton instance. re

ExtensionGuesser::getInstance()

static ExtensionGuesser getInstance() Returns the singleton instance. Return Value ExtensionGuesser

ExtensionGuesserInterface

interface ExtensionGuesserInterface Guesses the file extension corresponding to a given mime type. Methods string guess(string $mimeType) Makes a best guess for a file extension, given a mime type. Details string guess(string $mimeType) Makes a best guess for a file extension, given a mime type. Parameters string $mimeType The mime type Return Value string The guessed extension or NULL, if none could be guessed