> /*
>  * this encounters a namespace. The auto-prefix-import option
>  * is active so EVERYTHING is inside the namespace is imported
>  * with a prefix of "JessieStuff_".
>  */
> require 'JessiePackage.php';
> $x=new JessieStuff_SimpleClass();


So let's say we've got a package like this:


namespace JessieStuff {

  class FirstClass { ... }

  class SecondClass {

    public $obj;

    function __construct() {
      $this->obj = new FirstClass();
    }
  }
}


Now we'd import this with prefixing everything and the
result would be something that acts like:


class JessieStuff_FirstClass { ... }

class JessieStuff_SecondClass {

  public $obj;

  function __construct() {
    $this->obj = new FirstClass();
  }
}


Then, if I do:

$x = new JessieStuff_SecondClass();

I'd get an error that 'FirstClass' can't be found. Because it's
renamed to JessieStuff_FirstClass.

Or do you suggest we replace all occurences of 'new ClassName()' to
'new JessieStuff_ClassName()' as well?

Or do you suggest that everything that was inside the namespace is
still able to call "internal" classes without using the namespace
prefix? And your INI option only provides interface classes?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to