1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-05 14:17:26 +02:00

Doc-comments: Add param names

This commit is contained in:
Jakub Vrana
2025-03-28 07:06:34 +01:00
parent 3bde36b68e
commit 911f3b71b7
37 changed files with 548 additions and 548 deletions

View File

@@ -92,7 +92,7 @@ if ($in) {
<pre>
<?php
/** Format string as table row
* @param string
* @param string $s
* @return string HTML
*/
function pre_tr($s) {

View File

@@ -84,7 +84,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Set the client character set
* @param string
* @param string $charset
* @return bool
*/
function set_charset($charset) {
@@ -129,7 +129,7 @@ if (!defined('Adminer\DRIVER')) {
/** @var int */ private $offset = 0;
/** Constructor
* @param resource
* @param resource $result
*/
function __construct($result) {
$this->result = $result;
@@ -359,7 +359,7 @@ if (!defined('Adminer\DRIVER')) {
/** Escape database identifier
* @param string
* @param string $idf
* @return string
*/
function idf_escape($idf) {
@@ -367,7 +367,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get escaped table name
* @param string
* @param string $idf
* @return string
*/
function table($idf) {
@@ -375,7 +375,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -396,7 +396,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get cached list of databases
* @param bool
* @param bool $flush
* @return list<string>
*/
function get_databases($flush) {
@@ -413,11 +413,11 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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 = " ") {
@@ -425,10 +425,10 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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") {
@@ -436,8 +436,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -467,7 +467,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Count tables in all databases
* @param list<string>
* @param list<string> $databases
* @return int[] [$db => $tables]
*/
function count_tables($databases) {
@@ -479,8 +479,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -509,7 +509,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Find out whether the identifier is view
* @param TableStatus
* @param TableStatus $table_status
* @return bool
*/
function is_view($table_status) {
@@ -517,7 +517,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -525,7 +525,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get information about fields
* @param string
* @param string $table
* @return Field[]
*/
function fields($table) {
@@ -580,8 +580,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get table indexes
* @param string
* @param ?Db
* @param string $table
* @param ?Db $connection2
* @return Index[]
*/
function indexes($table, $connection2 = null) {
@@ -597,7 +597,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get foreign keys in table
* @param string
* @param string $table
* @return ForeignKey[]
*/
function foreign_keys($table) {
@@ -629,7 +629,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get view SELECT
* @param string
* @param string $name
* @return array{select:string}
*/
function view($name) {
@@ -656,7 +656,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Find out if database is information_schema
* @param string
* @param string $db
* @return bool
*/
function information_schema($db) {
@@ -673,8 +673,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** Create database
* @param string
* @param string
* @param string $db
* @param string $collation
* @return Result
*/
function create_database($db, $collation) {
@@ -682,7 +682,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Drop databases
* @param list<string>
* @param list<string> $databases
* @return bool
*/
function drop_databases($databases) {
@@ -693,8 +693,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -736,15 +736,15 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -782,8 +782,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -798,7 +798,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Run commands to truncate tables
* @param list<string>
* @param list<string> $tables
* @return bool
*/
function truncate_tables($tables) {
@@ -806,7 +806,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Drop views
* @param list<string>
* @param list<string> $views
* @return Result|bool
*/
function drop_views($views) {
@@ -814,7 +814,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Drop tables
* @param list<string>
* @param list<string> $tables
* @return Result|bool
*/
function drop_tables($tables) {
@@ -822,9 +822,9 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -852,9 +852,9 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -889,8 +889,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get information about trigger
* @param string trigger name
* @param string
* @param string $name trigger name
* @param string $table
* @return Trigger
*/
function trigger($name, $table) {
@@ -902,7 +902,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get defined triggers
* @param string
* @param string $table
* @return array{string, string}[]
*/
function triggers($table) {
@@ -925,8 +925,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get information about stored routine
* @param string
* @param 'FUNCTION'|'PROCEDURE'
* @param string $name
* @param 'FUNCTION'|'PROCEDURE' $type
* @return Routine
*/
function routine($name, $type) {
@@ -978,8 +978,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -987,7 +987,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get last auto increment ID
* @param Result or true
* @param Result $result or true
* @return string
*/
function last_id($result) {
@@ -995,8 +995,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** Explain select
* @param Db
* @param string
* @param Db $connection
* @param string $query
* @return Result
*/
function explain($connection, $query) {
@@ -1004,8 +1004,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -1013,9 +1013,9 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -1027,7 +1027,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get SQL command to truncate table
* @param string
* @param string $table
* @return string
*/
function truncate_sql($table) {
@@ -1035,7 +1035,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get SQL command to change database
* @param string
* @param string $database
* @return string
*/
function use_sql($database) {
@@ -1043,7 +1043,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get SQL commands to create triggers
* @param string
* @param string $table
* @return string
*/
function trigger_sql($table) {
@@ -1076,7 +1076,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -1092,8 +1092,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -1111,7 +1111,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** 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) {
@@ -1119,7 +1119,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Kill a process
* @param numeric-string
* @param numeric-string $val
* @return Result|bool
*/
function kill_process($val) {
@@ -1150,7 +1150,7 @@ if (!defined('Adminer\DRIVER')) {
}
/** Get values of user defined type
* @param int
* @param int $id
* @return string
*/
function type_values($id) {
@@ -1172,8 +1172,8 @@ if (!defined('Adminer\DRIVER')) {
}
/** Set current schema
* @param string
* @param Db
* @param string $schema
* @param Db $connection2
* @return bool
*/
function set_schema($schema, $connection2 = null) {

View File

@@ -452,15 +452,15 @@ if (isset($_GET["sqlite"])) {
}
/** 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 = "") {

View File

@@ -28,7 +28,7 @@ class Adminer {
}
/** 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) {
@@ -43,7 +43,7 @@ class Adminer {
}
/** Get server name displayed in breadcrumbs
* @param string
* @param string $server
* @return string HTML code or null
*/
function serverName($server) {
@@ -59,7 +59,7 @@ class Adminer {
}
/** Get cached list of databases
* @param bool
* @param bool $flush
* @return list<string>
*/
function databases($flush = true) {
@@ -94,7 +94,7 @@ class Adminer {
}
/** 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) {
@@ -137,9 +137,9 @@ class Adminer {
}
/** 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) {
@@ -147,8 +147,8 @@ class Adminer {
}
/** 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) {
@@ -159,7 +159,7 @@ class Adminer {
}
/** 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) {
@@ -167,8 +167,8 @@ class Adminer {
}
/** 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) {
@@ -178,8 +178,8 @@ class Adminer {
}
/** 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 = "") {
@@ -210,7 +210,7 @@ class Adminer {
}
/** Get foreign keys for table
* @param string
* @param string $table
* @return ForeignKey[] same format as foreign_keys()
*/
function foreignKeys($table) {
@@ -218,8 +218,8 @@ class Adminer {
}
/** Find backward keys for table
* @param string
* @param string
* @param string $table
* @param string $tableName
* @return BackwardKey[]
*/
function backwardKeys($table, $tableName) {
@@ -227,17 +227,17 @@ class Adminer {
}
/** 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) {
@@ -256,7 +256,7 @@ class Adminer {
}
/** 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) {
@@ -270,7 +270,7 @@ class Adminer {
}
/** Description of a row in a table
* @param string
* @param string $table
* @return string SQL expression, empty string for no description
*/
function rowDescription($table) {
@@ -278,8 +278,8 @@ class Adminer {
}
/** 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) {
@@ -287,18 +287,18 @@ class Adminer {
}
/** 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) {
@@ -314,8 +314,8 @@ class Adminer {
}
/** 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) {
@@ -323,8 +323,8 @@ class Adminer {
}
/** 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) {
@@ -355,7 +355,7 @@ class Adminer {
}
/** 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) {
@@ -375,8 +375,8 @@ class Adminer {
}
/** 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) {
@@ -402,9 +402,9 @@ class Adminer {
}
/** 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) {
@@ -438,9 +438,9 @@ class Adminer {
}
/** 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) {
@@ -459,7 +459,7 @@ class Adminer {
}
/** Print limit box in select
* @param string result of selectLimitProcess()
* @param string $limit result of selectLimitProcess()
* @return void
*/
function selectLimitPrint($limit) {
@@ -470,7 +470,7 @@ class Adminer {
}
/** Print text length box in select
* @param string result of selectLengthProcess()
* @param string $text_length result of selectLengthProcess()
* @return void
*/
function selectLengthPrint($text_length) {
@@ -482,7 +482,7 @@ class Adminer {
}
/** Print action box in select
* @param Index[]
* @param Index[] $indexes
* @return void
*/
function selectActionPrint($indexes) {
@@ -523,16 +523,16 @@ class Adminer {
}
/** 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) {
@@ -551,8 +551,8 @@ class Adminer {
}
/** 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) {
@@ -605,8 +605,8 @@ class Adminer {
}
/** 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) {
@@ -636,8 +636,8 @@ class Adminer {
}
/** 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) {
@@ -645,12 +645,12 @@ class Adminer {
}
/** 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) {
@@ -658,9 +658,9 @@ class Adminer {
}
/** 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) {
@@ -689,17 +689,17 @@ class Adminer {
}
/** 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) {
@@ -725,10 +725,10 @@ class Adminer {
}
/** 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) {
@@ -742,9 +742,9 @@ class Adminer {
}
/** 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) {
@@ -752,9 +752,9 @@ class Adminer {
}
/** 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 = "") {
@@ -798,16 +798,16 @@ class Adminer {
}
/** 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) {
@@ -840,9 +840,9 @@ class Adminer {
}
/** 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) {
@@ -934,7 +934,7 @@ class Adminer {
}
/** Set export filename
* @param string
* @param string $identifier
* @return string filename without extension
*/
function dumpFilename($identifier) {
@@ -942,8 +942,8 @@ class Adminer {
}
/** Send headers for export
* @param string
* @param bool
* @param string $identifier
* @param bool $multi_table
* @return string extension
*/
function dumpHeaders($identifier, $multi_table = false) {
@@ -991,7 +991,7 @@ class Adminer {
}
/** 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) {
@@ -1052,7 +1052,7 @@ class Adminer {
}
/** 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) {
@@ -1083,7 +1083,7 @@ class Adminer {
}
/** Print databases list in menu
* @param string
* @param string $missing
* @return void
*/
function databasesPrint($missing) {
@@ -1118,7 +1118,7 @@ class Adminer {
}
/** 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) {

View File

@@ -128,7 +128,7 @@ function unset_permanent() {
}
/** Render an error message and a login form
* @param string plain text
* @param string $error plain text
* @return never
*/
function auth_error($error) {

View File

@@ -14,34 +14,34 @@ abstract class SqlDb {
/** @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) {
@@ -63,8 +63,8 @@ abstract class SqlDb {
}
/** Get single field from result
* @param string
* @param int
* @param string $query
* @param int $field
* @return string|bool
*/
function result($query, $field = 0) {

View File

@@ -2,10 +2,10 @@
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 = "") {
@@ -176,7 +176,7 @@ function get_nonce() {
}
/** Print flash and error messages
* @param string
* @param string $error
* @return void
*/
function page_messages($error) {
@@ -196,7 +196,7 @@ function page_messages($error) {
}
/** Print HTML footer
* @param string "auth", "db", "ns"
* @param string $missing "auth", "db", "ns"
* @return void
*/
function page_footer($missing = "") {

View File

@@ -4,8 +4,8 @@ namespace Adminer;
$drivers = array();
/** Add a driver
* @param string
* @param string
* @param string $id
* @param string $name
* @return void
*/
function add_driver($id, $name) {
@@ -14,7 +14,7 @@ function add_driver($id, $name) {
}
/** Get driver name
* @param string
* @param string $id
* @return string
*/
function get_driver($id) {
@@ -39,7 +39,7 @@ abstract class SqlDriver {
/** @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;
@@ -60,28 +60,28 @@ abstract class SqlDriver {
}
/** 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) {
@@ -106,9 +106,9 @@ abstract class SqlDriver {
}
/** 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) {
@@ -117,11 +117,11 @@ abstract class SqlDriver {
}
/** 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") {
@@ -134,8 +134,8 @@ abstract class SqlDriver {
}
/** 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) {
@@ -146,7 +146,7 @@ abstract class SqlDriver {
}
/** Get RETURNING clause for INSERT queries (PostgreSQL specific)
* @param string
* @param string $table
* @return string
*/
function insertReturning($table) {
@@ -154,9 +154,9 @@ abstract class SqlDriver {
}
/** 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) {
@@ -185,17 +185,17 @@ abstract class SqlDriver {
}
/** 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) {
@@ -211,8 +211,8 @@ abstract class SqlDriver {
}
/** Convert value returned by database to actual value
* @param string
* @param Field
* @param string $val
* @param Field $field
* @return string
*/
function value($val, $field) {
@@ -223,7 +223,7 @@ abstract class SqlDriver {
}
/** Quote binary string
* @param string
* @param string $s
* @return string
*/
function quoteBinary($s) {
@@ -237,8 +237,8 @@ abstract class SqlDriver {
}
/** 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) {
@@ -259,7 +259,7 @@ abstract class SqlDriver {
}
/** 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) {
@@ -267,7 +267,7 @@ abstract class SqlDriver {
}
/** Get defined check constraints
* @param string
* @param string $table
* @return string[] [$name => $clause]
*/
function checkConstraints($table) {

View File

@@ -4,10 +4,10 @@ namespace Adminer;
// 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) {
@@ -101,7 +101,7 @@ 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) {
@@ -123,10 +123,10 @@ 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) {
@@ -142,11 +142,11 @@ 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 = "") {
@@ -158,8 +158,8 @@ function select_input($attrs, $options, $value = "", $onchange = "", $placeholde
}
/** 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) {
@@ -177,11 +177,11 @@ 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()) {
@@ -217,7 +217,7 @@ function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_ty
}
/** 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) {
@@ -233,7 +233,7 @@ function get_partitions_info($table) {
}
/** Filter length value including enums
* @param string
* @param string $length
* @return string
*/
function process_length($length) {
@@ -246,8 +246,8 @@ 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") {
@@ -260,8 +260,8 @@ 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) {
@@ -281,7 +281,7 @@ function process_field($field, $type_field) {
}
/** Get default value clause
* @param Field
* @param Field $field
* @return string
*/
function default_value($field) {
@@ -298,7 +298,7 @@ function default_value($field) {
}
/** Get type class to use in CSS
* @param string
* @param string $type
* @return string|void class=''
*/
function type_class($type) {
@@ -317,10 +317,10 @@ 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()) {
@@ -382,7 +382,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
}
/** Move fields up and down or add field
* @param Field[]
* @param Field[] $fields
* @return bool
*/
function process_fields(&$fields) {
@@ -423,7 +423,7 @@ function process_fields(&$fields) {
}
/** Callback used in routine()
* @param list<string>
* @param list<string> $match
* @return string
*/
function normalize_enum($match) {
@@ -432,10 +432,10 @@ 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) {
@@ -453,17 +453,17 @@ 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) {
@@ -487,8 +487,8 @@ function drop_create($drop, $create, $drop_created, $test, $drop_test, $location
}
/** 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) {
@@ -502,8 +502,8 @@ 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) {
@@ -527,7 +527,7 @@ function create_routine($routine, $row) {
}
/** Remove current user definer from SQL command
* @param string
* @param string $query
* @return string
*/
function remove_definer($query) {
@@ -535,7 +535,7 @@ 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) {
@@ -553,8 +553,8 @@ 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) {
@@ -571,7 +571,7 @@ function tar_file($filename, $tmp_file) {
}
/** Get INI bytes value
* @param string
* @param string $ini
* @return int
*/
function ini_bytes($ini) {
@@ -588,8 +588,8 @@ 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>") {
@@ -611,7 +611,7 @@ function doc_link($paths, $text = "<sup>?</sup>") {
}
/** Compute size of database
* @param string
* @param string $db
* @return string formatted
*/
function db_size($db) {
@@ -627,7 +627,7 @@ function db_size($db) {
}
/** Print SET NAMES if utf8mb4 might be needed
* @param string
* @param string $create
* @return void
*/
function set_utf8mb4($create) {

View File

@@ -37,7 +37,7 @@ function version() {
}
/** Unescape database identifier
* @param string text inside ``
* @param string $idf text inside ``
* @return string
*/
function idf_unescape($idf) {
@@ -49,7 +49,7 @@ function idf_unescape($idf) {
}
/** Shortcut for $connection->quote($string)
* @param string
* @param string $string
* @return string
*/
function q($string) {
@@ -58,7 +58,7 @@ function q($string) {
}
/** Escape string to use inside ''
* @param string
* @param string $val
* @return string
*/
function escape_string($val) {
@@ -67,9 +67,9 @@ 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) {
@@ -77,7 +77,7 @@ function idx($array, $key, $default = null) {
}
/** Remove non-digits from a string
* @param string
* @param string $val
* @return string
*/
function number($val) {
@@ -92,8 +92,8 @@ function number_type() {
}
/** 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) {
@@ -113,8 +113,8 @@ 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) {
@@ -124,9 +124,9 @@ 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) {
@@ -143,7 +143,7 @@ function min_version($version, $maria_db = "", $connection2 = null) {
}
/** Get connection charset
* @param Db
* @param Db $connection
* @return string
*/
function charset($connection) {
@@ -151,7 +151,7 @@ function charset($connection) {
}
/** Get INI boolean value
* @param string
* @param string $ini
* @return bool
*/
function ini_bool($ini) {
@@ -171,10 +171,10 @@ function sid() {
}
/** 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) {
@@ -199,8 +199,8 @@ function get_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) {
@@ -209,8 +209,8 @@ 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) {
@@ -226,9 +226,9 @@ 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) {
@@ -251,9 +251,9 @@ 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'>") {
@@ -272,8 +272,8 @@ 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) {
@@ -292,7 +292,7 @@ function unique_array($row, $indexes) {
}
/** Escape column key used in where()
* @param string
* @param string $key
* @return string
*/
function escape_key($key) {
@@ -303,8 +303,8 @@ 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()) {
@@ -332,8 +332,8 @@ 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()) {
@@ -343,10 +343,10 @@ 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 = "=") {
@@ -354,9 +354,9 @@ 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()) {
@@ -374,9 +374,9 @@ 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) {
@@ -392,7 +392,7 @@ function cookie($name, $value, $lifetime = 2592000) {
}
/** Get settings stored in a cookie
* @param string
* @param string $cookie
* @return mixed[]
*/
function get_settings($cookie) {
@@ -401,8 +401,8 @@ 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") {
@@ -411,8 +411,8 @@ 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") {
@@ -429,7 +429,7 @@ function restart_session() {
}
/** Stop session if possible
* @param bool
* @param bool $force
* @return void
*/
function stop_session($force = false) {
@@ -443,7 +443,7 @@ function stop_session($force = false) {
}
/** Get session variable for current server
* @param string
* @param string $key
* @return mixed
*/
function &get_session($key) {
@@ -451,8 +451,8 @@ 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) {
@@ -460,10 +460,10 @@ 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) {
@@ -493,8 +493,8 @@ function is_ajax() {
}
/** 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) {
@@ -512,13 +512,13 @@ 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 = "") {
@@ -548,7 +548,7 @@ class Queries {
}
/** 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) {
@@ -561,9 +561,9 @@ 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') {
@@ -576,9 +576,9 @@ 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) {
@@ -588,7 +588,7 @@ 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) {
@@ -603,7 +603,7 @@ function relative_uri() {
}
/** Remove parameter from query string
* @param string
* @param string $param
* @return string
*/
function remove_from_uri($param = "") {
@@ -611,9 +611,9 @@ 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 = "") {
@@ -653,7 +653,7 @@ function get_file($key, $decompress = false, $delimiter = "") {
}
/** Determine upload error
* @param int
* @param int $error
* @return string
*/
function upload_error($error) {
@@ -662,8 +662,8 @@ 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) {
@@ -672,7 +672,7 @@ function repeat_pattern($pattern, $length) {
}
/** Check whether the string is in UTF-8
* @param string
* @param string $val
* @return bool
*/
function is_utf8($val) {
@@ -681,9 +681,9 @@ 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 = "") {
@@ -694,7 +694,7 @@ 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) {
@@ -702,7 +702,7 @@ function format_number($val) {
}
/** Generate friendly URL
* @param string
* @param string $val
* @return string
*/
function friendly_url($val) {
@@ -711,8 +711,8 @@ 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) {
@@ -721,7 +721,7 @@ 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) {
@@ -761,8 +761,8 @@ function fields_from_edit() { // used by Mongo and SimpleDB
}
/** 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) {
@@ -782,7 +782,7 @@ function dump_headers($identifier, $multi_table = false) {
}
/** Print CSV row
* @param string[]
* @param string[] $row
* @return void
*/
function dump_csv($row) {
@@ -795,8 +795,8 @@ 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) {
@@ -824,7 +824,7 @@ function get_temp_dir() {
}
/** Open and exclusively lock a file
* @param string
* @param string $filename
* @return resource|void null for error
*/
function file_open_lock($filename) {
@@ -844,8 +844,8 @@ 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) {
@@ -856,7 +856,7 @@ function file_write_unlock($fp, $data) {
}
/** Unlock and close a file
* @param resource
* @param resource $fp
* @return void
*/
function file_unlock($fp) {
@@ -865,7 +865,7 @@ function file_unlock($fp) {
}
/** Get first element of an array
* @param mixed[]
* @param mixed[] $array
* @return mixed if not found
*/
function first($array) {
@@ -874,7 +874,7 @@ 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) {
@@ -904,10 +904,10 @@ function rand_string() {
}
/** 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) {
@@ -947,7 +947,7 @@ 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) {
@@ -958,7 +958,7 @@ function is_mail($email) {
}
/** Check whether the string is URL address
* @param string
* @param string $string
* @return bool
*/
function is_url($string) {
@@ -967,7 +967,7 @@ function is_url($string) {
}
/** Check if field should be shortened
* @param Field
* @param Field $field
* @return bool
*/
function is_shortable($field) {
@@ -975,10 +975,10 @@ 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) {
@@ -990,7 +990,7 @@ 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) {
@@ -1035,7 +1035,7 @@ function verify_token() {
// used in compiled version
/**
* @param string
* @param string $binary
* @return string
*/
function lzw_decompress($binary) {

View File

@@ -2,8 +2,8 @@
namespace Adminer;
/** Return <script> element
* @param string
* @param string
* @param string $source
* @param string $trailing
* @return string
*/
function script($source, $trailing = "\n") {
@@ -11,7 +11,7 @@ function script($source, $trailing = "\n") {
}
/** Return <script src> element
* @param string
* @param string $url
* @return string
*/
function script_src($url) {
@@ -26,8 +26,8 @@ function nonce() {
}
/** Get <input type="hidden">
* @param string
* @param string|int
* @param string $name
* @param string|int $value
* @return string HTML
*/
function input_hidden($name, $value = "") {
@@ -35,7 +35,7 @@ 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 = "") {
@@ -51,7 +51,7 @@ function target_blank() {
}
/** Escape for HTML
* @param string
* @param string $string
* @return string
*/
function h($string) {
@@ -59,7 +59,7 @@ function h($string) {
}
/** Convert \n to <br>
* @param string
* @param string $string
* @return string
*/
function nl_br($string) {
@@ -67,13 +67,13 @@ 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 = "") {
@@ -87,9 +87,9 @@ function checkbox($name, $value, $checked, $label = "", $onclick = "", $class =
}
/** 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) {
@@ -115,11 +115,11 @@ 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 = "") {
@@ -131,9 +131,9 @@ 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 = "") {
@@ -145,8 +145,8 @@ 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')") {
@@ -154,9 +154,9 @@ 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) {
@@ -168,8 +168,8 @@ 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 = "") {
@@ -177,7 +177,7 @@ function bold($bold, $class = "") {
}
/** Escape string for JavaScript apostrophes
* @param string
* @param string $string
* @return string
*/
function js_escape($string) {
@@ -185,8 +185,8 @@ 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) {
@@ -197,9 +197,9 @@ 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 = '') {
@@ -227,11 +227,11 @@ function hidden_fields_get() {
}
/** 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) {
@@ -247,10 +247,10 @@ 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) {
@@ -343,7 +343,7 @@ 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) {
@@ -416,8 +416,8 @@ function search_tables() {
}
/** 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) {
@@ -425,10 +425,10 @@ 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) {
@@ -536,10 +536,10 @@ 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) {

View File

@@ -60,8 +60,8 @@ function get_lang() {
}
/** Translate string
* @param literal-string
* @param float|string
* @param literal-string $idf
* @param float|string $number
* @return string
*/
function lang($idf, $number = null) {

View File

@@ -7,10 +7,10 @@ if (extension_loaded('pdo')) {
/** @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()) {

View File

@@ -5,7 +5,7 @@ class Plugins extends Adminer {
/** @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) {
@@ -43,8 +43,8 @@ class Plugins extends Adminer {
}
/**
* @param literal-string
* @param mixed[]
* @param literal-string $function
* @param mixed[] $args
* @return mixed
*/
private function callParent($function, $args) {
@@ -52,8 +52,8 @@ class Plugins extends Adminer {
}
/**
* @param literal-string
* @param mixed[]
* @param literal-string $function
* @param mixed[] $params
* @return mixed
*/
private function applyPlugin($function, $params) {
@@ -74,8 +74,8 @@ class Plugins extends Adminer {
}
/**
* @param literal-string
* @param mixed[]
* @param literal-string $function
* @param mixed[] $args
* @return mixed
*/
private function appendPlugin($function, $args) {

View File

@@ -10,7 +10,7 @@ class TmpFile {
}
/**
* @param string
* @param string $contents
* @return void
*/
function write($contents) {

View File

@@ -7,7 +7,7 @@ namespace Adminer;
*/
/**
* @param int
* @param int $n
* @return int
*/
function int32($n) {
@@ -21,8 +21,8 @@ function int32($n) {
}
/**
* @param int[]
* @param bool
* @param int[] $v
* @param bool $w
* @return string
*/
function long2str($v, $w) {
@@ -37,8 +37,8 @@ function long2str($v, $w) {
}
/**
* @param string
* @param bool
* @param string $s
* @param bool $w
* @return int[]
*/
function str2long($s, $w) {
@@ -50,10 +50,10 @@ 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) {
@@ -61,8 +61,8 @@ 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) {
@@ -94,8 +94,8 @@ 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) {

View File

@@ -2,7 +2,7 @@
namespace Adminer;
/** Encode e-mail header in UTF-8
* @param string
* @param string $header
* @return string
*/
function email_header($header) {
@@ -11,11 +11,11 @@ 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()) {
@@ -47,7 +47,7 @@ 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) {

View File

@@ -10,7 +10,7 @@ class AdminerDatabaseHide {
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);

View File

@@ -10,7 +10,7 @@ class AdminerDesigns {
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;

View File

@@ -14,7 +14,7 @@ if (isset($_GET["elastic"])) {
/**
* @param string $path
* @param array|null $content
* @param ?array $content
* @param string $method
* @return array|false
*/
@@ -54,7 +54,7 @@ if (isset($_GET["elastic"])) {
/** Perform query relative to actual selected DB
* @param string $path
* @param array|null $content
* @param ?array $content
* @param string $method
* @return array|false
*/
@@ -531,7 +531,7 @@ if (isset($_GET["elastic"])) {
}
/** Alter type
* @param array
* @param array $table
* @return mixed
*/
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
@@ -552,7 +552,7 @@ if (isset($_GET["elastic"])) {
}
/** Drop types
* @param list<string>
* @param list<string> $tables
* @return bool
*/
function drop_tables($tables) {

View File

@@ -12,8 +12,8 @@ class AdminerEditCalendar {
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;

View File

@@ -10,11 +10,11 @@ class AdminerEmailTable {
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;

View File

@@ -11,9 +11,9 @@ class AdminerFileUpload {
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;

View File

@@ -10,7 +10,7 @@ class AdminerFrames {
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;

View File

@@ -10,8 +10,8 @@ class AdminerLoginIp {
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;

View File

@@ -10,7 +10,7 @@ class AdminerLoginOtp {
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;

View File

@@ -10,7 +10,7 @@ class AdminerLoginPasswordLess {
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;

View File

@@ -10,7 +10,7 @@ class AdminerLoginServers {
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;

View File

@@ -10,7 +10,7 @@ class AdminerLoginSsl {
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)

View File

@@ -19,7 +19,7 @@ class AdminerLoginTable {
protected $database;
/** Set database of login table
* @param string
* @param string $database
*/
function __construct($database) {
$this->database = $database;

View File

@@ -10,7 +10,7 @@ class AdminerMasterSlave {
private $masters = array();
/**
* @param string[] [$slave => $master]
* @param string[] $masters [$slave => $master]
*/
function __construct($masters) {
$this->masters = $masters;

View File

@@ -10,8 +10,8 @@ class AdminerSlugify {
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;

View File

@@ -14,8 +14,8 @@ class AdminerSqlGemini {
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;

View File

@@ -10,7 +10,7 @@ class AdminerSqlLog {
protected $filename;
/**
* @param string defaults to "$database.sql"
* @param string $filename defaults to "$database.sql"
*/
function __construct($filename = "") {
$this->filename = $filename;

View File

@@ -9,7 +9,7 @@
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) {

View File

@@ -9,7 +9,7 @@
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) {

View File

@@ -11,7 +11,7 @@ class AdminerTinymce {
protected $path;
/**
* @param string
* @param string $path
*/
function __construct($path = "tiny_mce/tiny_mce.js") {
$this->path = $path;