Debian Codegraph @

vendor/ipl/web/src/Compat/Multipart.php

raw
1 <?php
2
3 namespace ipl\Web\Compat;
4
5 use ipl\Html\HtmlDocument;
6 use ipl\Html\HtmlString;
7
8 class Multipart extends HtmlDocument
9 {
10 /** @var string */
11 protected $for;
12
13 protected $contentSeparator = "\n";
14
15 /**
16 * Set the container's id which this part is for
17 *
18 * @param string $id
19 *
20 * @return $this
21 */
22 public function setFor($id)
23 {
24 $this->for = $id;
25
26 return $this;
27 }
28
29 protected function assemble()
30 {
31 $this->prepend(HtmlString::create(sprintf('for=%s', $this->for)));
32 }
33 }