<pre>
<?php
/** Format string as table row
-* @param string
+* @param string $s
* @return string HTML
*/
function pre_tr($s) {
}
/** Set the client character set
- * @param string
+ * @param string $charset
* @return bool
*/
function set_charset($charset) {
/** @var int */ private $offset = 0;
/** Constructor
- * @param resource
+ * @param resource $result
*/
function __construct($result) {
$this->result = $result;
/** Escape database identifier
- * @param string
+ * @param string $idf
* @return string
*/
function idf_escape($idf) {
}
/** Get escaped table name
- * @param string
+ * @param string $idf
* @return string
*/
function table($idf) {
}
/** Connect to the database
- * @param array{string, string, string} [$server, $username, $password]
+ * @param array{string, string, string} $credentials [$server, $username, $password]
* @return string|Db string for error
*/
function connect($credentials) {
}
/** Get cached list of databases
- * @param bool
+ * @param bool $flush
* @return list<string>
*/
function get_databases($flush) {
}
/** Formulate SQL query with limit
- * @param string everything after SELECT
- * @param string including WHERE
- * @param int
- * @param int
- * @param string
+ * @param string $query everything after SELECT
+ * @param string $where including WHERE
+ * @param int $limit
+ * @param int $offset
+ * @param string $separator
* @return string
*/
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
}
/** Formulate SQL modification query with limit 1
- * @param string
- * @param string everything after UPDATE or DELETE
- * @param string
- * @param string
+ * @param string $table
+ * @param string $query everything after UPDATE or DELETE
+ * @param string $where
+ * @param string $separator
* @return string
*/
function limit1($table, $query, $where, $separator = "\n") {
}
/** Get database collation
- * @param string
- * @param string[][] result of collations()
+ * @param string $db
+ * @param string[][] $collations result of collations()
* @return string
*/
function db_collation($db, $collations) {
}
/** Count tables in all databases
- * @param list<string>
+ * @param list<string> $databases
* @return int[] [$db => $tables]
*/
function count_tables($databases) {
}
/** Get table status
- * @param string
- * @param bool return only "Name", "Engine" and "Comment" fields
+ * @param string $name
+ * @param bool $fast return only "Name", "Engine" and "Comment" fields
* @return TableStatus[]
*/
function table_status($name = "", $fast = false) {
}
/** Find out whether the identifier is view
- * @param TableStatus
+ * @param TableStatus $table_status
* @return bool
*/
function is_view($table_status) {
}
/** Check if table supports foreign keys
- * @param TableStatus result of table_status1()
+ * @param TableStatus $table_status result of table_status1()
* @return bool
*/
function fk_support($table_status) {
}
/** Get information about fields
- * @param string
+ * @param string $table
* @return Field[]
*/
function fields($table) {
}
/** Get table indexes
- * @param string
- * @param ?Db
+ * @param string $table
+ * @param ?Db $connection2
* @return Index[]
*/
function indexes($table, $connection2 = null) {
}
/** Get foreign keys in table
- * @param string
+ * @param string $table
* @return ForeignKey[]
*/
function foreign_keys($table) {
}
/** Get view SELECT
- * @param string
+ * @param string $name
* @return array{select:string}
*/
function view($name) {
}
/** Find out if database is information_schema
- * @param string
+ * @param string $db
* @return bool
*/
function information_schema($db) {
}
/** Create database
- * @param string
- * @param string
+ * @param string $db
+ * @param string $collation
* @return Result
*/
function create_database($db, $collation) {
}
/** Drop databases
- * @param list<string>
+ * @param list<string> $databases
* @return bool
*/
function drop_databases($databases) {
}
/** Rename database from DB
- * @param string new name
- * @param string
+ * @param string $name new name
+ * @param string $collation
* @return bool
*/
function rename_database($name, $collation) {
}
/** Run commands to create or alter table
- * @param string "" to create
- * @param string new name
- * @param list<array{string, list<string>, string}> of [$orig, $process_field, $after]
- * @param string[]
- * @param string
- * @param string
- * @param string
- * @param string number
- * @param string
+ * @param string $table "" to create
+ * @param string $name new name
+ * @param list<array{string, list<string>, string}> $fields of [$orig, $process_field, $after]
+ * @param string[] $foreign
+ * @param string $comment
+ * @param string $engine
+ * @param string $collation
+ * @param string $auto_increment number
+ * @param string $partitioning
* @return Result|bool
*/
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
}
/** Run commands to alter indexes
- * @param string escaped table name
- * @param list<array{string, string, 'DROP'|list<string>}> of ["index type", "name", ["column definition", ...]] or ["index type", "name", "DROP"]
+ * @param string $table escaped table name
+ * @param list<array{string, string, 'DROP'|list<string>}> $alter of ["index type", "name", ["column definition", ...]] or ["index type", "name", "DROP"]
* @return Result|bool
*/
function alter_indexes($table, $alter) {
}
/** Run commands to truncate tables
- * @param list<string>
+ * @param list<string> $tables
* @return bool
*/
function truncate_tables($tables) {
}
/** Drop views
- * @param list<string>
+ * @param list<string> $views
* @return Result|bool
*/
function drop_views($views) {
}
/** Drop tables
- * @param list<string>
+ * @param list<string> $tables
* @return Result|bool
*/
function drop_tables($tables) {
}
/** Move tables to other schema
- * @param list<string>
- * @param list<string>
- * @param string
+ * @param list<string> $tables
+ * @param list<string> $views
+ * @param string $target
* @return bool
*/
function move_tables($tables, $views, $target) {
}
/** Copy tables to other schema
- * @param list<string>
- * @param list<string>
- * @param string
+ * @param list<string> $tables
+ * @param list<string> $views
+ * @param string $target
* @return bool
*/
function copy_tables($tables, $views, $target) {
}
/** Get information about trigger
- * @param string trigger name
- * @param string
+ * @param string $name trigger name
+ * @param string $table
* @return Trigger
*/
function trigger($name, $table) {
}
/** Get defined triggers
- * @param string
+ * @param string $table
* @return array{string, string}[]
*/
function triggers($table) {
}
/** Get information about stored routine
- * @param string
- * @param 'FUNCTION'|'PROCEDURE'
+ * @param string $name
+ * @param 'FUNCTION'|'PROCEDURE' $type
* @return Routine
*/
function routine($name, $type) {
}
/** Get routine signature
- * @param string
- * @param Routine result of routine()
+ * @param string $name
+ * @param Routine $row result of routine()
* @return string
*/
function routine_id($name, $row) {
}
/** Get last auto increment ID
- * @param Result or true
+ * @param Result $result or true
* @return string
*/
function last_id($result) {
}
/** Explain select
- * @param Db
- * @param string
+ * @param Db $connection
+ * @param string $query
* @return Result
*/
function explain($connection, $query) {
}
/** Get approximate number of rows
- * @param TableStatus
- * @param list<string>
+ * @param TableStatus $table_status
+ * @param list<string> $where
* @return numeric-string|null null if approximate number can't be retrieved
*/
function found_rows($table_status, $where) {
}
/** Get SQL command to create table
- * @param string
- * @param bool
- * @param string
+ * @param string $table
+ * @param bool $auto_increment
+ * @param string $style
* @return string
*/
function create_sql($table, $auto_increment, $style) {
}
/** Get SQL command to truncate table
- * @param string
+ * @param string $table
* @return string
*/
function truncate_sql($table) {
}
/** Get SQL command to change database
- * @param string
+ * @param string $database
* @return string
*/
function use_sql($database) {
}
/** Get SQL commands to create triggers
- * @param string
+ * @param string $table
* @return string
*/
function trigger_sql($table) {
}
/** Convert field in select and edit
- * @param Field one element from fields()
+ * @param Field $field one element from fields()
* @return string|void
*/
function convert_field($field) {
}
/** Convert value in edit after applying functions back
- * @param Field one element from fields()
- * @param string SQL expression
+ * @param Field $field one element from fields()
+ * @param string $return SQL expression
* @return string
*/
function unconvert_field($field, $return) {
}
/** Check whether a feature is supported
- * @param literal-string "check|comment|copy|database|descidx|drop_col|dump|event|indexes|kill|materializedview|partitioning|privileges|procedure|processlist|routine|scheme|sequence|status|table|trigger|type|variables|view|view_trigger"
+ * @param literal-string $feature "check|comment|copy|database|descidx|drop_col|dump|event|indexes|kill|materializedview|partitioning|privileges|procedure|processlist|routine|scheme|sequence|status|table|trigger|type|variables|view|view_trigger"
* @return bool
*/
function support($feature) {
}
/** Kill a process
- * @param numeric-string
+ * @param numeric-string $val
* @return Result|bool
*/
function kill_process($val) {
}
/** Get values of user defined type
- * @param int
+ * @param int $id
* @return string
*/
function type_values($id) {
}
/** Set current schema
- * @param string
- * @param Db
+ * @param string $schema
+ * @param Db $connection2
* @return bool
*/
function set_schema($schema, $connection2 = null) {
}
/** Recreate table
- * @param string original name
- * @param string new name
- * @param list<list<string>> [process_field()], empty to preserve
- * @param string[] [$original => idf_escape($new_column)], empty to preserve
- * @param string[] [format_foreign_key()], empty to preserve
- * @param int set auto_increment to this value, 0 to preserve
- * @param list<array{string, string, list<string>|'DROP'}> [[$type, $name, $columns]], empty to preserve
- * @param string CHECK constraint to drop
- * @param string CHECK constraint to add
+ * @param string $table original name
+ * @param string $name new name
+ * @param list<list<string>> $fields [process_field()], empty to preserve
+ * @param string[] $originals [$original => idf_escape($new_column)], empty to preserve
+ * @param string[] $foreign [format_foreign_key()], empty to preserve
+ * @param int $auto_increment set auto_increment to this value, 0 to preserve
+ * @param list<array{string, string, list<string>|'DROP'}> $indexes [[$type, $name, $columns]], empty to preserve
+ * @param string $drop_check CHECK constraint to drop
+ * @param string $add_check CHECK constraint to add
* @return bool
*/
function recreate_table($table, $name, $fields, $originals, $foreign, $auto_increment = 0, $indexes = array(), $drop_check = "", $add_check = "") {
}
/** Get key used for permanent login
- * @param bool
+ * @param bool $create
* @return string cryptic string which gets combined with password or false in case of an error
*/
function permanentLogin($create = false) {
}
/** Get server name displayed in breadcrumbs
- * @param string
+ * @param string $server
* @return string HTML code or null
*/
function serverName($server) {
}
/** Get cached list of databases
- * @param bool
+ * @param bool $flush
* @return list<string>
*/
function databases($flush = true) {
}
/** Print HTML code inside <head>
- * @param bool dark CSS: false to disable, true to force, null to base on user preferences
+ * @param bool $dark dark CSS: false to disable, true to force, null to base on user preferences
* @return bool true to link favicon.ico
*/
function head($dark = null) {
}
/** Get login form field
- * @param string
- * @param string HTML
- * @param string HTML
+ * @param string $name
+ * @param string $heading HTML
+ * @param string $value HTML
* @return string
*/
function loginFormField($name, $heading, $value) {
}
/** Authorize the user
- * @param string
- * @param string
+ * @param string $login
+ * @param string $password
* @return mixed true for success, string for error message, false for unknown error
*/
function login($login, $password) {
}
/** Table caption used in navigation and headings
- * @param TableStatus result of table_status1()
+ * @param TableStatus $tableStatus result of table_status1()
* @return string HTML code, "" to ignore table
*/
function tableName($tableStatus) {
}
/** Field caption used in select and edit
- * @param Field single field returned from fields()
- * @param int order of column in select
+ * @param Field $field single field returned from fields()
+ * @param int $order order of column in select
* @return string HTML code, "" to ignore field
*/
function fieldName($field, $order = 0) {
}
/** Print links after select heading
- * @param TableStatus result of table_status1()
- * @param string new item options, NULL for no new item
+ * @param TableStatus $tableStatus result of table_status1()
+ * @param string $set new item options, NULL for no new item
* @return void
*/
function selectLinks($tableStatus, $set = "") {
}
/** Get foreign keys for table
- * @param string
+ * @param string $table
* @return ForeignKey[] same format as foreign_keys()
*/
function foreignKeys($table) {
}
/** Find backward keys for table
- * @param string
- * @param string
+ * @param string $table
+ * @param string $tableName
* @return BackwardKey[]
*/
function backwardKeys($table, $tableName) {
}
/** Print backward keys for row
- * @param BackwardKey[] result of $this->backwardKeys()
- * @param string[]
+ * @param BackwardKey[] $backwardKeys result of $this->backwardKeys()
+ * @param string[] $row
* @return void
*/
function backwardKeysPrint($backwardKeys, $row) {
}
/** Query printed in select before execution
- * @param string query to be executed
- * @param float start time of the query
- * @param bool
+ * @param string $query query to be executed
+ * @param float $start start time of the query
+ * @param bool $failed
* @return string
*/
function selectQuery($query, $start, $failed = false) {
}
/** Query printed in SQL command before execution
- * @param string query to be executed
+ * @param string $query query to be executed
* @return string escaped query to be printed
*/
function sqlCommandQuery($query) {
}
/** Description of a row in a table
- * @param string
+ * @param string $table
* @return string SQL expression, empty string for no description
*/
function rowDescription($table) {
}
/** Get descriptions of selected data
- * @param list<string[]> all data to print
- * @param ForeignKey[]
+ * @param list<string[]> $rows all data to print
+ * @param ForeignKey[] $foreignKeys
* @return list<string[]>
*/
function rowDescriptions($rows, $foreignKeys) {
}
/** Get a link to use in select table
- * @param string raw value of the field
- * @param Field single field returned from fields()
+ * @param string $val raw value of the field
+ * @param Field $field single field returned from fields()
* @return string|void null to create the default link
*/
function selectLink($val, $field) {
}
/** Value printed in select table
- * @param string HTML-escaped value to print
- * @param string link to foreign key
- * @param Field single field returned from fields()
- * @param string original value before applying editVal() and escaping
+ * @param string $val HTML-escaped value to print
+ * @param string $link link to foreign key
+ * @param Field $field single field returned from fields()
+ * @param string $original original value before applying editVal() and escaping
* @return string
*/
function selectVal($val, $link, $field, $original) {
}
/** Value conversion used in select and edit
- * @param string
- * @param Field single field returned from fields()
+ * @param string $val
+ * @param Field $field single field returned from fields()
* @return string
*/
function editVal($val, $field) {
}
/** Print table structure in tabular format
- * @param Field[] data about individual fields
- * @param TableStatus
+ * @param Field[] $fields data about individual fields
+ * @param TableStatus $tableStatus
* @return void
*/
function tableStructurePrint($fields, $tableStatus = null) {
}
/** Print list of indexes on table in tabular format
- * @param Index[] data about all indexes on a table
+ * @param Index[] $indexes data about all indexes on a table
* @return void
*/
function tableIndexesPrint($indexes) {
}
/** Print columns box in select
- * @param list<string> result of selectColumnsProcess()[0]
- * @param string[] selectable columns
+ * @param list<string> $select result of selectColumnsProcess()[0]
+ * @param string[] $columns selectable columns
* @return void
*/
function selectColumnsPrint($select, $columns) {
}
/** Print search box in select
- * @param list<string> result of selectSearchProcess()
- * @param string[] selectable columns
- * @param Index[]
+ * @param list<string> $where result of selectSearchProcess()
+ * @param string[] $columns selectable columns
+ * @param Index[] $indexes
* @return void
*/
function selectSearchPrint($where, $columns, $indexes) {
}
/** Print order box in select
- * @param list<string> result of selectOrderProcess()
- * @param string[] selectable columns
- * @param Index[]
+ * @param list<string> $order result of selectOrderProcess()
+ * @param string[] $columns selectable columns
+ * @param Index[] $indexes
* @return void
*/
function selectOrderPrint($order, $columns, $indexes) {
}
/** Print limit box in select
- * @param string result of selectLimitProcess()
+ * @param string $limit result of selectLimitProcess()
* @return void
*/
function selectLimitPrint($limit) {
}
/** Print text length box in select
- * @param string result of selectLengthProcess()
+ * @param string $text_length result of selectLengthProcess()
* @return void
*/
function selectLengthPrint($text_length) {
}
/** Print action box in select
- * @param Index[]
+ * @param Index[] $indexes
* @return void
*/
function selectActionPrint($indexes) {
}
/** Print extra text in the end of a select form
- * @param string[] fields holding e-mails
- * @param string[] selectable columns
+ * @param string[] $emailFields fields holding e-mails
+ * @param string[] $columns selectable columns
* @return void
*/
function selectEmailPrint($emailFields, $columns) {
}
/** Process columns box in select
- * @param string[] selectable columns
- * @param Index[]
+ * @param string[] $columns selectable columns
+ * @param Index[] $indexes
* @return list<list<string>> [[select_expressions], [group_expressions]]
*/
function selectColumnsProcess($columns, $indexes) {
}
/** Process search box in select
- * @param Field[]
- * @param Index[]
+ * @param Field[] $fields
+ * @param Index[] $indexes
* @return list<string> expressions to join by AND
*/
function selectSearchProcess($fields, $indexes) {
}
/** Process order box in select
- * @param Field[]
- * @param Index[]
+ * @param Field[] $fields
+ * @param Index[] $indexes
* @return list<string> expressions to join by comma
*/
function selectOrderProcess($fields, $indexes) {
}
/** Process extras in select form
- * @param string[] AND conditions
- * @param ForeignKey[]
+ * @param string[] $where AND conditions
+ * @param ForeignKey[] $foreignKeys
* @return bool true if processed, false to process other parts of form
*/
function selectEmailProcess($where, $foreignKeys) {
}
/** Build SQL query used in select
- * @param list<string> result of selectColumnsProcess()[0]
- * @param list<string> result of selectSearchProcess()
- * @param list<string> result of selectColumnsProcess()[1]
- * @param list<string> result of selectOrderProcess()
- * @param int result of selectLimitProcess()
- * @param int index of page starting at zero
+ * @param list<string> $select result of selectColumnsProcess()[0]
+ * @param list<string> $where result of selectSearchProcess()
+ * @param list<string> $group result of selectColumnsProcess()[1]
+ * @param list<string> $order result of selectOrderProcess()
+ * @param int $limit result of selectLimitProcess()
+ * @param int $page index of page starting at zero
* @return string empty string to use default query
*/
function selectQueryBuild($select, $where, $group, $order, $limit, $page) {
}
/** Query printed after execution in the message
- * @param string executed query
- * @param string elapsed time
- * @param bool
+ * @param string $query executed query
+ * @param string $time elapsed time
+ * @param bool $failed
* @return string
*/
function messageQuery($query, $time, $failed = false) {
}
/** Print before edit form
- * @param string
- * @param Field[]
- * @param mixed
- * @param bool
+ * @param string $table
+ * @param Field[] $fields
+ * @param mixed $row
+ * @param bool $update
* @return void
*/
function editRowPrint($table, $fields, $row, $update) {
}
/** Functions displayed in edit form
- * @param Field single field from fields()
+ * @param Field $field single field from fields()
* @return list<string>
*/
function editFunctions($field) {
}
/** Get options to display edit field
- * @param string table name
- * @param Field single field from fields()
- * @param string attributes to use inside the tag
- * @param string
+ * @param string $table table name
+ * @param Field $field single field from fields()
+ * @param string $attrs attributes to use inside the tag
+ * @param string $value
* @return string custom input field or empty string for default
*/
function editInput($table, $field, $attrs, $value) {
}
/** Get hint for edit field
- * @param string table name
- * @param Field single field from fields()
- * @param string
+ * @param string $table table name
+ * @param Field $field single field from fields()
+ * @param string $value
* @return string
*/
function editHint($table, $field, $value) {
}
/** Process sent input
- * @param Field single field from fields()
- * @param string
- * @param string
+ * @param Field $field single field from fields()
+ * @param string $value
+ * @param string $function
* @return string expression to use in a query
*/
function processInput($field, $value, $function = "") {
}
/** Export database structure
- * @param string
+ * @param string $db
* @return void prints data
*/
function dumpDatabase($db) {
}
/** Export table structure
- * @param string
- * @param string
- * @param int 0 table, 1 view, 2 temporary view table
+ * @param string $table
+ * @param string $style
+ * @param int $is_view 0 table, 1 view, 2 temporary view table
* @return void prints data
*/
function dumpTable($table, $style, $is_view = 0) {
}
/** Export table data
- * @param string
- * @param string
- * @param string
+ * @param string $table
+ * @param string $style
+ * @param string $query
* @return void prints data
*/
function dumpData($table, $style, $query) {
}
/** Set export filename
- * @param string
+ * @param string $identifier
* @return string filename without extension
*/
function dumpFilename($identifier) {
}
/** Send headers for export
- * @param string
- * @param bool
+ * @param string $identifier
+ * @param bool $multi_table
* @return string extension
*/
function dumpHeaders($identifier, $multi_table = false) {
}
/** Print navigation after Adminer title
- * @param string can be "auth" if there is no database connection, "db" if there is no database selected, "ns" with invalid schema
+ * @param string $missing can be "auth" if there is no database connection, "db" if there is no database selected, "ns" with invalid schema
* @return void
*/
function navigation($missing) {
}
/** Set up syntax highlight for code and <textarea>
- * @param TableStatus[] result of table_status('', true)
+ * @param TableStatus[] $tables result of table_status('', true)
* @return void
*/
function syntaxHighlighting($tables) {
}
/** Print databases list in menu
- * @param string
+ * @param string $missing
* @return void
*/
function databasesPrint($missing) {
}
/** Print table list in menu
- * @param TableStatus[] result of table_status('', true)
+ * @param TableStatus[] $tables result of table_status('', true)
* @return void
*/
function tablesPrint($tables) {
}
/** Render an error message and a login form
-* @param string plain text
+* @param string $error plain text
* @return never
*/
function auth_error($error) {
/** @var Result|bool */ protected $multi; // used for multiquery
/** Connect to server
- * @param string
- * @param string
- * @param string
+ * @param string $server
+ * @param string $username
+ * @param string $password
* @return bool
*/
abstract function connect($server, $username, $password);
/** Quote string to use in SQL
- * @param string
+ * @param string $string
* @return string escaped string enclosed in '
*/
abstract function quote($string);
/** Select database
- * @param string
+ * @param string $database
* @return bool
*/
abstract function select_db($database);
/** Send query
- * @param string
- * @param bool
+ * @param string $query
+ * @param bool $unbuffered
* @return Result|bool
*/
abstract function query($query, $unbuffered = false);
/** Send query with more resultsets
- * @param string
+ * @param string $query
* @return Result|bool
*/
function multi_query($query) {
}
/** Get single field from result
- * @param string
- * @param int
+ * @param string $query
+ * @param int $field
* @return string|bool
*/
function result($query, $field = 0) {
namespace Adminer;
/** Print HTML header
-* @param string used in title, breadcrumb and heading, should be HTML escaped
-* @param string
-* @param mixed ["key" => "link", "key2" => ["link", "desc"]], null for nothing, false for driver only, true for driver and server
-* @param string used after colon in title and heading, should be HTML escaped
+* @param string $title used in title, breadcrumb and heading, should be HTML escaped
+* @param string $error
+* @param mixed $breadcrumb ["key" => "link", "key2" => ["link", "desc"]], null for nothing, false for driver only, true for driver and server
+* @param string $title2 used after colon in title and heading, should be HTML escaped
* @return void
*/
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
}
/** Print flash and error messages
-* @param string
+* @param string $error
* @return void
*/
function page_messages($error) {
}
/** Print HTML footer
-* @param string "auth", "db", "ns"
+* @param string $missing "auth", "db", "ns"
* @return void
*/
function page_footer($missing = "") {
$drivers = array();
/** Add a driver
-* @param string
-* @param string
+* @param string $id
+* @param string $name
* @return void
*/
function add_driver($id, $name) {
}
/** Get driver name
-* @param string
+* @param string $id
* @return string
*/
function get_driver($id) {
/** @var list<string> */ public $generated = array(); // allowed types of generated columns
/** Create object for performing database operations
- * @param Db
+ * @param Db $connection
*/
function __construct($connection) {
$this->conn = $connection;
}
/** Get enum values
- * @param Field
+ * @param Field $field
* @return string|void
*/
function enumLength($field) {
}
/** Function used to convert the value inputted by user
- * @param Field
+ * @param Field $field
* @return string|void
*/
function unconvertFunction($field) {
}
/** Select data from table
- * @param string
- * @param list<string> result of $adminer->selectColumnsProcess()[0]
- * @param list<string> result of $adminer->selectSearchProcess()
- * @param list<string> result of $adminer->selectColumnsProcess()[1]
- * @param list<string> result of $adminer->selectOrderProcess()
- * @param int|numeric-string result of $adminer->selectLimitProcess()
- * @param int index of page starting at zero
- * @param bool whether to print the query
+ * @param string $table
+ * @param list<string> $select result of $adminer->selectColumnsProcess()[0]
+ * @param list<string> $where result of $adminer->selectSearchProcess()
+ * @param list<string> $group result of $adminer->selectColumnsProcess()[1]
+ * @param list<string> $order result of $adminer->selectOrderProcess()
+ * @param int|numeric-string $limit result of $adminer->selectLimitProcess()
+ * @param int $page index of page starting at zero
+ * @param bool $print whether to print the query
* @return Result|false
*/
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
}
/** Delete data from table
- * @param string
- * @param string " WHERE ..."
- * @param int 0 or 1
+ * @param string $table
+ * @param string $queryWhere " WHERE ..."
+ * @param int $limit 0 or 1
* @return Result|bool
*/
function delete($table, $queryWhere, $limit = 0) {
}
/** Update data in table
- * @param string
- * @param string[] escaped columns in keys, quoted data in values
- * @param string " WHERE ..."
- * @param int 0 or 1
- * @param string
+ * @param string $table
+ * @param string[] $set escaped columns in keys, quoted data in values
+ * @param string $queryWhere " WHERE ..."
+ * @param int $limit 0 or 1
+ * @param string $separator
* @return Result|bool
*/
function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
}
/** Insert data into table
- * @param string
- * @param string[] escaped columns in keys, quoted data in values
+ * @param string $table
+ * @param string[] $set escaped columns in keys, quoted data in values
* @return Result|bool
*/
function insert($table, $set) {
}
/** Get RETURNING clause for INSERT queries (PostgreSQL specific)
- * @param string
+ * @param string $table
* @return string
*/
function insertReturning($table) {
}
/** Insert or update data in table
- * @param string
- * @param list<string[]> of arrays with escaped columns in keys and quoted data in values
- * @param int[] column names in keys
+ * @param string $table
+ * @param list<string[]> $rows of arrays with escaped columns in keys and quoted data in values
+ * @param int[] $primary column names in keys
* @return Result|bool
*/
function insertUpdate($table, $rows, $primary) {
}
/** Return query with a timeout
- * @param string
- * @param int seconds
+ * @param string $query
+ * @param int $timeout seconds
* @return string|void null if the driver doesn't support query timeouts
*/
function slowQuery($query, $timeout) {
}
/** Convert column to be searchable
- * @param string escaped column name
- * @param array{op:string, val:string}
- * @param Field
+ * @param string $idf escaped column name
+ * @param array{op:string, val:string} $val
+ * @param Field $field
* @return string
*/
function convertSearch($idf, $val, $field) {
}
/** Convert value returned by database to actual value
- * @param string
- * @param Field
+ * @param string $val
+ * @param Field $field
* @return string
*/
function value($val, $field) {
}
/** Quote binary string
- * @param string
+ * @param string $s
* @return string
*/
function quoteBinary($s) {
}
/** Get help link for table
- * @param string
- * @param bool
+ * @param string $name
+ * @param bool $is_view
* @return string|void relative URL
*/
function tableHelp($name, $is_view = false) {
}
/** Check whether table supports indexes
- * @param TableStatus result of table_status1()
+ * @param TableStatus $table_status result of table_status1()
* @return bool
*/
function supportsIndex($table_status) {
}
/** Get defined check constraints
- * @param string
+ * @param string $table
* @return string[] [$name => $clause]
*/
function checkConstraints($table) {
// This file is not used in Adminer Editor.
/** Print select result
-* @param Result
-* @param Db connection to examine indexes
-* @param string[]
-* @param int
+* @param Result $result
+* @param Db $connection2 connection to examine indexes
+* @param string[] $orgtables
+* @param int $limit
* @return string[] $orgtables
*/
function select($result, $connection2 = null, $orgtables = array(), $limit = 0) {
}
/** Get referencable tables with single column primary key except self
-* @param string
+* @param string $self
* @return array<string, Field> [$table_name => $field]
*/
function referencable_primary($self) {
}
/** Print SQL <textarea> tag
-* @param string
-* @param string|list<array{string}>
-* @param int
-* @param int
+* @param string $name
+* @param string|list<array{string}> $value
+* @param int $rows
+* @param int $cols
* @return void
*/
function textarea($name, $value, $rows = 10, $cols = 80) {
}
/** Generate HTML <select> or <input> if $options are empty
-* @param string
-* @param string[]
-* @param string
-* @param string
-* @param string
+* @param string $attrs
+* @param string[] $options
+* @param string $value
+* @param string $onchange
+* @param string $placeholder
* @return string
*/
function select_input($attrs, $options, $value = "", $onchange = "", $placeholder = "") {
}
/** Print one row in JSON object
-* @param string or "" to close the object
-* @param string|int
+* @param string $key or "" to close the object
+* @param string|int $val
* @return void
*/
function json_row($key, $val = null) {
}
/** Print table columns for type edit
-* @param string
-* @param Field
-* @param list<string>
-* @param string[]
-* @param list<string> extra types to prepend
+* @param string $key
+* @param Field $field
+* @param list<string> $collations
+* @param string[] $foreign_keys
+* @param list<string> $extra_types extra types to prepend
* @return void
*/
function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_types = array()) {
}
/** Get partition info
-* @param string
+* @param string $table
* @return array{partition_by:string, partition:string, partitions:string, partition_names:list<string>, partition_values:list<string>}
*/
function get_partitions_info($table) {
}
/** Filter length value including enums
-* @param string
+* @param string $length
* @return string
*/
function process_length($length) {
}
/** Create SQL string from field type
-* @param FieldType
-* @param string
+* @param FieldType $field
+* @param string $collate
* @return string
*/
function process_type($field, $collate = "COLLATE") {
}
/** Create SQL string from field
-* @param Field basic field information
-* @param Field information about field type
+* @param Field $field basic field information
+* @param Field $type_field information about field type
* @return list<string> ["field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT"]
*/
function process_field($field, $type_field) {
}
/** Get default value clause
-* @param Field
+* @param Field $field
* @return string
*/
function default_value($field) {
}
/** Get type class to use in CSS
-* @param string
+* @param string $type
* @return string|void class=''
*/
function type_class($type) {
}
/** Print table interior for fields editing
-* @param (Field|RoutineField)[]
-* @param list<string>
-* @param 'TABLE'|'PROCEDURE'
-* @param string[]
+* @param (Field|RoutineField)[] $fields
+* @param list<string> $collations
+* @param 'TABLE'|'PROCEDURE' $type
+* @param string[] $foreign_keys
* @return void
*/
function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array()) {
}
/** Move fields up and down or add field
-* @param Field[]
+* @param Field[] $fields
* @return bool
*/
function process_fields(&$fields) {
}
/** Callback used in routine()
-* @param list<string>
+* @param list<string> $match
* @return string
*/
function normalize_enum($match) {
}
/** Issue grant or revoke commands
-* @param string GRANT or REVOKE
-* @param list<string>
-* @param string
-* @param string
+* @param string $grant GRANT or REVOKE
+* @param list<string> $privileges
+* @param string $columns
+* @param string $on
* @return Result|bool
*/
function grant($grant, $privileges, $columns, $on) {
}
/** Drop old object and create a new one
-* @param string drop old object query
-* @param string create new object query
-* @param string drop new object query
-* @param string create test object query
-* @param string drop test object query
-* @param string
-* @param string
-* @param string
-* @param string
-* @param string
-* @param string
+* @param string $drop drop old object query
+* @param string $create create new object query
+* @param string $drop_created drop new object query
+* @param string $test create test object query
+* @param string $drop_test drop test object query
+* @param string $location
+* @param string $message_drop
+* @param string $message_alter
+* @param string $message_create
+* @param string $old_name
+* @param string $new_name
* @return void redirect on success
*/
function drop_create($drop, $create, $drop_created, $test, $drop_test, $location, $message_drop, $message_alter, $message_create, $old_name, $new_name) {
}
/** Generate SQL query for creating trigger
-* @param string
-* @param Trigger result of trigger()
+* @param string $on
+* @param Trigger $row result of trigger()
* @return string
*/
function create_trigger($on, $row) {
}
/** Generate SQL query for creating routine
-* @param 'PROCEDURE'|'FUNCTION'
-* @param Routine result of routine()
+* @param 'PROCEDURE'|'FUNCTION' $routine
+* @param Routine $row result of routine()
* @return string
*/
function create_routine($routine, $row) {
}
/** Remove current user definer from SQL command
-* @param string
+* @param string $query
* @return string
*/
function remove_definer($query) {
}
/** Format foreign key to use in SQL query
-* @param ForeignKey
+* @param ForeignKey $foreign_key
* @return string
*/
function format_foreign_key($foreign_key) {
}
/** Add a file to TAR
-* @param string
-* @param TmpFile
+* @param string $filename
+* @param TmpFile $tmp_file
* @return void prints the output
*/
function tar_file($filename, $tmp_file) {
}
/** Get INI bytes value
-* @param string
+* @param string $ini
* @return int
*/
function ini_bytes($ini) {
}
/** Create link to database documentation
-* @param string[] JUSH => $path
-* @param string HTML code
+* @param string[] $paths JUSH => $path
+* @param string $text HTML code
* @return string HTML code
*/
function doc_link($paths, $text = "<sup>?</sup>") {
}
/** Compute size of database
-* @param string
+* @param string $db
* @return string formatted
*/
function db_size($db) {
}
/** Print SET NAMES if utf8mb4 might be needed
-* @param string
+* @param string $create
* @return void
*/
function set_utf8mb4($create) {
}
/** Unescape database identifier
-* @param string text inside ``
+* @param string $idf text inside ``
* @return string
*/
function idf_unescape($idf) {
}
/** Shortcut for $connection->quote($string)
-* @param string
+* @param string $string
* @return string
*/
function q($string) {
}
/** Escape string to use inside ''
-* @param string
+* @param string $val
* @return string
*/
function escape_string($val) {
/** Get a possibly missing item from a possibly missing array
* idx($row, $key) is better than $row[$key] ?? null because PHP will report error for undefined $row
-* @param ?mixed[]
-* @param string|int
-* @param mixed
+* @param ?mixed[] $array
+* @param string|int $key
+* @param mixed $default
* @return mixed
*/
function idx($array, $key, $default = null) {
}
/** Remove non-digits from a string
-* @param string
+* @param string $val
* @return string
*/
function number($val) {
}
/** Disable magic_quotes_gpc
-* @param list<array> e.g. (&$_GET, &$_POST, &$_COOKIE)
-* @param bool whether to leave values as is
+* @param list<array> $process e.g. (&$_GET, &$_POST, &$_COOKIE)
+* @param bool $filter whether to leave values as is
* @return void modified in place
*/
function remove_slashes($process, $filter = false) {
}
/** Escape or unescape string to use inside form []
-* @param string
-* @param bool
+* @param string $idf
+* @param bool $back
* @return string
*/
function bracket_escape($idf, $back = false) {
}
/** Check if connection has at least the given version
-* @param string|float required version
-* @param string|float required MariaDB version
-* @param Db defaults to $connection
+* @param string|float $version required version
+* @param string|float $maria_db required MariaDB version
+* @param Db $connection2 defaults to $connection
* @return bool
*/
function min_version($version, $maria_db = "", $connection2 = null) {
}
/** Get connection charset
-* @param Db
+* @param Db $connection
* @return string
*/
function charset($connection) {
}
/** Get INI boolean value
-* @param string
+* @param string $ini
* @return bool
*/
function ini_bool($ini) {
}
/** Set password to session
-* @param string
-* @param string
-* @param string
-* @param ?string
+* @param string $vendor
+* @param string $server
+* @param string $username
+* @param ?string $password
* @return void
*/
function set_password($vendor, $server, $username, $password) {
}
/** Get single value from database
-* @param string
-* @param int
+* @param string $query
+* @param int $field
* @return string or false if error
*/
function get_val($query, $field = 0) {
}
/** Get list of values from database
-* @param string
-* @param mixed
+* @param string $query
+* @param mixed $column
* @return list<string>
*/
function get_vals($query, $column = 0) {
}
/** Get keys from first column and values from second
-* @param string
-* @param Db
-* @param bool
+* @param string $query
+* @param Db $connection2
+* @param bool $set_keys
* @return string[]
*/
function get_key_vals($query, $connection2 = null, $set_keys = true) {
}
/** Get all rows of result
-* @param string
-* @param Db
-* @param string
+* @param string $query
+* @param Db $connection2
+* @param string $error
* @return list<string[]> of associative arrays
*/
function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
}
/** Find unique identifier of a row
-* @param string[]
-* @param Index[] result of indexes()
+* @param string[] $row
+* @param Index[] $indexes result of indexes()
* @return string[]|void null if there is no unique identifier
*/
function unique_array($row, $indexes) {
}
/** Escape column key used in where()
-* @param string
+* @param string $key
* @return string
*/
function escape_key($key) {
}
/** Create SQL condition from parsed query string
-* @param array{where:string[], null:list<string>} parsed query string
-* @param Field[]
+* @param array{where:string[], null:list<string>} $where parsed query string
+* @param Field[] $fields
* @return string
*/
function where($where, $fields = array()) {
}
/** Create SQL condition from query string
-* @param string
-* @param Field[]
+* @param string $val
+* @param Field[] $fields
* @return string
*/
function where_check($val, $fields = array()) {
}
/** Create query string where condition from value
-* @param int condition order
-* @param string column identifier
-* @param string
-* @param string
+* @param int $i condition order
+* @param string $column column identifier
+* @param string $value
+* @param string $operator
* @return string
*/
function where_link($i, $column, $value, $operator = "=") {
}
/** Get select clause for convertible fields
-* @param mixed[] only keys are used
-* @param Field[]
-* @param list<string>
+* @param mixed[] $columns only keys are used
+* @param Field[] $fields
+* @param list<string> $select
* @return string
*/
function convert_fields($columns, $fields, $select = array()) {
}
/** Set cookie valid on current path
-* @param string
-* @param string
-* @param int number of seconds, 0 for session cookie, 2592000 - 30 days
+* @param string $name
+* @param string $value
+* @param int $lifetime number of seconds, 0 for session cookie, 2592000 - 30 days
* @return void
*/
function cookie($name, $value, $lifetime = 2592000) {
}
/** Get settings stored in a cookie
-* @param string
+* @param string $cookie
* @return mixed[]
*/
function get_settings($cookie) {
}
/** Get setting stored in a cookie
-* @param string
-* @param string
+* @param string $key
+* @param string $cookie
* @return mixed
*/
function get_setting($key, $cookie = "adminer_settings") {
}
/** Store settings to a cookie
-* @param mixed[]
-* @param string
+* @param mixed[] $settings
+* @param string $cookie
* @return void
*/
function save_settings($settings, $cookie = "adminer_settings") {
}
/** Stop session if possible
-* @param bool
+* @param bool $force
* @return void
*/
function stop_session($force = false) {
}
/** Get session variable for current server
-* @param string
+* @param string $key
* @return mixed
*/
function &get_session($key) {
}
/** Set session variable for current server
-* @param string
-* @param mixed
+* @param string $key
+* @param mixed $val
* @return mixed
*/
function set_session($key, $val) {
}
/** Get authenticated URL
-* @param string
-* @param string
-* @param string
-* @param string
+* @param string $vendor
+* @param string $server
+* @param string $username
+* @param string $db
* @return string
*/
function auth_url($vendor, $server, $username, $db = null) {
}
/** Send Location header and exit
-* @param string null to only set a message
-* @param string
+* @param string $location null to only set a message
+* @param string $message
* @return void
*/
function redirect($location, $message = null) {
}
/** Execute query and redirect if successful
-* @param string
-* @param string
-* @param string
-* @param bool
-* @param bool
-* @param bool
-* @param string
+* @param string $query
+* @param string $location
+* @param string $message
+* @param bool $redirect
+* @param bool $execute
+* @param bool $failed
+* @param string $time
* @return bool
*/
function query_redirect($query, $location, $message, $redirect = true, $execute = true, $failed = false, $time = "") {
}
/** Execute and remember query
-* @param string end with ';' to use DELIMITER
+* @param string $query end with ';' to use DELIMITER
* @return Result|bool
*/
function queries($query) {
}
/** Apply command to all array items
-* @param string
-* @param list<string>
-* @param callable(string):string
+* @param string $query
+* @param list<string> $tables
+* @param callable(string):string $escape
* @return bool
*/
function apply_queries($query, $tables, $escape = 'Adminer\table') {
}
/** Redirect by remembered queries
-* @param string
-* @param string
-* @param bool
+* @param string $location
+* @param string $message
+* @param bool $redirect
* @return bool
*/
function queries_redirect($location, $message, $redirect) {
}
/** Format elapsed time
-* @param float output of microtime(true)
+* @param float $start output of microtime(true)
* @return string HTML code
*/
function format_time($start) {
}
/** Remove parameter from query string
-* @param string
+* @param string $param
* @return string
*/
function remove_from_uri($param = "") {
}
/** Get file contents from $_FILES
-* @param string
-* @param bool
-* @param string
+* @param string $key
+* @param bool $decompress
+* @param string $delimiter
* @return mixed int for error, string otherwise
*/
function get_file($key, $decompress = false, $delimiter = "") {
}
/** Determine upload error
-* @param int
+* @param int $error
* @return string
*/
function upload_error($error) {
}
/** Create repeat pattern for preg
-* @param string
-* @param int
+* @param string $pattern
+* @param int $length
* @return string
*/
function repeat_pattern($pattern, $length) {
}
/** Check whether the string is in UTF-8
-* @param string
+* @param string $val
* @return bool
*/
function is_utf8($val) {
}
/** Shorten UTF-8 string
-* @param string
-* @param int
-* @param string
+* @param string $string
+* @param int $length
+* @param string $suffix
* @return string escaped string with appended ...
*/
function shorten_utf8($string, $length = 80, $suffix = "") {
}
/** Format decimal number
-* @param float|numeric-string
+* @param float|numeric-string $val
* @return string
*/
function format_number($val) {
}
/** Generate friendly URL
-* @param string
+* @param string $val
* @return string
*/
function friendly_url($val) {
}
/** Get status of a single table and fall back to name on error
-* @param string
-* @param bool
+* @param string $table
+* @param bool $fast
* @return TableStatus one element from table_status()
*/
function table_status1($table, $fast = false) {
}
/** Find out foreign keys for each column
-* @param string
+* @param string $table
* @return list<ForeignKey>[] [$col => []]
*/
function column_foreign_keys($table) {
}
/** Send headers for export
-* @param string
-* @param bool
+* @param string $identifier
+* @param bool $multi_table
* @return string extension
*/
function dump_headers($identifier, $multi_table = false) {
}
/** Print CSV row
-* @param string[]
+* @param string[] $row
* @return void
*/
function dump_csv($row) {
}
/** Apply SQL function
-* @param string
-* @param string escaped column identifier
+* @param string $function
+* @param string $column escaped column identifier
* @return string
*/
function apply_sql_function($function, $column) {
}
/** Open and exclusively lock a file
-* @param string
+* @param string $filename
* @return resource|void null for error
*/
function file_open_lock($filename) {
}
/** Write and unlock a file
-* @param resource
-* @param string
+* @param resource $fp
+* @param string $data
* @return void
*/
function file_write_unlock($fp, $data) {
}
/** Unlock and close a file
-* @param resource
+* @param resource $fp
* @return void
*/
function file_unlock($fp) {
}
/** Get first element of an array
-* @param mixed[]
+* @param mixed[] $array
* @return mixed if not found
*/
function first($array) {
}
/** Read password from file adminer.key in temporary directory or create one
-* @param bool
+* @param bool $create
* @return string|false false if the file can not be created
*/
function password_file($create) {
}
/** Format value to use in select
-* @param string|string[]
-* @param string
-* @param Field
-* @param int
+* @param string|string[] $val
+* @param string $link
+* @param Field $field
+* @param int $text_length
* @return string HTML
*/
function select_value($val, $link, $field, $text_length) {
}
/** Check whether the string is e-mail address
-* @param ?string
+* @param ?string $email
* @return bool
*/
function is_mail($email) {
}
/** Check whether the string is URL address
-* @param string
+* @param string $string
* @return bool
*/
function is_url($string) {
}
/** Check if field should be shortened
-* @param Field
+* @param Field $field
* @return bool
*/
function is_shortable($field) {
}
/** Get query to compute number of found rows
-* @param string
-* @param list<string>
-* @param bool
-* @param list<string>
+* @param string $table
+* @param list<string> $where
+* @param bool $is_group
+* @param list<string> $group
* @return string
*/
function count_rows($table, $where, $is_group, $group) {
}
/** Run query which can be killed by AJAX call after timing out
-* @param string
+* @param string $query
* @return string[]
*/
function slow_query($query) {
// used in compiled version
/**
-* @param string
+* @param string $binary
* @return string
*/
function lzw_decompress($binary) {
namespace Adminer;
/** Return <script> element
-* @param string
-* @param string
+* @param string $source
+* @param string $trailing
* @return string
*/
function script($source, $trailing = "\n") {
}
/** Return <script src> element
-* @param string
+* @param string $url
* @return string
*/
function script_src($url) {
}
/** Get <input type="hidden">
-* @param string
-* @param string|int
+* @param string $name
+* @param string|int $value
* @return string HTML
*/
function input_hidden($name, $value = "") {
}
/** Get <input type="hidden" name="token">
-* @param string token to use instead of global $token
+* @param string $special token to use instead of global $token
* @return string HTML
*/
function input_token($special = "") {
}
/** Escape for HTML
-* @param string
+* @param string $string
* @return string
*/
function h($string) {
}
/** Convert \n to <br>
-* @param string
+* @param string $string
* @return string
*/
function nl_br($string) {
}
/** Generate HTML checkbox
-* @param string
-* @param string|int
-* @param bool
-* @param string
-* @param string
-* @param string
-* @param string
+* @param string $name
+* @param string|int $value
+* @param bool $checked
+* @param string $label
+* @param string $onclick
+* @param string $class
+* @param string $labelled_by
* @return string
*/
function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "", $labelled_by = "") {
}
/** Generate list of HTML options
-* @param string[]|string[][] array of strings or arrays (creates optgroup)
-* @param mixed
-* @param bool always use array keys for value="", otherwise only string keys are used
+* @param string[]|string[][] $options array of strings or arrays (creates optgroup)
+* @param mixed $selected
+* @param bool $use_keys always use array keys for value="", otherwise only string keys are used
* @return string
*/
function optionlist($options, $selected = null, $use_keys = false) {
}
/** Generate HTML <select>
-* @param string
-* @param string[]
-* @param string
-* @param string
-* @param string
+* @param string $name
+* @param string[] $options
+* @param string $value
+* @param string $onchange
+* @param string $labelled_by
* @return string
*/
function html_select($name, $options, $value = "", $onchange = "", $labelled_by = "") {
}
/** Generate HTML radio list
-* @param string
-* @param string[]
-* @param string
+* @param string $name
+* @param string[] $options
+* @param string $value
* @return string
*/
function html_radios($name, $options, $value = "") {
}
/** Get onclick confirmation
-* @param string
-* @param string
+* @param string $message
+* @param string $selector
* @return string
*/
function confirm($message = "", $selector = "qsl('input')") {
}
/** Print header for hidden fieldset (close by </div></fieldset>)
-* @param string
-* @param string
-* @param bool
+* @param string $id
+* @param string $legend
+* @param bool $visible
* @return void
*/
function print_fieldset($id, $legend, $visible = false) {
}
/** Return class='active' if $bold is true
-* @param bool
-* @param string
+* @param bool $bold
+* @param string $class
* @return string
*/
function bold($bold, $class = "") {
}
/** Escape string for JavaScript apostrophes
-* @param string
+* @param string $string
* @return string
*/
function js_escape($string) {
}
/** Generate page number for pagination
-* @param int
-* @param int
+* @param int $page
+* @param int $current
* @return string
*/
function pagination($page, $current) {
}
/** Print hidden fields
-* @param mixed[]
-* @param list<string>
-* @param string
+* @param mixed[] $process
+* @param list<string> $ignore
+* @param string $prefix
* @return bool
*/
function hidden_fields($process, $ignore = array(), $prefix = '') {
}
/** Print enum or set input field
-* @param string "radio"|"checkbox"
-* @param string
-* @param Field
-* @param mixed string|array
-* @param string
+* @param string $type "radio"|"checkbox"
+* @param string $attrs
+* @param Field $field
+* @param mixed $value string|array
+* @param string $empty
* @return string
*/
function enum_input($type, $attrs, $field, $value, $empty = null) {
}
/** Print edit input field
-* @param Field|RoutineField one field from fields()
-* @param mixed
-* @param string
-* @param bool
+* @param Field|RoutineField $field one field from fields()
+* @param mixed $value
+* @param string $function
+* @param bool $autofocus
* @return void
*/
function input($field, $value, $function, $autofocus = false) {
}
/** Process edit input field
-* @param Field|RoutineField one field from fields()
+* @param Field|RoutineField $field one field from fields()
* @return mixed false to leave the original value
*/
function process_input($field) {
}
/** Return events to display help on mouse over
-* @param string JS expression
-* @param int JS expression
+* @param string $command JS expression
+* @param int $side JS expression
* @return string
*/
function on_help($command, $side = 0) {
}
/** Print edit data form
-* @param string
-* @param Field[]
-* @param mixed
-* @param bool
+* @param string $table
+* @param Field[] $fields
+* @param mixed $row
+* @param bool $update
* @return void
*/
function edit_form($table, $fields, $row, $update) {
}
/** Get button with icon
-* @param string
-* @param string
-* @param string
-* @param string
+* @param string $icon
+* @param string $name
+* @param string $html
+* @param string $title
* @return string
*/
function icon($icon, $name, $html, $title) {
}
/** Translate string
-* @param literal-string
-* @param float|string
+* @param literal-string $idf
+* @param float|string $number
* @return string
*/
function lang($idf, $number = null) {
/** @var \PDO */ protected $pdo;
/** Connect to server using DSN
- * @param string
- * @param string
- * @param string
- * @param mixed[]
+ * @param string $dsn
+ * @param string $username
+ * @param string $password
+ * @param mixed[] $options
* @return void
*/
function dsn($dsn, $username, $password, $options = array()) {
/** @var list<object> @visibility protected(set) */ public $plugins;
/** Register plugins
- * @param ?list<object> object instances or null to autoload plugins from adminer-plugins/
+ * @param ?list<object> $plugins object instances or null to autoload plugins from adminer-plugins/
*/
function __construct($plugins) {
if ($plugins === null) {
}
/**
- * @param literal-string
- * @param mixed[]
+ * @param literal-string $function
+ * @param mixed[] $args
* @return mixed
*/
private function callParent($function, $args) {
}
/**
- * @param literal-string
- * @param mixed[]
+ * @param literal-string $function
+ * @param mixed[] $params
* @return mixed
*/
private function applyPlugin($function, $params) {
}
/**
- * @param literal-string
- * @param mixed[]
+ * @param literal-string $function
+ * @param mixed[] $args
* @return mixed
*/
private function appendPlugin($function, $args) {
}
/**
- * @param string
+ * @param string $contents
* @return void
*/
function write($contents) {
*/
/**
-* @param int
+* @param int $n
* @return int
*/
function int32($n) {
}
/**
-* @param int[]
-* @param bool
+* @param int[] $v
+* @param bool $w
* @return string
*/
function long2str($v, $w) {
}
/**
-* @param string
-* @param bool
+* @param string $s
+* @param bool $w
* @return int[]
*/
function str2long($s, $w) {
}
/**
-* @param int
-* @param int
-* @param int
-* @param int
+* @param int $z
+* @param int $y
+* @param int $sum
+* @param int $k
* @return int
*/
function xxtea_mx($z, $y, $sum, $k) {
}
/** Cipher
-* @param string plain-text password
-* @param string
+* @param string $str plain-text password
+* @param string $key
* @return string binary cipher
*/
function encrypt_string($str, $key) {
}
/** Decipher
-* @param string binary cipher
-* @param string
+* @param string $str binary cipher
+* @param string $key
* @return string|false plain-text password
*/
function decrypt_string($str, $key) {
namespace Adminer;
/** Encode e-mail header in UTF-8
-* @param string
+* @param string $header
* @return string
*/
function email_header($header) {
}
/** Send e-mail in UTF-8
-* @param string
-* @param string
-* @param string
-* @param string
-* @param array{error?:list<int>, type?:list<string>, name?:list<string>, tmp_name?:list<string>}
+* @param string $email
+* @param string $subject
+* @param string $message
+* @param string $from
+* @param array{error?:list<int>, type?:list<string>, name?:list<string>, tmp_name?:list<string>} $files
* @return bool
*/
function send_mail($email, $subject, $message, $from = "", $files = array()) {
}
/** Check whether the column looks like boolean
-* @param Field single field returned from fields()
+* @param Field $field single field returned from fields()
* @return bool
*/
function like_bool($field) {
protected $disabled;
/**
- * @param list<string> case insensitive database names in values
+ * @param list<string> $disabled case insensitive database names in values
*/
function __construct($disabled) {
$this->disabled = array_map('strtolower', $disabled);
protected $designs;
/**
- * @param list<string> URL in key, name in value
+ * @param list<string> $designs URL in key, name in value
*/
function __construct($designs) {
$this->designs = $designs;
/**
* @param string $path
- * @param array|null $content
+ * @param ?array $content
* @param string $method
* @return array|false
*/
/** Perform query relative to actual selected DB
* @param string $path
- * @param array|null $content
+ * @param ?array $content
* @param string $method
* @return array|false
*/
}
/** Alter type
- * @param array
+ * @param array $table
* @return mixed
*/
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
}
/** Drop types
- * @param list<string>
+ * @param list<string> $tables
* @return bool
*/
function drop_tables($tables) {
protected $prepend, $langPath;
/**
- * @param string text to append before first calendar usage
- * @param string path to language file, %s stands for language code
+ * @param string $prepend text to append before first calendar usage
+ * @param string $langPath path to language file, %s stands for language code
*/
function __construct($prepend = null, $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") {
$this->prepend = $prepend;
protected $table, $id, $title, $subject, $message;
/**
- * @param string quoted table name
- * @param string quoted column name
- * @param string quoted column name
- * @param string quoted column name
- * @param string quoted column name
+ * @param string $table quoted table name
+ * @param string $id quoted column name
+ * @param string $title quoted column name
+ * @param string $subject quoted column name
+ * @param string $message quoted column name
*/
function __construct($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") {
$this->table = $table;
protected $uploadPath, $displayPath, $extensions;
/**
- * @param string prefix for uploading data (create writable subdirectory for each table containing uploadable fields)
- * @param string prefix for displaying data, null stands for $uploadPath
- * @param string regular expression with allowed file extensions
+ * @param string $uploadPath prefix for uploading data (create writable subdirectory for each table containing uploadable fields)
+ * @param string $displayPath prefix for displaying data, null stands for $uploadPath
+ * @param string $extensions regular expression with allowed file extensions
*/
function __construct($uploadPath = "../static/data/", $displayPath = null, $extensions = "[a-zA-Z0-9]+") {
$this->uploadPath = $uploadPath;
protected $sameOrigin;
/**
- * @param bool allow running from the same origin only
+ * @param bool $sameOrigin allow running from the same origin only
*/
function __construct($sameOrigin = false) {
$this->sameOrigin = $sameOrigin;
protected $ips, $forwarded_for;
/** Set allowed IP addresses
- * @param list<string> IP address prefixes
- * @param list<string> X-Forwarded-For prefixes if IP address matches, empty array means anything
+ * @param list<string> $ips IP address prefixes
+ * @param list<string> $forwarded_for X-Forwarded-For prefixes if IP address matches, empty array means anything
*/
function __construct($ips, $forwarded_for = array()) {
$this->ips = $ips;
protected $secret;
/**
- * @param string decoded secret, e.g. base64_decode("SECRET")
+ * @param string $secret decoded secret, e.g. base64_decode("SECRET")
*/
function __construct($secret) {
$this->secret = $secret;
protected $password_hash;
/** Set allowed password
- * @param string result of password_hash
+ * @param string $password_hash result of password_hash
*/
function __construct($password_hash) {
$this->password_hash = $password_hash;
protected $servers;
/** Set supported servers
- * @param array{server:string, driver:string}[] [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
+ * @param array{server:string, driver:string}[] $servers [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
*/
function __construct($servers) {
$this->servers = $servers;
protected $ssl;
/**
- * @param array
+ * @param array $ssl
* MySQL: ["key" => filename, "cert" => filename, "ca" => filename, "verify" => bool]
* PostgresSQL: ["mode" => sslmode] (https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE)
* MSSQL: ["Encrypt" => true, "TrustServerCertificate" => true] (https://learn.microsoft.com/en-us/sql/connect/php/connection-options)
protected $database;
/** Set database of login table
- * @param string
+ * @param string $database
*/
function __construct($database) {
$this->database = $database;
private $masters = array();
/**
- * @param string[] [$slave => $master]
+ * @param string[] $masters [$slave => $master]
*/
function __construct($masters) {
$this->masters = $masters;
protected $from, $to;
/**
- * @param string find these characters ...
- * @param string ... and replace them by these
+ * @param string $from find these characters ...
+ * @param string $to ... and replace them by these
*/
function __construct($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') {
$this->from = $from;
private $model;
/**
- * @param string Get API key at: https://aistudio.google.com/apikey
- * @param string Available models: https://ai.google.dev/gemini-api/docs/models#available-models
+ * @param string $apiKey Get API key at: https://aistudio.google.com/apikey
+ * @param string $model Available models: https://ai.google.dev/gemini-api/docs/models#available-models
*/
function __construct($apiKey, $model = "gemini-2.0-flash") {
$this->apiKey = $apiKey;
protected $filename;
/**
- * @param string defaults to "$database.sql"
+ * @param string $filename defaults to "$database.sql"
*/
function __construct($filename = "") {
$this->filename = $filename;
class AdminerTableIndexesStructure {
/** Print table structure in tabular format
- * @param Index[] data about all indexes on a table
+ * @param Index[] $indexes data about all indexes on a table
* @return bool
*/
function tableIndexesPrint($indexes) {
class AdminerTableStructure {
/** Print table structure in tabular format
- * @param Field[] data about individual fields
+ * @param Field[] $fields data about individual fields
* @return bool
*/
function tableStructurePrint($fields, $tableStatus = null) {
protected $path;
/**
- * @param string
+ * @param string $path
*/
function __construct($path = "tiny_mce/tiny_mce.js") {
$this->path = $path;