title: CakePHP 2.0.4: Using the "Number" Helper in Controllers
body: <p>I know it's against MVC methodologies to use helpers in controllers, but there are some cases where it's useful. For example, consider this snippet of controller code from one of my CakePHP 1.3.13 projects that handles an image upload:</p>
  
  <pre><code>elseif ($_FILES['data']['error']['ModelName']['field_name'] === UPLOAD_ERR_INI_SIZE) {
      App::import('Helper', 'Number');
      $Number = new NumberHelper();
  
      $this-&gt;Session-&gt;setFlash("The image you uploaded was not saved because it appeared to be larger than {$Number-&gt;toReadableSize($max_filesize_in_bytes)}.");
  }
  </code></pre>
  
  <p>I'm working on a CakePHP 2.0.4 project now and I used the same code, except I replaced <code>App::import('Helper', 'Number');</code> with <code>App::uses('NumberHelper', 'View/Helper');</code> and I got this error message:</p>
  
  <pre><code>Warning (4096): Argument 1 passed to Helper::__construct() must be an instance of View, none given, called in /Path/To/My/Website/app/Controller/MyController.php
  </code></pre>
  
  <p>Any ideas?</p>