MediaWiki
REL1_40
License.php
Go to the documentation of this file.
1
<?php
30
class
License
{
32
public
$template
;
33
35
public
$text
;
36
40
public
function
__construct
( $str ) {
41
$str = $this->
parse
( $str );
42
[
$this->template
,
$this->text
] = $this->
split
( $str );
43
}
44
49
protected
function
parse
( $str ) {
50
return
$str;
51
}
52
57
protected
function
split
( $str ) {
58
[
$text
,
$template
] = explode(
'|'
, strrev( $str ), 2 );
59
return
[ strrev(
$template
), strrev(
$text
) ];
60
}
61
}
License
A License class for use on Special:Upload (represents a single type of license).
Definition
License.php:30
License\split
split( $str)
Definition
License.php:57
License\$template
string $template
Definition
License.php:32
License\__construct
__construct( $str)
Definition
License.php:40
License\parse
parse( $str)
Definition
License.php:49
License\$text
string $text
Definition
License.php:35
includes
specials
helpers
License.php
Generated on Thu Jun 27 2024 14:04:14 for MediaWiki by
1.10.0