Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 365 | Revision 367 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 365 Revision 366
Zeile 3... Zeile 3...
3
    use PHPHtmlParser\Dom;
3
    use PHPHtmlParser\Dom;
4
    use App\Models\Action;
4
    use App\Models\Action;
5
    use App\Models\Item;
5
    use App\Models\Item;
6
    use App\Models\Directory;
6
    use App\Models\Directory;
7
    use Illuminate\Support\Facades\Route;
7
    use Illuminate\Support\Facades\Route;
-
 
8
    use PHPHtmlParser\Exceptions\ChildNotFoundException;
-
 
9
    use PHPHtmlParser\Exceptions\CircularException;
-
 
10
    use PHPHtmlParser\Exceptions\CurlException;
-
 
11
    use PHPHtmlParser\Exceptions\StrictException;
Zeile 8... Zeile 12...
8
 
12
 
9
    /*
13
    /*
10
    |--------------------------------------------------------------------------
14
    |--------------------------------------------------------------------------
11
    | Web Routes
15
    | Web Routes
Zeile 30... Zeile 34...
30
    }
34
    }
Zeile 31... Zeile 35...
31
 
35
 
32
    function parseCMSPage( $url )
36
    function parseCMSPage( $url )
33
    {
37
    {
-
 
38
        $dom = new Dom;
-
 
39
        try
34
        $dom = new Dom;
40
        {
-
 
41
            $dom->loadFromUrl( $url );
-
 
42
        }
-
 
43
        catch ( ChildNotFoundException|CircularException|CurlException|StrictException $e )
-
 
44
        {
35
        $dom->loadFromUrl($url);
45
        }
36
        $menu = $dom->getElementById('menu')->innerHtml;
46
        $menu = $dom->getElementById('menu')->innerHtml;
37
        $content = $dom->getElementById('content')->innerHtml;
47
        $content = $dom->getElementById('content')->innerHtml;
38
        return array( "menu" => $menu, "content" => $content, );
48
        return array( "menu" => $menu, "content" => $content, );