Welcome Guest, Not a member yet? Register   Sign In
Class alias array config in future release of codeigniter
#1

(This post was last modified: 12-26-2015, 10:33 AM by pmbaldha.)

There is great thing that codeigniter have built in composer auto load configuration by $config['composer_autoload'];

Codeigniter should provide class alias array which gives flexibility to access class by short handy name or by any other convenient name.
$config['class_alias'] =array(
    "ns1\ns2\ns3\A" => "A"
);
and you should access A class directly by 'A' instead of 'ns1\ns2\ns3\A'.
php have class_alias function as indicated on http://php.net/manual/en/function.class-alias.php.

Other famous framework like laravel and symfony are alredy using this idea..

This will make very easy to deal with any namespaced class.

I am in favour for namespace in codeigniter 4.
[email protected]
Php Team Leader, freelancer
github.com/pmbaldha
Reply


Messages In This Thread
Class alias array config in future release of codeigniter - by pmbaldha - 12-25-2015, 10:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB