title: Attempted to call function "getAge" from namespace "App\Bundle\Controller"
body: <p>I am trying to instantiate a domain object in my controller but I am getting this error "<code>Attempted to call function "getAge" from namespace "App\Bundle\Controller"</code>". 
  This is my structure folder:</p>
  
  <p><a href="https://i.stack.imgur.com/if3c2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/if3c2.png" alt="enter image description here"></a></p>
  
  <p>this is my Cow.php:</p>
  
  <pre><code>&lt;?php
  
  namespace Domain;
  
  class Cow {
      private $age;
  
      public function __constructor($ag) {
          $this.$age = $age;
      }
  
      public function getAge() {
          return $this.$age;
      }
  }
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Bundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Domain;
  
  class CowController extends Controller
  {
      public function insertAction()
      {
          $cow = new Domain\Cow(10);
          $age = $cow.getAge();
  
          return $this-&gt;render('AppBundle:cow:insert.html.twig');
      }
  }
  </code></pre>
  
  <p>I already tried all combinations of namespace:</p>
  
  <pre><code>use Domain;
  $cow = new Domain\Cow(10)
  
  use \Domain
  $cow = new \Domain\Cow(10)
  
  use \Domain
  $cow = new Domain\Cow(10)
  </code></pre>
  
  <p>How can I make this work???</p>