PhpTips.im - Everything about php - Download CMS, find tips and tricks, code snippetz, classes and more and more...
Bookmark this page !
   

Articles

    Home » Articles » PHP Snippets » Kohana Javascript Helper
Published on : 15.05.2010 Category : PHP Snippets Viewed : 73 times.

Code:


  1. <?php defined('SYSPATH') OR die('No direct access allowed.');
  2.  
  3. class javascript_Core
  4. {
  5. static protected $scripts = array();
  6.  
  7. static public function add($file)
  8. {
  9. self::$scripts[] = $file;
  10. }
  11.  
  12. static public function render($print = FALSE)
  13. {
  14. $output = '';
  15. foreach (self::$scripts as $script)
  16. $output .= html::script($script);
  17.  
  18. if ($print)
  19. echo $output;
  20.  
  21. return $output;
  22. }
  23. } // End javascript_Core



Add this article in :

 

There is not yet any comment !



1088 Rating: 0.0/10 (0 votes cast)

 

 Members
Log In !
Email Address :

Password :


Change my passowrd !
Sign Up !
We have : 3 members.
Latest member : albans
 
 Last Posts
 
 Advertising
 
©PhpTips.im 2010
Powered by PikaCMS.
Quick Links :
Home | Browse all articles | Downloads | Terms of Use
RSS RSS 2.0 : Articles | Downloads ATOM : Articles | Downloads