You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MiscBusiness.php 645B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: robin
  5. * Date: 9/30/16
  6. * Time: 10:04 PM
  7. */
  8. namespace App\Business;
  9. use App\DataAccess\MiscDataAccess;
  10. class MiscBusiness
  11. {
  12. protected static function getDataAccess()
  13. {
  14. return new MiscDataAccess();
  15. }
  16. public static function getConfig()
  17. {
  18. $data = static::getDataAccess()->getConfigWebPage();
  19. $needle = "window.transitOptions =";
  20. $pos = strpos($data, $needle);
  21. $data = substr($data, $pos + strlen($needle));
  22. $pos = strpos($data, "</script");
  23. $data = substr($data, 0, $pos);
  24. return json_decode($data, true);
  25. }
  26. }