php - How to alias namespaces in a codeigniter application? -
i have codeigniter integrated composer into. i'm next tutorial implement laravel's eloquent orm application working great. question in laravel, can :
class user extends eloquent { }
to utilize model implemantion have
use illuminate\database\eloquent\model eloquent; class user extends eloquent { }
how alias across models in codeigniter?
there core php method called class_alias
. allows alias used classes shorter name, used remove long namespace.
more info on: http://php.net/manual/en/function.class-alias.php
this how laravel uses it: uses custom class aliasloader runs on every item in alias array of configuration , calls class_alias
it.
see: https://github.com/laravel/framework/blob/8b9bdc869ca7995412b10568122c496be244430a/src/illuminate/foundation/aliasloader.php#l64
php codeigniter eloquent composer-php
No comments:
Post a Comment