/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/View/Design/Theme/ThemePackage.php
121 строка
2 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ 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; } }