Adding two of the same observer in Fuelphp (ORM)

85 views Asked by At

Is there anyway to add two of the same type of observer to a Model in FuelPHP (ORM). (I'd actually be using a custom observer rather than the CreatedAt at shown below)

protected static $_observers = array(
    'Orm\\Observer_CreatedAt' => array(
    ...
    ),
    'Orm\\Observer_CreatedAt' => array(
    ...
    ),
);

Obviously the above won't work because only one of a given key can be set in an array. Is there any workaround to avoid duplicating the observer file itself?

1

There are 1 answers

5
Emlyn On BEST ANSWER

No, the current ORM code does not allow you to add multiple observers of the same class.