I'm using composer
with autoload in the class namespaces, assuming I have the parent Model :
Model.php
<?php
namespace App\Model;
use App\Utils;
use \PDO;
class Model {}
And the child class Item : Item.php
<?php
namespace App\Model;
class Item extends Model {}
Would there be any way for me to "inherit" also the imports of the parent class namespaces ( App\Utils
and \PDO
)?
I'm wondering why I'd need to use multiple classes that use App\Utils
and \PDO
, and would like to know if there's any way you can not repeat the use
statement every time.
Thank you!