+ if (is_object($content)) {
+ if (method_exists($content, "toStyleSheet")) {
+ $this->addStyleSheet($content->toStyleSheet());
+ }
+ if (method_exists($content, "toScript")) {
+ $script = $content->toScript();
+ if (is_array($script)) {
+ $this->addScript($script[0], $script[1]);
+ } else {
+ $this->addScript($script);
+ }
+ }
+ } elseif (is_array($content)) {
+ foreach ($content as $element) {
+ if (is_object($content)) {
+ if (method_exists($element, "toStyleSheet")) {
+ $this->addStyleSheet($element->toStyleSheet());
+ }
+ if (method_exists($element, "toScript")) {
+ $script = $element->toScript();
+ if (is_array($script)) {
+ $this->addScript($script[0], $script[1]);
+ } else {
+ $this->addScript($script);
+ }
+ }
+ }
+ }
+ }