private function _recursivelyGetFromTheme(tubepress_api_theme_ThemeInterface $theme, $getter) { $toReturn = $theme->{$getter}($this->_environment->getBaseUrl(), $this->_environment->getUserContentUrl()); $parentThemeName = $theme->getParentThemeName(); if (!$parentThemeName) { return $toReturn; } $theme = $this->_themeRegistry->getInstanceByName($parentThemeName); if (!$theme) { return $toReturn; } $fromParent = $this->_recursivelyGetFromTheme($theme, $getter); if (is_array($fromParent)) { $toReturn = array_merge($fromParent, $toReturn); } else { $toReturn = $fromParent . $toReturn; } return $toReturn; }