f3.php 796 B

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