Просмотр файла news/libraries/f3.php

Размер файла: 796B
  1. <?php
  2.  
  3. /*
  4. Copyright (c) 2009-2014 F3::Factory/Bong Cosca, All rights reserved.
  5.  
  6. This file is part of the Fat-Free Framework (http://fatfree.sf.net).
  7.  
  8. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF
  9. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  10. IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  11. PURPOSE.
  12.  
  13. Please see the license.txt file for more information.
  14. */
  15.  
  16. //! Legacy mode enabler
  17. class F3 {
  18.  
  19. static
  20. //! Framework instance
  21. $fw;
  22.  
  23. /**
  24. * Forward function calls to framework
  25. * @return mixed
  26. * @param $func callback
  27. * @param $args array
  28. **/
  29. static function __callstatic($func,array $args) {
  30. if (!self::$fw)
  31. self::$fw=Base::instance();
  32. return call_user_func_array(array(self::$fw,$func),$args);
  33. }
  34.  
  35. }