mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Switch PHPMailer, MoovRelocator, Zend Gdata, TCPDF, Oauth2, PhlickR, PHPShortener from git submodules to Composer
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @package OAuth2 Connector
|
||||
*
|
||||
* @see http://oauth.net/2/
|
||||
* @uses http://code.google.com/p/oauth2-php/
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class API_OAuth2_Autoloader
|
||||
{
|
||||
|
||||
/**
|
||||
* Registers Oauth2_Autoloader as an SPL autoloader.
|
||||
*/
|
||||
static public function register()
|
||||
{
|
||||
ini_set('unserialize_callback_func', 'spl_autoload_call');
|
||||
spl_autoload_register(array(new self, 'autoload'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles autoloading of classes.
|
||||
*
|
||||
* @param string $class A class name.
|
||||
*
|
||||
* @return boolean Returns true if the class has been loaded
|
||||
*/
|
||||
static public function autoload($class)
|
||||
{
|
||||
if (file_exists($file = __DIR__ . '/../../../vendor/oauth2/lib/' . str_replace(array('_', "\0"), array('/', ''), $class) . '.inc'))
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user