title: Get Entity object in Repository
body: <p>I'm learning about Entities and Repositories in Symfony and I want to know if is possible access entity object in its repository.</p>
  
  <p>I have the following code in Controller</p>
  
  <pre><code>$account = new Account($username, $password, $email);
  $em = $this-&gt;getDoctrine()-&gt;getManager();
  $result = $em-&gt;getRepository('AppBundle:Account')-&gt;registerAccount();
  </code></pre>
  
  <p>and then in Repository</p>
  
  <pre><code>public function registerAccount() {
      // How access to $account here?
  }
  </code></pre>
  
  <p>Should I just pass <code>$account</code> to repository function or is there another way?</p>