123456789101112131415161718192021222324252627282930313233 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 9/30/16
- * Time: 10:04 PM
- */
-
- namespace App\Business;
-
- use App\DataAccess\MiscDataAccess;
-
- class MiscBusiness
- {
- protected static function getDataAccess()
- {
- return new MiscDataAccess();
- }
-
- public static function getConfig()
- {
- $data = static::getDataAccess()->getConfigWebPage();
-
- $needle = "window.transitOptions =";
- $pos = strpos($data, $needle);
- $data = substr($data, $pos + strlen($needle));
-
- $pos = strpos($data, "</script");
- $data = substr($data, 0, $pos);
-
- return json_decode($data, true);
- }
- }
|