Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Cannot use ::class with dynamic class name #5

Open
Vladzimir opened this issue Mar 3, 2024 · 0 comments
Open

Fatal error: Cannot use ::class with dynamic class name #5

Vladzimir opened this issue Mar 3, 2024 · 0 comments

Comments

@Vladzimir
Copy link

Vladzimir commented Mar 3, 2024

<?php

use Leaf\UI;
use Leaf\UI\Component;

require __DIR__ . '/vendor/autoload.php';

class Counter extends Component
{
  public $count = 0;
  public $key = 'Counter';

  public function increment()
  {
    $this->count++;
  }

  public function decrement()
  {
    $this->count--;
  }

  public function render()
  {
    return UI::view('view.html');
  }
}

UI::render(new Counter());

Fatal error: Cannot use ::class with dynamic class name in vendor\leafs\ui\src\UI.php on line 46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

1 participant