/framework/vendor/smarty2/plugins/function.constraint.php
http://zoop.googlecode.com/ · PHP · 13 lines · 11 code · 2 blank · 0 comment · 0 complexity · 998a8ad58230986faf34b6152449c33f MD5 · raw file
- <?php
- function smarty_function_constraint($params, &$smarty)
- {
- $type = $params['type'];
- $name = $params['name'];
- $value = $params['value'];
- $inline = $params['inline'];
-
- $types = array('minlen' => 'minlen', 'sameas' => 'sameas');
- $type = $types[$type];
-
- return '<constraint type="' . $type . '" name="' . $name . '" value="' . $value . '" inline="' . $inline . '" />';
- }