This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/includes/kohana/modules/email/vendor/swift/classes/Swift.php

58 lines
1.1 KiB
PHP
Raw Normal View History

2011-01-07 02:50:53 +00:00
<?php
/*
2011-01-07 02:53:49 +00:00
* This file is part of SwiftMailer.
* (c) 2004-2009 Chris Corbyn
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
2011-01-07 02:50:53 +00:00
*/
/**
* General utility class in Swift Mailer, not to be instantiated.
*
* @package Swift
*
* @author Chris Corbyn
*/
abstract class Swift
{
/** Swift Mailer Version number generated during dist release process */
2011-01-07 02:53:49 +00:00
const VERSION = '4.0.6';
2011-01-07 02:50:53 +00:00
/**
* Internal autoloader for spl_autoload_register().
*
* @param string $class
*/
public static function autoload($class)
{
//Don't interfere with other autoloaders
2011-01-07 02:53:49 +00:00
if (0 !== strpos($class, 'Swift'))
2011-01-07 02:50:53 +00:00
{
2011-01-07 02:53:49 +00:00
return false;
2011-01-07 02:50:53 +00:00
}
2011-01-07 02:53:49 +00:00
$path = dirname(__FILE__).'/'.str_replace('_', '/', $class).'.php';
if (!file_exists($path))
2011-01-07 02:50:53 +00:00
{
2011-01-07 02:53:49 +00:00
return false;
2011-01-07 02:50:53 +00:00
}
2011-01-07 02:53:49 +00:00
require_once $path;
2011-01-07 02:50:53 +00:00
}
/**
* Configure autoloading using Swift Mailer.
*
* This is designed to play nicely with other autoloaders.
*/
public static function registerAutoload()
{
spl_autoload_register(array('Swift', 'autoload'));
}
}