Q:

This->get('foobar') gives "Call to a member function get() on a non-object" Symfony2

This is the first time i'm posting here, so any tips/suggestions to improve my posting are always appreciated. (I don't intend to make this my last post :])
I'm defining my controllers as services, so I can call methods from other controllers inside a controller, when I need to. So far, everything has gone smoothly, but all of a sudden, I get the 'Call to a member function get() on a non-object' error. I have absolutely no clue what it could be, since it's working in multiple other occasions..
I'm only working with Symfony2 for 6weeks now, so forgive badly written code when you see it.
This is the method that generates the error:
public function generate1PDF($customer)
{
    if (file_exists('/pdf/' . $customer->getGoogleViewID() . '/' . date("Y") . '/' . date("Y-m") . '.pdf')) {
        //PDF already exists. Delete it (because generating a new one will have more recent data)
        unlink('/pdf/' . $customer->getGoogleViewID() . '/' . date("Y") . '/' . date("Y-m") . '.pdf');
    }

     //THIS IS THE LINE THAT THROWS THE EXCEPTION
    $arr = $this->get('itr.login.report.controller')->prepareReport($customer);

    if ($arr instanceof Response) {
        return $arr;
    }
    $data = $arr['data'];
    $report = $arr['report'];

    $this->get('knp_snappy.pdf')->generateFromHtml(
        $this->renderView(
            'itrLoginBundle:Report:report.html.twig',
            array(
                'report' => $data,
                'klant' => $customer,
                'rapport' => $report,
                'cmd' => false
            )
        ),
        '/pdf/' . $customer->getGoogleViewID() . '/' . date("Y") . '/' . date("Y-m") . '.pdf'
    );

    $this->reportRepository->updateGenerated($report);

}

This is the method the line throwing the exception, should navigate to:
public function prepareReport($customer, $report = null)
{
    if ($report == null) {
        $reportUitDB = $this->reportRepository->findLatestReportByCustomerId($customer->getId());
    } else {
        $reportUitDB = $report;
    }

    if ($reportUitDB == null) {
        return null;

    } else {
        $data = json_decode($reportUitDB->getData(), 'json');

        return array('data' => $data, 'report' => $reportUitDB);
    }
}

Here is my services.yml file:
services:
itr_login.form.type.customer:
    class: itr\LoginBundle\Form\Type\CustomerType
    tags:
        - { name: form.type, alias: customer }
itr.twig.timeConvert_extension:
        class: itr\LoginBundle\Twig\timeConvertExtension
        tags:
            - { name: twig.extension }
itr.login.default.controller:
        class: itr\LoginBundle\Controller\DefaultController
itr.login.customer.controller:
            class: itr\LoginBundle\Controller\CustomerController
itr.login.mail.controller:
            class: itr\LoginBundle\Controller\MailController
itr.login.pdf.controller:
                class: itr\LoginBundle\Controller\PdfController
itr.login.report.controller:
                class: itr\LoginBundle\Controller\ReportController

customer_repository:
        class: itr\LoginBundle\Repository\customerRepository
        arguments:
            dbal: "@doctrine.dbal.default_connection"
report_repository:
        class: itr\LoginBundle\Repository\reportRepository
        arguments:
            dbal: "@doctrine.dbal.default_connection"
token_repository:
            class: itr\LoginBundle\Repository\tokenRepository
            arguments:
                dbal: "@doctrine.dbal.default_connection"

And a working example:
 try {
                $customer = $this->customerRepository->findFirstWithMoreThan30DaysAndActiveAndStatusAndMailday(date('j'));

                if ($customer != null) {

                    $this->customerRepository->updateStatus($customer, 5);

                    //haal data op en stop ze in databank
                    $tijd = new \DateTime();
                    $report = new Report(null, null, null, null, $customer, $tijd->format("Y-m-d H:i:s"));
                    $report->setData($analytics);
                    $this->reportRepository->insertReport($report);

                    $this->customerRepository->updateStatus($customer, 10);

                    //genereer PDF
                    //HERE IS THE EXAMPLE LINE, that IS working properly
                    $this->get('itr.login.pdf.controller')->generate1PDF($customer);
                    $this->customerRepository->updateStatus($customer, 20);

                    //stuur mail
                    $this->get('itr.login.mail.controller')->send1Mail($customer);
                    $this->customerRepository->updateStatus($customer, 30);

                    $this->customerRepository->updateStatus($customer, 0);

                    $tweet = 'De klant is succesvol behandeld!';

                } else {
                    $tweet = 'Er is geen enkele klant gevonden waarvan: het laatste rapport meer dan 30 dagen geleden opgehaald is, er momenteel geen rapport in verwerking is, de huidige status actief is, én de huidige dag overeen komt met de door de klant aangegeven dag om te mailen.';

                }
                return $this->redirect($this->generateUrl('mainPage', array('tweet' => $tweet)));

            }

A:

I've found a solution so I thought I'd post it here for future readers:
It was pointed out to me that I shouldn't just make every controller a service, so I can access all methods from any controller, because that's a bad practice.
So I followed my colleague's advice and built a service containing the 'generate1PDF', and the 'prepeareReport' methods. I can call these methods from any controller (given that I inject the service in it), so my structure has improved, and my issue has been solved.

