Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5984426
MySQLField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
MySQLField.php
View Options
<?php
namespace
Wikimedia\Rdbms
;
class
MySQLField
implements
Field
{
private
string
$name
;
private
string
$tablename
;
/** @var mixed */
private
$default
;
/** @var int */
private
$max_length
;
private
bool
$nullable
;
private
bool
$is_pk
;
private
bool
$is_unique
;
private
bool
$is_multiple
;
private
bool
$is_key
;
private
string
$type
;
private
bool
$binary
;
private
bool
$is_numeric
;
private
bool
$is_blob
;
private
bool
$is_unsigned
;
private
bool
$is_zerofill
;
public
function
__construct
(
$info
)
{
$this
->
name
=
$info
->
name
;
$this
->
tablename
=
$info
->
table
;
$this
->
default
=
$info
->
def
;
$this
->
max_length
=
$info
->
max_length
;
$this
->
nullable
=
!
$info
->
not_null
;
$this
->
is_pk
=
$info
->
primary_key
;
$this
->
is_unique
=
$info
->
unique_key
;
$this
->
is_multiple
=
$info
->
multiple_key
;
$this
->
is_key
=
(
$this
->
is_pk
||
$this
->
is_unique
||
$this
->
is_multiple
);
$this
->
type
=
$info
->
type
;
$this
->
binary
=
$info
->
binary
??
false
;
$this
->
is_numeric
=
$info
->
numeric
??
false
;
$this
->
is_blob
=
$info
->
blob
??
false
;
$this
->
is_unsigned
=
$info
->
unsigned
??
false
;
$this
->
is_zerofill
=
$info
->
zerofill
??
false
;
}
/**
* @return string
*/
public
function
name
()
{
return
$this
->
name
;
}
/**
* @return string
*/
public
function
tableName
()
{
return
$this
->
tablename
;
}
/**
* @return string
*/
public
function
type
()
{
return
$this
->
type
;
}
/**
* @return bool
*/
public
function
isNullable
()
{
return
$this
->
nullable
;
}
public
function
defaultValue
()
{
return
$this
->
default
;
}
/**
* @return bool
*/
public
function
isKey
()
{
return
$this
->
is_key
;
}
/**
* @return bool
*/
public
function
isMultipleKey
()
{
return
$this
->
is_multiple
;
}
/**
* @return bool
*/
public
function
isBinary
()
{
return
$this
->
binary
;
}
/**
* @return bool
*/
public
function
isNumeric
()
{
return
$this
->
is_numeric
;
}
/**
* @return bool
*/
public
function
isBlob
()
{
return
$this
->
is_blob
;
}
/**
* @return bool
*/
public
function
isUnsigned
()
{
return
$this
->
is_unsigned
;
}
/**
* @return bool
*/
public
function
isZerofill
()
{
return
$this
->
is_zerofill
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 23:20 (2 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b6/72/8a47b5672d94f7d3b40d72de0796
Default Alt Text
MySQLField.php (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment