masterSlides; } /** * Get master slide relations * * @return array */ public function getMasterSlideRelations() { return $this->masterSlideRels; } /** * Get themes * * @return array */ public function getThemes() { return $this->themes; } /** * Get theme relations * * @return array */ public function getThemeRelations() { return $this->themeRelations; } /** * Get array of slide layouts * * @return array */ public function getLayouts() { return $this->layouts; } /** * Get array of slide layout relations * * @return array */ public function getLayoutRelations() { return $this->layoutRelations; } /** * Find specific slide layout. * * This is an array consisting of: * - masterid * - name (string) * - body (string) * * @param string $name * @param int $masterId * @return array * @throws \Exception */ public function findLayout($name = '', $masterId = 1) { foreach ($this->layouts as $layout) { if ($layout['name'] == $name && $layout['masterid'] == $masterId) { return $layout; } } throw new \Exception("Could not find slide layout $name in current layout pack."); } /** * Find specific slide layout id. * * @param string $name * @return int * @throws \Exception */ public function findLayoutId($name = '') { foreach ($this->layouts as $layoutId => $layout) { if ($layout['name'] == $name) { return $layoutId; } } throw new \Exception("Could not find slide layout $name in current layout pack."); } /** * Find specific slide layout name. * * @param int $idLayout * @return int * @throws \Exception */ public function findLayoutName($idLayout = null) { foreach ($this->layouts as $layoutId => $layout) { if ($layoutId == $idLayout) { return $layout['name']; } } throw new \Exception("Could not find slide layout $idLayout in current layout pack."); } }