title: Smarty and objects private properties
body: <p><strong>Smarty</strong> allows to access object properties using this syntax in templates:</p>
  
  <pre><code>{$object-&gt;property}
  </code></pre>
  
  <p>But (If I understood this correctly) this is possible only if property visibility is <code>public</code>, otherwise it seems that Smarty won't be able to access it.</p>
  
  <p>In <strong>Java</strong> I'm used to create objects that have private properties, and I usually read/write these properties in business logic using getters and setters. But, even if I create an object with a private property, I'm able to access it in a jsp using expression language:</p>
  
  <pre><code>${object.property}
  </code></pre>
  
  <p>This won't happen in Smarty templates, since private properties cannot be accessed this way. So I would have to use a syntax like:</p>
  
  <pre><code>{$object-&gt;getProperty()}
  </code></pre>
  
  <p>Why is that? Why doesn't Smarty get round the problem as <code>jsp</code> EL does?</p>