title: In PHP, how can I wrap procedural code in a class?
body: <p>I have a large chunk of legacy php code that I need to interface with that looks like this:</p>
  
  <pre><code>//legacy.php
  
  function foo() {
  }
  
  function bar() {
  }
  </code></pre>
  
  <p>I want to be able to wrap these legacy functions in a class or somehow require_once without polluting that global namespace or altering the original file.</p>