File tree Expand file tree Collapse file tree 2 files changed +15
-21
lines changed
Expand file tree Collapse file tree 2 files changed +15
-21
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public function getCode()
2929
3030 if (empty ($ code )) {
3131 $ url = (new Url ($ this ->request ->getUrl ()))
32- ->withAddedDirectory ('player ' );
32+ ->withAddedPath ('player ' );
3333
3434 $ code = Utils::iframe ($ url ->getUrl (), $ this ->width , $ this ->height );
3535 }
Original file line number Diff line number Diff line change @@ -205,26 +205,6 @@ public function withDirectoryPosition($key, $value)
205205 return $ clone ;
206206 }
207207
208- /**
209- * Returns a clone with other directory in a specific position
210- *
211- * @param string $value The new value
212- *
213- * @return Url
214- */
215- public function withAddedDirectory ($ value )
216- {
217- $ clone = clone $ this ;
218-
219- if (isset ($ clone ->info ['file ' ])) {
220- $ clone ->info ['path ' ][] = $ clone ->info ['file ' ];
221- }
222-
223- $ clone ->info ['file ' ] = $ value ;
224-
225- return $ clone ;
226- }
227-
228208 /**
229209 * Return all directories
230210 *
@@ -271,6 +251,20 @@ public function withPath($path)
271251 return $ clone ;
272252 }
273253
254+ /**
255+ * Returns a clone with path appended
256+ *
257+ * @param string $path
258+ *
259+ * @return Url
260+ */
261+ public function withAddedPath ($ path )
262+ {
263+ $ path = $ this ->getPath ().'/ ' .$ path ;
264+
265+ return $ this ->withPath ($ path );
266+ }
267+
274268 /**
275269 * Check if the url has a query parameter
276270 *
You can’t perform that action at this time.
0 commit comments