/** * Add an advice in the `AdviceCollection` * * @param \Aop\Advice\AdviceInterface $advice An advice instance. * @return \Aop\Advice\AdviceCollection The current `AdviceCollection` instance. */ public function add(AdviceInterface $advice) { $this->container[$advice->getName()] = $advice; return $this; }