33 public static function init($callable)
35 self::$inits[] = $callable;
46 if (0 !== strpos($class,
'Swift_')) {
50 $path = dirname(__FILE__).
'/'.str_replace(
'_',
'/', $class).
'.php';
52 if (!file_exists($path)) {
58 if (self::$inits && !self::$initialized) {
59 self::$initialized =
true;
60 foreach (self::$inits as $init) {
61 call_user_func($init);
75 if (null !== $callable) {
76 self::$inits[] = $callable;
78 spl_autoload_register(array(
'Swift',
'autoload'));