Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PackageFile.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Deploy\Package;
7 
10 
14 class PackageFile extends Asset
15 {
19  private $package;
20 
24  private $origPackage;
25 
29  private $deployedFileName;
30 
34  private $deployedFilePath;
35 
39  private $content;
40 
45  public function setPackage(Package $package)
46  {
47  $this->package = $package;
48  if ($this->origPackage === null) {
49  $this->origPackage = $package;
50  }
51 
52  $package->addFile($this);
53  $package->addFileToMap($this);
54 
55  return true;
56  }
57 
61  public function getPackage()
62  {
63  return $this->package;
64  }
65 
69  public function getOrigPackage()
70  {
71  return $this->origPackage;
72  }
73 
78  public function setDeployedFileName($name)
79  {
80  $this->deployedFileName = $name;
81  return true;
82  }
83 
87  public function getDeployedFileName()
88  {
89  return $this->deployedFileName;
90  }
91 
96  public function setDeployedFilePath($name)
97  {
98  $this->deployedFilePath = $name;
99  return true;
100  }
101 
105  public function getDeployedFilePath()
106  {
107  return $this->deployedFilePath;
108  }
109 
113  public function getDeployedFileId()
114  {
115  if ($this->getModule()) {
116  return $this->getModule() . Repository::FILE_ID_SEPARATOR . $this->getDeployedFileName();
117  }
118  return $this->getDeployedFileName();
119  }
120 
124  public function getContent()
125  {
126  return $this->content;
127  }
128 
133  public function setContent($content)
134  {
135  $this->content = $content;
136  return true;
137  }
138 
143  public function setArea($area)
144  {
145  $this->area = $area;
146  return true;
147  }
148 
153  public function setTheme($theme)
154  {
155  $this->theme = $theme;
156  return true;
157  }
158 
163  public function setLocale($locale)
164  {
165  $this->locale = $locale;
166  return true;
167  }
168 
173  public function setModule($module)
174  {
175  $this->module = $module;
176  return true;
177  }
178 }
addFile(PackageFile $file)
Definition: Package.php:253
addFileToMap(PackageFile $file)
Definition: Package.php:274
if(!isset($_GET['name'])) $name
Definition: log.php:14