diff --git a/html.php b/html.php index cf22679..7768762 100644 --- a/html.php +++ b/html.php @@ -22,6 +22,7 @@

Youtube

parse('http://youtu.be/gHYfY9lZaRE')->render() ?> + parse('http://www.youtube.com/embed/gHYfY9lZaRE')->render() ?>

Dailymotion

parse('http://www.dailymotion.com/video/xr9av5')->render() ?> diff --git a/src/autoload.php b/src/autoload.php index aec301c..5b139ac 100644 --- a/src/autoload.php +++ b/src/autoload.php @@ -14,7 +14,7 @@ * * @author Jérôme Tamarelle */ -spl_autoload_register(function($className) { +function autoload_tubelink($className) { $className = ltrim($className, '\\'); if (0 === strpos($className, 'TubeLink')) { $fileName = __DIR__ . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php'; @@ -26,4 +26,6 @@ } return false; -}); +}; + +spl_autoload_register('autoload_tubelink');