I have a class handles some API integration that I would like to be made available in my main site bundle that looks like so:
class ACH {
public function __constructor();
public function addACHTransaction();
...
}
How do I integrate this class within Symfony 2 so that I can use it within my controllers and entities by doing something like:
$ach = new ACH();
*Edit: * Here are the contents of my autoload.php file.
use Doctrine\Common\Annotations\AnnotationRegistry;
$loader = require __DIR__.'/../vendor/autoload.php';
// intl
if (!function_exists('intl_get_error_code')) {
require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
$loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
}
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
return $loader;