/** * @param string $name * @param mixed $args * * @return mixed * * @throws Exceptions\DecoratorNotRegisteredException */ public function __call($name, $args) { if (Utils\Strings::startsWith($name, 'render')) { // Get decorator name if ($decoratorName = Utils\Strings::capitalize(Utils\Strings::substring($name, 6))) { // Set widget decorator $this->setDecorator($decoratorName); } // Call component rendering $this->render(); } else { return parent::__call($name, $args); } }