Guest User

Untitled

a guest
May 16th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. $FORMS = array();
  3.  
  4. $FORMS['test_block_1'] = <<<END
  5. Привет, мир! %personal%
  6. END;
  7.  
  8. $FORMS['test_block_2'] = <<<END
  9. Это %name%!
  10. END;
  11. ?>
  12.  
  13. public function test($name = false, $template = 'test'){
  14. $arr1 = array();
  15. $arr2 = array();
  16. if($name){
  17. $arr1['name'] = "Это {$name}!";
  18. }
  19. else $arr1['name'] = '';
  20.  
  21. list($test_block_1, $test_block_2) = def_module::loadTemplates("content/custom/{$template}", "test_block_1","test_block_2");
  22. $arr2['personal'] = def_module::parseTemplate($test_block_2, $arr1);
  23. return def_module::parseTemplate($test_block_1, $arr2);
  24. }
Add Comment
Please, Sign In to add comment