PageRenderTime 45ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/Haanga/Extension/Filter/Explode.php

https://github.com/crodas/Haanga
PHP | 12 lines | 11 code | 1 blank | 0 comment | 4 complexity | d6a407031bc284334f70bbd421b8c6af MD5 | raw file
  1. <?php
  2. class Haanga_Extension_Filter_Explode
  3. {
  4. public static function generator($compiler, $args)
  5. {
  6. if (count($args) == 1 || $args[1] == "") {
  7. return hexec("str_split", $args[0]);
  8. }
  9. return hexec("explode", $args[1], $args[0]);
  10. }
  11. }