Is there any way to make a "multiple use"?
I'm using an plugin in Silex to use ORM with it, and in each Entity I have to make a use like this:
use Doctrine\ORM\Mapping\Entity,
Doctrine\ORM\Mapping\Table,
Doctrine\ORM\Mapping\Id,
Doctrine\ORM\Mapping\Column,
Doctrine\ORM\Mapping\GeneratedValue,
Doctrine\ORM\Mapping\ManyToOne,
Doctrine\ORM\Mapping\ManyToOne;
So, my question is, is there in PHP a "multiple using" like Java? I mean:
use Doctrine\ORM\Mapping\*;
Or maybe using an autoload technique made by Silex/Symfony or something?
Why not do this...
use Doctrine\ORM\Mapping as ORM;
Then in your annotations...
/**
* @ORM\Column(type="int")
*/
protected $name;
And so on...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With