diff options
Diffstat (limited to 'lib/SendGrid.php')
-rw-r--r-- | lib/SendGrid.php | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/lib/SendGrid.php b/lib/SendGrid.php index 2b300cf..71d8f32 100644 --- a/lib/SendGrid.php +++ b/lib/SendGrid.php @@ -10,9 +10,6 @@ * @version GIT: <git_id> * @link http://packagist.org/packages/sendgrid/sendgrid */ -namespace SendGrid; - -require dirname(__DIR__).'/vendor/autoload.php'; /** * Interface to the SendGrid Web API @@ -42,23 +39,6 @@ class SendGrid 'User-Agent: sendgrid/' . $this->version . ';php' ); $host = isset($options['host']) ? $options['host'] : 'https://api.sendgrid.com'; - $this->client = new Client($host, $headers, '/v3', null); - } - - public static function register_autoloader() - { - spl_autoload_register(array('SendGrid', 'autoloader')); + $this->client = new \SendGrid\Client($host, $headers, '/v3', null); } - - public static function autoloader($class) - { - // Check that the class starts with 'SendGrid' - if ($class == 'SendGrid' || stripos($class, 'SendGrid\\') === 0) { - $file = str_replace('\\', '/', $class); - if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) { - require_once(dirname(__FILE__) . '/' . $file . '.php'); - } - } - } - } |