/** * Constructs a new MetaRefreshElement. * * @param int $seconds * The number of seconds after which the browser should redirect the user * to the specified URL. * @param $url * The URL to which to redirect. */ public function __construct($seconds, $url) { assert('is_int($seconds)'); parent::__construct(['http-equiv' => 'refresh', 'content' => "{$seconds};url={$url}"]); }
/** * Constructs a named meta element. * * @param string $name * The name of the element, for the name attribute. * @param string $contentAttribute * The value of the 'content' attribute of the element. Its significance * varies depending on the $name. */ public function __construct($name, $contentAttribute) { parent::__construct(['name' => $name, 'content' => $contentAttribute]); }
/** * Constructs a new MetaCharset element. * * @param string $charset * A character set that will apply to the whole page. Rarely will * something other than UTF-8 be used. */ public function __construct($charset = 'UTF-8') { parent::__construct(['charset' => $charset]); }