root / drupal7 / misc / typo3 / phar-stream-wrapper / src / Phar / Container.php @ fbb66ca6
1 |
<?php
|
---|---|
2 |
namespace TYPO3\PharStreamWrapper\Phar; |
3 |
|
4 |
/*
|
5 |
* This file is part of the TYPO3 project.
|
6 |
*
|
7 |
* It is free software; you can redistribute it and/or modify it under the terms
|
8 |
* of the MIT License (MIT). For the full copyright and license information,
|
9 |
* please read the LICENSE file that was distributed with this source code.
|
10 |
*
|
11 |
* The TYPO3 project - inspiring people to share!
|
12 |
*/
|
13 |
|
14 |
class Container |
15 |
{ |
16 |
/**
|
17 |
* @var Stub
|
18 |
*/
|
19 |
private $stub; |
20 |
|
21 |
/**
|
22 |
* @var Manifest
|
23 |
*/
|
24 |
private $manifest; |
25 |
|
26 |
/**
|
27 |
* @param Stub $stub
|
28 |
* @param Manifest $manifest
|
29 |
*/
|
30 |
public function __construct(Stub $stub, Manifest $manifest) |
31 |
{ |
32 |
$this->stub = $stub; |
33 |
$this->manifest = $manifest; |
34 |
} |
35 |
|
36 |
/**
|
37 |
* @return Stub
|
38 |
*/
|
39 |
public function getStub() |
40 |
{ |
41 |
return $this->stub; |
42 |
} |
43 |
|
44 |
/**
|
45 |
* @return Manifest
|
46 |
*/
|
47 |
public function getManifest() |
48 |
{ |
49 |
return $this->manifest; |
50 |
} |
51 |
|
52 |
/**
|
53 |
* @return string
|
54 |
*/
|
55 |
public function getAlias() |
56 |
{ |
57 |
return $this->manifest->getAlias() ?: $this->stub->getMappedAlias(); |
58 |
} |
59 |
} |