1 | <?php |
||
34 | final class Assets |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * Array of mixins |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $assets; |
||
43 | |||
44 | /** |
||
45 | * Set assets timeout attribute |
||
46 | * |
||
47 | * @var int |
||
48 | */ |
||
49 | protected $attr_timeout; |
||
50 | |||
51 | /** |
||
52 | * Asset manager constructor |
||
53 | * |
||
54 | * @param Config $config |
||
55 | */ |
||
56 | 102 | public function __construct(Config $config) |
|
60 | |||
61 | /** |
||
62 | * <a-scene><a-assets><audio> |
||
63 | * |
||
64 | * @param string $id |
||
65 | * @return \AframeVR\Interfaces\Core\Assets\AssetAudioInterface |
||
66 | */ |
||
67 | 1 | public function audio(string $id = '0'): \AframeVR\Interfaces\Core\Assets\AssetAudioInterface |
|
71 | |||
72 | /** |
||
73 | * <a-scene><a-assets><img> |
||
74 | * |
||
75 | * @param string $id |
||
76 | * @return \AframeVR\Interfaces\Core\Assets\AssetImageInterface |
||
77 | */ |
||
78 | 1 | public function img(string $id = '0'): \AframeVR\Interfaces\Core\Assets\AssetImageInterface |
|
82 | |||
83 | /** |
||
84 | * <a-scene><a-assets><a-asset-item> |
||
85 | * |
||
86 | * @param string $id |
||
87 | * @return \AframeVR\Interfaces\Core\Assets\AssetItemInterface |
||
88 | */ |
||
89 | 1 | public function item(string $id = '0'): \AframeVR\Interfaces\Core\Assets\AssetItemInterface |
|
93 | |||
94 | /** |
||
95 | * <a-scene><a-assets><video> |
||
96 | * |
||
97 | * @param string $id |
||
98 | * @return \AframeVR\Interfaces\Core\Assets\AssetVideoInterface |
||
99 | */ |
||
100 | 1 | public function video(string $id = '0'): \AframeVR\Interfaces\Core\Assets\AssetVideoInterface |
|
104 | |||
105 | /** |
||
106 | * Mixin which will be directly applied to element usin it |
||
107 | * |
||
108 | * A-Frame PHP does not create <a-mixin>. Instead it is appling |
||
109 | * mixin directly on element using this mixin. |
||
110 | * |
||
111 | * @param string $id |
||
112 | * @return \AframeVR\Interfaces\Core\Assets\MixinInterface |
||
113 | */ |
||
114 | 3 | public function mixin(string $id = '0'): \AframeVR\Interfaces\Core\Assets\MixinInterface |
|
118 | |||
119 | /** |
||
120 | * Setting a timeout |
||
121 | * |
||
122 | * @param int $milliseconds |
||
123 | * @return Assets |
||
124 | */ |
||
125 | 1 | public function timeout(int $milliseconds = 3000) |
|
130 | |||
131 | /** |
||
132 | * Get all assets |
||
133 | * |
||
134 | * @return array|null |
||
135 | */ |
||
136 | 23 | public function getAssets() |
|
140 | } |
||
141 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.