Files
CKEditor_4.6.1
Date
backup
bibelpopup
classes
config
fetch_bibel
fetch_chorbuch
html2pdf-master
images
jpgraph
kalender
language
lib
lieder
livesearch
msd
overlib
pma
doc
examples
js
libraries
cache
certs
classes
Charsets
Command
Config
Controllers
Database
Dbal
Display
Engines
Exceptions
Export
Gis
Html
Import
Navigation
Plugins
Auth
Export
Import
Schema
Transformations
Abs
Bool2TextTransformationsPlugin.php
CodeMirrorEditorTransformationPlugin.php
DateFormatTransformationsPlugin.php
DownloadTransformationsPlugin.php
ExternalTransformationsPlugin.php
FormattedTransformationsPlugin.php
HexTransformationsPlugin.php
ImageLinkTransformationsPlugin.php
ImageUploadTransformationsPlugin.php
InlineTransformationsPlugin.php
LongToIPv4TransformationsPlugin.php
PreApPendTransformationsPlugin.php
RegexValidationTransformationsPlugin.php
SQLTransformationsPlugin.php
SubstringTransformationsPlugin.php
TextFileUploadTransformationsPlugin.php
TextImageLinkTransformationsPlugin.php
TextLinkTransformationsPlugin.php
Input
Output
README
TEMPLATE
TEMPLATE_ABSTRACT
Text_Plain_Link.php
Text_Plain_Longtoipv4.php
Text_Plain_PreApPend.php
Text_Plain_Substring.php
TwoFactor
AuthenticationPlugin.php
ExportPlugin.php
IOTransformationsPlugin.php
ImportPlugin.php
SchemaPlugin.php
TransformationsInterface.php
TransformationsPlugin.php
TwoFactorPlugin.php
UploadInterface.php
Properties
Providers
Query
Server
Setup
Table
Twig
Utils
Advisor.php
Bookmark.php
BrowseForeigners.php
Charsets.php
CheckUserPrivileges.php
Config.php
Console.php
Core.php
CreateAddField.php
DatabaseInterface.php
DbTableExists.php
Encoding.php
Error.php
ErrorHandler.php
ErrorReport.php
Export.php
File.php
FileListing.php
Font.php
Footer.php
Git.php
Header.php
Import.php
Index.php
IndexColumn.php
InsertEdit.php
InternalRelations.php
IpAllowDeny.php
Language.php
LanguageManager.php
Linter.php
ListAbstract.php
ListDatabase.php
Logging.php
Menu.php
Message.php
Mime.php
Normalization.php
OpenDocument.php
Operations.php
OutputBuffering.php
ParseAnalyze.php
Partition.php
Pdf.php
Plugins.php
Profiling.php
RecentFavoriteTable.php
Relation.php
RelationCleanup.php
Replication.php
ReplicationGui.php
ReplicationInfo.php
Response.php
Routing.php
Sanitize.php
SavedSearches.php
Scripts.php
Session.php
Sql.php
SqlQueryForm.php
StorageEngine.php
SubPartition.php
SystemDatabase.php
Table.php
TablePartitionDefinition.php
Template.php
Theme.php
ThemeManager.php
Tracker.php
Tracking.php
Transformations.php
TwoFactor.php
Types.php
Url.php
UserPassword.php
UserPreferences.php
Util.php
Version.php
VersionInformation.php
ZipExtension.php
advisory_rules_generic.php
advisory_rules_mysql_before80003.php
common.inc.php
config.default.php
config.values.php
language_stats.inc.php
routes.php
services.php
services_controllers.php
services_loader.php
vendor_config.php
locale
setup
sql
templates
themes
tmp
vendor
CONTRIBUTING.md
ChangeLog
LICENSE
README
RELEASE-DATE-5.1.1
babel.config.json
composer.json
composer.lock
config.inc.php
config.sample.inc.php
favicon.ico
index.php
package.json
print.css
robots.txt
show_config_errors.php
url.php
yarn.lock
templates
templates_c
test
validation
vendor
++ Umstellung Luther 2017.sql
.gitattributes
.htaccess
MyOOS-Dumper-master.zip
Version8_bugs.txt
ansicht.php
ansicht2.php
ausgabe.php
bes_gd.php
bibellookup_1984.php
bibellookup_2017.php
changelog.php
composer.json
composer.lock
config.inc.php
copy.js
faq_text.php
faq_text_ber.php
favicon.ico
fetch_data.php
ftp_ansicht.php
func_agent.php
func_ansicht.php
func_genUser.php
func_highlight.php
func_htmlclean.php
func_make_knk.php
func_make_knk_fa.php
func_make_reference_fa.php
func_rollenrechte.php
func_write_lue_kat.php
further_publication.php
getSubCat.php
graph.php
graph_einzel.php
graph_hauptframe.php
graph_user.php
graph_user_hauptframe.php
hauptframe.php
hello.cgi
hello.pl
hilfe.php
historie.php
index.php
index2.php
indexframe.php
info.php
job_mail_delete_neue_user.php
job_mail_inaktiv.php
job_user_delete_neue_user.php
job_user_inaktiv.php
jquery.min.js
kat_cont.php
kat_cont_fa.php
kat_main.php
kat_main_fa.php
katechismus.php
katechismus_fa.php
lesung.php
lieder.php
livesearch.php
livestat.js
livestat.php
livestat2.php
login_log.php
logininfo.php
logout_admin.php
lue_ansicht.php
lue_bearbeiten.php
lue_erfassen.php
lue_inhalt.php
lue_notizen.php
lue_suche.php
lue_wahl.php
mail.php
make_ical.php
menuframe.php
nachsenden.php
notizen.php
outlook.php
outlook.php_20200212
outlook_ics.php
outlook_vcs.php
passwort_switch.php
pdf_gen.php
preview.php
profil.php
rollen.php
search_note.php
stichworte.php
suche.php
suche_change.php
suche_simp.php
systemmail.php
test.php
test2.php
testmail.php
testmail2.php
topframe.php
upload.php
user_anlegen.php
user_bearbeiten.php
useronline.php
verweise.php
wort_bearbeiten.php
wort_erfassen.php
wort_exegese.php
wort_wahl.php
Leitgedanken/pma/libraries/classes/Plugins/Transformations/Abs/Bool2TextTransformationsPlugin.php
2022-11-21 09:47:28 +01:00

64 lines
1.6 KiB
PHP

<?php
/**
* Abstract class for the Bool2Text transformations plugins
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Abs;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use stdClass;
/**
* Provides common methods for all of the Bool2Text transformations plugins.
*/
abstract class Bool2TextTransformationsPlugin extends TransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public static function getInfo()
{
return __(
'Converts Boolean values to text (default \'T\' and \'F\').'
. ' First option is for TRUE, second for FALSE. Nonzero=true.'
);
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param stdClass|null $meta meta information
*
* @return string
*/
public function applyTransformation($buffer, array $options = [], ?stdClass $meta = null)
{
$cfg = $GLOBALS['cfg'];
$options = $this->getOptions($options, $cfg['DefaultTransformations']['Bool2Text']);
if ($buffer == '0') {
return $options[1]; // return false label
}
return $options[0]; // or true one if nonzero
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public static function getName()
{
return 'Bool2Text';
}
}