title: Constants not accessible in called class
body: <p>I am currently having some notices about my constants, that's not set. I my routing class, I do something like this:</p>
  
  <pre><code>define('_CALLED_MODULE',$v-&gt;match_array['module']);
  define('_CALLED_CONTROLLER',$v-&gt;match_array['controller']);
  define('_CALLED_METHOD',$v-&gt;match_array['method']);
  
  # Load the routed class.
  if( class_exists($controllerName, true) &amp;&amp; method_exists($controllerName, $methodName) )
  {
      $this-&gt;route_params = $v-&gt;match_array['params'];
  
      $dispatch = new $controllerName();
      return call_user_func_array(array($dispatch, $methodName), $v-&gt;match_array['params']);
  } else {
      $this-&gt;Error = new \Framework\Error\Error;
      return $this-&gt;Error-&gt;bootstrap('404');
  }
  </code></pre>
  
  <p>My problem is, that in the class, I call, I can't get to use my constants, that is defined. I have always thought of constants as being in a global scope - is that wrong?</p>
  
  <p>This means that when I've defined them, I could use them in any called class/function, but that doesn't seem to be right, since I get the following Notices:</p>
  
  <pre><code>Notice: Use of undefined constant _CALLED_MODULE - assumed '_CALLED_MODULE' 
  </code></pre>
  
  <p>Am I using the constants wrong? How should I pass global data instead?</p>
  
  <h2>EXPLANATION OF LOGIC</h2>
  
  <ul>
  <li>My router has an array of routes which is connected to the URL.</li>
  <li>The router loops through this array</li>
  <li>When a match is found, the router defines the module, controller and method</li>
  <li>The checks if the class with the namespace and name is existing</li>
  <li>The class-file includes via an autoloader-function (IS THIS MAYBE THE PROBLEM???)</li>
  </ul>