Skip to content

Set exceptions function

Andre Sieverding edited this page Jun 12, 2014 · 2 revisions

(EasyRouter >= 0.4.0)

EasyRouter\main::set_exceptions( string $exceptions )

$exceptions = Exceptions for parameters. If a value of a parameter not a value of an exception for this parameter, the parameter will be ignored.

Little example:

<?php
	EasyRouter\main::set_exceptions(array(array("param" => "language", "exceptions" => array("en", "de"))));
	EasyRouter\main::launch();
	
	/**
	 * instead of:
	 *
	 * $exceptions = array(array("param" => "language", "exceptions" => array("en", "de")));
	 * EasyRouter\main::launch(null, null, $exceptions);
	 */
?>

Clone this wiki locally