MediaWiki
master
License.php
Go to the documentation of this file.
1
<?php
13
namespace
MediaWiki\Specials\Helpers
;
14
18
class
License
{
19
public
string
$template
;
20
public
string
$text
;
21
22
public
function
__construct
(
string
$str ) {
23
$str = $this->
parse
( $str );
24
[
$this->template
,
$this->text
] = $this->
split
( $str );
25
}
26
31
protected
function
parse
( $str ) {
32
return
$str;
33
}
34
39
protected
function
split
( $str ) {
40
[
$text
,
$template
] = explode(
'|'
, strrev( $str ), 2 );
41
return
[ strrev(
$template
), strrev(
$text
) ];
42
}
43
}
44
46
class_alias( License::class,
'License'
);
MediaWiki\Specials\Helpers\License
A License class for use on Special:Upload (represents a single type of license).
Definition
License.php:18
MediaWiki\Specials\Helpers\License\$template
string $template
Definition
License.php:19
MediaWiki\Specials\Helpers\License\__construct
__construct(string $str)
Definition
License.php:22
MediaWiki\Specials\Helpers\License\parse
parse( $str)
Definition
License.php:31
MediaWiki\Specials\Helpers\License\split
split( $str)
Definition
License.php:39
MediaWiki\Specials\Helpers\License\$text
string $text
Definition
License.php:20
MediaWiki\Specials\Helpers
Definition
ImportReporter.php:7
includes
Specials
Helpers
License.php
Generated on Wed May 20 2026 21:27:51 for MediaWiki by
1.10.0