MediaWiki
master
License.php
Go to the documentation of this file.
1
<?php
16
class
License
{
17
public
string
$template
;
18
public
string
$text
;
19
20
public
function
__construct
(
string
$str ) {
21
$str = $this->
parse
( $str );
22
[
$this->template
,
$this->text
] = $this->
split
( $str );
23
}
24
29
protected
function
parse
( $str ) {
30
return
$str;
31
}
32
37
protected
function
split
( $str ) {
38
[
$text
,
$template
] = explode(
'|'
, strrev( $str ), 2 );
39
return
[ strrev(
$template
), strrev(
$text
) ];
40
}
41
}
License
A License class for use on Special:Upload (represents a single type of license).
Definition
License.php:16
License\split
split( $str)
Definition
License.php:37
License\$template
string $template
Definition
License.php:17
License\__construct
__construct(string $str)
Definition
License.php:20
License\parse
parse( $str)
Definition
License.php:29
License\$text
string $text
Definition
License.php:18
includes
Specials
Helpers
License.php
Generated on Fri Dec 12 2025 23:24:50 for MediaWiki by
1.10.0