-
-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Description
I'm trying to generate the following:
const PLACE_NEW = 'new';
#[Transition(from: self::PLACE_NEW)]
const TRANSITION='load';Creating the constants is easy, but how do I create a self:: instead of the actual value? This isn't working:
$from = 'self::PLACE_NEW'; // generates the string with self::,
$from = new Constant('PLACE_NEW', 'new') // generates 'new', not self::PLACE_NEW
$constant = $class->addConstant('TRANSITION');
$constant->addAttribute(Transition::class, ['from' => $from]);kinda tricky, but this library has is amazing so maybe it has something for this.
Metadata
Metadata
Assignees
Labels
No labels