![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/framework/View/Design/Theme/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\View\Design\Theme; use Magento\Framework\Config\Theme; /** * Value-object for a theme package */ class ThemePackage { /** * Area * * @var string */ private $area; /** * Vendor name * * @var string */ private $vendor; /** * Theme name * * @var string */ private $name; /** * Theme path key * * @var string */ private $key; /** * Full path to the theme * * @var string */ private $path; /** * Constructor * * @param string $key * @param string $path */ public function __construct($key, $path) { $keyParts = explode(Theme::THEME_PATH_SEPARATOR, $key); if (count($keyParts) != 3) { throw new \UnexpectedValueException( "Theme's key does not correspond to required format: '<area>/<vendor>/<name>'" ); } $this->key = $key; $this->path = $path; $this->area = $keyParts[0]; $this->vendor = $keyParts[1]; $this->name = $keyParts[2]; } /** * Get area * * @return string */ public function getArea() { return $this->area; } /** * Get vendor name * * @return string */ public function getVendor() { return $this->vendor; } /** * Get theme name * * @return string */ public function getName() { return $this->name; } /** * Get path key * * @return string */ public function getKey() { return $this->key; } /** * Get full path * * @return string */ public function getPath() { return $this->path; } }