diff --git a/src/Tags/Asset.php b/src/Tags/Asset.php index 0d346f976f..bb6f98e64c 100644 --- a/src/Tags/Asset.php +++ b/src/Tags/Asset.php @@ -21,7 +21,7 @@ class Asset extends Assets * * @return string */ - public function __call($method, $arguments) + public function wildcard($method) { $value = Arr::get($this->context, $this->method); $value = (array) $value; diff --git a/src/Tags/Assets.php b/src/Tags/Assets.php index b1d3c396b6..9ef77dcc8b 100644 --- a/src/Tags/Assets.php +++ b/src/Tags/Assets.php @@ -27,7 +27,7 @@ class Assets extends Tags * * @return string */ - public function __call($method, $arguments) + public function wildcard($method) { $value = Arr::get($this->context, $this->method); diff --git a/src/Tags/Collection/Collection.php b/src/Tags/Collection/Collection.php index dc3b316c60..73a22a0d32 100644 --- a/src/Tags/Collection/Collection.php +++ b/src/Tags/Collection/Collection.php @@ -15,13 +15,11 @@ class Collection extends Tags /** * {{ collection:* }} ... {{ /collection:* }}. */ - public function __call($method, $args) + public function wildcard($method) { $this->params['from'] = $this->method; - return $this->output( - $this->entries()->get() - ); + return $this->index(); } /** diff --git a/src/Tags/Glide.php b/src/Tags/Glide.php index bfd584c92a..1f89c2ea49 100644 --- a/src/Tags/Glide.php +++ b/src/Tags/Glide.php @@ -28,7 +28,7 @@ class Glide extends Tags * @param array $args * @return string */ - public function __call($method, $args) + public function wildcard($method) { $tag = explode(':', $this->tag, 2)[1]; diff --git a/src/Tags/ParentTags.php b/src/Tags/ParentTags.php index 640622803a..9a53a1ebd5 100644 --- a/src/Tags/ParentTags.php +++ b/src/Tags/ParentTags.php @@ -22,7 +22,7 @@ class ParentTags extends Tags * @param array $args * @return mixed */ - public function __call($method, $args) + public function wildcard($method) { $var_name = Stringy::removeLeft($this->tag, 'parent:'); diff --git a/src/Tags/Scope.php b/src/Tags/Scope.php index 1bf769b23d..54edc29879 100644 --- a/src/Tags/Scope.php +++ b/src/Tags/Scope.php @@ -6,7 +6,7 @@ class Scope extends Tags { - public function __call($method, $args) + public function wildcard($method) { throw_unless($this->isPair, new \Exception('Scope tag must be a pair')); diff --git a/src/Tags/Section.php b/src/Tags/Section.php index fc596799a7..1051ae8aa6 100644 --- a/src/Tags/Section.php +++ b/src/Tags/Section.php @@ -6,7 +6,7 @@ class Section extends Tags { - public function __call($method, $args) + public function wildcard($method) { $name = explode(':', $this->tag)[1]; diff --git a/src/Tags/Tags.php b/src/Tags/Tags.php index ac43708882..4c873ab2fe 100644 --- a/src/Tags/Tags.php +++ b/src/Tags/Tags.php @@ -137,7 +137,7 @@ public function __call($method, $args) if (static::hasMacro($method)) { $macro = static::$macros[$method]; - if ($macro instanceof Closure) { + if ($macro instanceof \Closure) { $macro = $macro->bindTo($this, static::class); } diff --git a/src/Tags/Theme.php b/src/Tags/Theme.php index b7c84999a9..808bc101ed 100644 --- a/src/Tags/Theme.php +++ b/src/Tags/Theme.php @@ -20,7 +20,7 @@ class Theme extends Tags * @param array $arguments Unused * @return string */ - public function __call($method, $arguments) + public function wildcard($method) { return $this->path($method); } diff --git a/src/Tags/Yields.php b/src/Tags/Yields.php index dd7445dee9..063fe12d67 100644 --- a/src/Tags/Yields.php +++ b/src/Tags/Yields.php @@ -8,7 +8,7 @@ class Yields extends Tags { protected static $aliases = ['yield']; - public function __call($method, $args) + public function wildcard($method) { $name = explode(':', $this->tag)[1];