title: Where to put model helper functions in Symfony2
body: <p>I have the following function:</p>
  
  <pre><code>function array_duplicates($array)
  {
      $duplicates = array();
      $unique = array_unique($array);
      for ($i = 0; $i &lt; count($array); $i++) {
          if (!array_key_exists($i, $unique)) {
              $duplicates[] = $array[$i];
          }   
      }   
      return $duplicates;
  }
  </code></pre>
  
  <p>This function obviously doesn't apply to any certain model, and it's not a template helper. Where would be the appropriate place to put this function? (Please don't say "anywhere you want.")</p>