Last active
August 29, 2015 14:21
-
-
Save crynobone/76e42d27c7c11d1f29cb to your computer and use it in GitHub Desktop.
Parsing Malaysia Public Holiday.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"authors": [ | |
{ | |
"name": "crynobone", | |
"email": "[email protected]" | |
} | |
], | |
"require": { | |
"orchestra/parser": "~3.0" | |
}, | |
"require-dev": { | |
"symfony/var-dumper": "~2.6" | |
}, | |
"license": "MIT", | |
"minimum-stability": "dev" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include "vendor/autoload.php"; | |
$url = "https://www.google.com/calendar/feeds/en.malaysia%[email protected]/public/basic"; | |
$app = new Illuminate\Container\Container; | |
$document = new Orchestra\Parser\Xml\Document($app); | |
$reader = new Orchestra\Parser\Xml\Reader($document); | |
$xml = $reader->extract(file_get_contents($url)); | |
dd($xml->parse(['entry' => ['uses' => 'entry[id,title,content,published,updated]']])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment