1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php /** * @todo document * @ingroup Maintenance */ class Site { var $suffix, $lateral, $url; function __construct( $s, $l, $u ) { $this->suffix = $s; $this->lateral = $l; $this->url = $u; } function getURL( $lang, $urlprotocol ) { $xlang = str_replace( '_', '-', $lang ); return "$urlprotocol//$xlang.{$this->url}/wiki/\$1"; } }