class Controller_Users extends \Controller_User { ...
...
...
$this->template->content = \View::factory('index');
...
if ( \Auth::check())
...
\Session::set_flash('notice', 'FLASH: logged in');
\Output::redirect('users');
...
and more and more..
...
app
classes
controller
...
user.php
...
...
modules
users
classes
controller
users.php
...
...
class Controller_Users extends \Controller_User {
and above codes.
Jaroslav Petrusevic wrote on 01/29/11 10:33 pm:@icf, I think it's mainly because now if we extend core classes like DB,
and try to access the \DB - we get the access the extended DB class
and if we use Fuel\Core\DB - we access the 'original' db class, not extended one
namespace ActiveRecord;
use \DB;
use \Database;
use \Inflector;
class Model {
...
...and then, somewhere in a method we have this:
$this->prefixed_table_name = \Database::instance()->table_prefix($this->table_name);
namespace ActiveRecord;
use Fuel\Core\DB;
use Fuel\Core\Database;
use Fuel\Core\Inflector;
class Model {
...
...
$this->prefixed_table_name = Database::instance()->table_prefix($this->table_name);
// Here you could also use its fully qualified name:
// $this->prefixed_table_name = \Fuel\Core\Database::instance()->table_prefix($this->table_name);
...
... /** * @var array List off namespaces of which classes will be aliased to global namespace */ protected static $core_namespaces = array('Fuel\\Core'); ...
It looks like you're new here. If you want to get involved, click one of these buttons!