PageRenderTime 148ms CodeModel.GetById 132ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): BSD-3-Clause, LGPL-2.1
  1. <?php
  2. function smarty_function_constraint($params, &$smarty)
  3. {
  4. $type = $params['type'];
  5. $name = $params['name'];
  6. $value = $params['value'];
  7. $inline = $params['inline'];
  8. $types = array('minlen' => 'minlen', 'sameas' => 'sameas');
  9. $type = $types[$type];
  10. return '<constraint type="' . $type . '" name="' . $name . '" value="' . $value . '" inline="' . $inline . '" />';
  11. }