title: PHP/CakePHP 3 namespace issue with ZipArchive
body: <p>I am migrating a working app from CakePHP 2.6 to 3.0. which has now implemented namespaces so I ran into an issue with ZipArchive and had to use the global <code>$zip = new \ZipArchive();</code></p>
  
  <p>This led to an error with the <code>$zip-&gt;close();</code> method <code>ZipArchive::close(): Invalid or unitialized Zip object</code> </p>
  
  <p>I saw an example where adding @ to the close would work but it was called the quick and dirty way.</p>
  
  <p>What would be considered the cleanest way to solve this?</p>
  
  <pre><code>$zip = new \ZipArchive();
  foreach ($files as $file) {
      $file_path = WWW_ROOT . 'files/supporting/';
      $filename =  $file-&gt;name;
  
      if ($zip-&gt;open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
          exit("cannot open &lt;$filename&gt;\n");
      }
      $zip-&gt;addFile($file_path,$filename);
  }
  @$zip-&gt;close();
  </code></pre>