Skip to content

Commit a8898fd

Browse files
author
hikki
committed
7
1 parent 16ddc3f commit a8898fd

File tree

21 files changed

+30
-31
lines changed

21 files changed

+30
-31
lines changed

src/Assembly/Abs/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
interface Component
88
{
9-
public function __invoke();
9+
public function __toString();
1010
}

src/Assembly/Abs/Input.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,5 @@ public function annotate()
141141
$this->annotation = "{$attribute} {$enumerate} style=\"{$style}\"";
142142
}
143143

144-
abstract public function __invoke();
144+
abstract public function __toString();
145145
}

src/Assembly/Abs/Layout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ interface Layout
1010
* @param Component|Layout $document
1111
*/
1212
public function append($document);
13-
public function __invoke();
13+
public function __toString();
1414
}

src/Assembly/Abs/Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ public function annotate()
7070
$this->annotation = "{$attribute} {$enumerate} style=\"{$style}\"";
7171
}
7272

73-
abstract public function __invoke();
73+
abstract public function __toString();
7474
}

src/Assembly/Layout/Section.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public function append($document)
2727
if ($document instanceof Component || $document instanceof Layout) $this->documents[] = $document;
2828
}
2929

30-
public function __invoke()
30+
public function __toString()
3131
{
3232
$html = "";
3333
foreach ($this->documents as $document) {
34-
$html .= $document();
34+
$html .= $document;
3535
}
3636
$cols = str_repeat(" 1fr ", $this->cols);
3737
return sprintf("<div class='dlp-section' style='grid-template-columns:{$cols};{$this->style}'>%s</div>", $html);

src/Assembly/Layout/Swing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public function append($document)
2525
if ($document instanceof Component || $document instanceof Layout) $this->documents[] = $document;
2626
}
2727

28-
public function __invoke()
28+
public function __toString()
2929
{
3030
$html = "";
3131
foreach ($this->documents as $document) {
32-
$html .= $document();
32+
$html .= $document;
3333
}
3434

3535
return sprintf("<div id='dlp-swing-{$this->column}' class='dlp-swing'>%s</div>", $html);

src/Assembly/Unit/Button.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ public function label($title)
3131
return $this;
3232
}
3333

34-
public function __invoke()
34+
public function __toString()
3535
{
3636
if(!$this->label) return $this->content;
3737

3838
return <<<EOF
3939
<div class="dlp dlp-form-row">
40-
<label class="dlp-text" for="{$this->column}">{$this->label}</label>
41-
{$this->content}
40+
<label class="dlp-text" for="{$this->column}">{$this->label}</label>{$this->content}
4241
</div>
4342
EOF;
4443
}

src/Assembly/Unit/CascadeDot.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function withoutHiddenInput()
6161
return $this;
6262
}
6363

64-
public function __invoke()
64+
public function __toString()
6565
{
6666
$this->selected = json_encode($this->selected);
6767
$this->annotate();

src/Assembly/Unit/CascadeLine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function url($url)
2828
return $this;
2929
}
3030

31-
public function __invoke()
31+
public function __toString()
3232
{
3333
$this->annotate();
3434
$content = <<<EOF

src/Assembly/Unit/Datetime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function locale($lan = 'zh-CN')
3939
return $this;
4040
}
4141

42-
public function __invoke()
42+
public function __toString()
4343
{
4444
$pickerSettings = json_encode(array_merge(['format' => 'YYYY-MM-DD HH:mm:ss', 'locale' => 'zh-CN'], $this->pickerSettings));
4545
$this->annotate();

0 commit comments

Comments
 (0)