format.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. return array
  3. (
  4. 'name' => '参数格式转换',
  5. 'order' => 'sort asc, id asc',
  6. 'struct' => array
  7. (
  8. 'name' => array
  9. (
  10. 'name' => '转换名称',
  11. 'type' => 'varchar(30)',
  12. ),
  13. 'method' => array
  14. (
  15. 'name' => '转换方式',
  16. 'type' => 'varchar(1000)',
  17. ),
  18. 'sort' => array
  19. (
  20. 'name' => '排序',
  21. 'type' => 'int(11)',
  22. 'default' => '1',
  23. ),
  24. ),
  25. 'default' => array
  26. (
  27. 'field' => 'sort,name,method,cdate',
  28. 'value' => array
  29. (
  30. '1,"字符串","strval(\'{value}\')",' . DEVER_TIME,
  31. '2,"整数","intval(\'{value}\')",' . DEVER_TIME,
  32. '3,"浮点数","floatval(\'{value}\')",' . DEVER_TIME,
  33. '4,"uri编码","urlencode(\'{value}\')",' . DEVER_TIME,
  34. '5,"uri编码-RFC3986规则","rawurlencode(\'{value}\')",' . DEVER_TIME,
  35. '6,"转小写","strtolower(\'{value}\')",' . DEVER_TIME,
  36. '7,"转大写","strtoupper(\'{value}\')",' . DEVER_TIME,
  37. '8,"去空值","trim(\'{value}\')",' . DEVER_TIME,
  38. '10,"时间戳","strtotime(\'{value}\')",' . DEVER_TIME,
  39. '11,"yyyy-MM-dd HH:mm:ss","date(\'Y-m-d H:i:s\', \'{value}\')",' . DEVER_TIME,
  40. '12,"yyyy-MM-DDTHH:mm:ss+TIMEZONE","date(\'Y-m-d\\\TH:i:sP\', \'{value}\')",' . DEVER_TIME,
  41. '13,"yyyy-MM-ddTHH:mm:ssZ","date(\'Y-m-d\\\TH:i:sZ\', \'{value}\')",' . DEVER_TIME,
  42. ),
  43. 'num' => 1,
  44. ),
  45. );