21 final public static function getExporters($onlyForPublicUse =
false)
23 if (!isset(self::$exporters)) {
26 foreach (scandir(__DIR__) as $f) {
27 if (preg_match(
'/^(\w+)\.php$/', $f,
$m)) {
28 if ($f !== basename(__FILE__)) {
35 if ($onlyForPublicUse) {
37 foreach (self::$exporters as $handle => $class) {
38 if (call_user_func(self::getExporterClassName($handle).
'::isForPublicUse') ===
true) {
58 throw new Exception(
"Invalid exporter handle: '$exporterHandle'");
61 return call_user_func(self::getExporterClassName($exporterHandle).
'::getDescription');
70 return __NAMESPACE__.
'\\'.ucfirst(strtolower($exporterHandle));
79 throw new Exception(get_called_class().
' does not implement the method '.__FUNCTION__);
91 foreach ($languages as $language) {
92 $asciiList[] = $language->getUSAsciiClone();
94 $languages = $asciiList;
98 return static::toStringDo($languages);
109 throw new Exception(
"Error writing data to '$filename'");
126 throw new Exception(get_called_class().
' does not implement the method '.__FUNCTION__);
Base class for all the exporters.
static toString($languages, $options=null)
Convert a list of Language instances to string.
static getDescription()
Return a short description of the exporter.
static getExporterDescription($exporterHandle)
Return the description of a specific exporter.
static getExporters($onlyForPublicUse=false)
Return the list of all the available exporters.
static toFile($languages, $filename, $options=null)
Save the Language instances to a file.
static getExporterClassName($exporterHandle)
Returns the fully qualified class name of a exporter given its handle.
static isForPublicUse()
Is this exporter for public use?
Create styles array
The data for the language used.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
static toStringDo($languages)
Convert a list of Language instances to string.