gyro/core/controller/base/routes/parameterizedroutehandlers/string.handler.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Handle string (the "s" type) 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Controller 00007 */ 00008 class StringParameterizedRouteHandler implements IParameterizedRouteHandler { 00009 /** 00010 * Returns the key that is used to identify this handler in route declaration, e.g. "s" or "ui>" 00011 * 00012 * @return string 00013 */ 00014 public function get_type_key() { 00015 return "s"; 00016 } 00017 00018 /** 00019 * Return regex to validate path 00020 */ 00021 public function get_validate_regex($params) { 00022 if ($params === false) { 00023 return '.*?'; 00024 } 00025 else { 00026 return '.{' . preg_quote($params) . '}'; 00027 } 00028 } 00029 00030 /** 00031 * Preprocess a value before URL is build 00032 */ 00033 public function preprocess_build_url($value) { 00034 return $value; 00035 } 00036 }