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

Remove get, has, let and set Method(s) from Non-Static Class(es) #166

Closed
taufik-nurrohman opened this issue Dec 6, 2021 · 0 comments
Closed
Labels
Milestone

Comments

@taufik-nurrohman
Copy link
Member

Use the built-in __get, __isset, __set and __unset method overloading instead.

Before

if (!$page->has('foo')) {
    $page->set('foo', ['bar' => 1]);
}

echo $page->get('foo.bar');
echo $page->get('foo-bar');

After

if (!isset($page->foo)) {
    $page->foo = ['bar' => 1];
}

echo $page->foo->bar ?? null;
echo $page->fooBar;
@taufik-nurrohman taufik-nurrohman added this to the v3.0.0 milestone Dec 6, 2021
taufik-nurrohman added a commit that referenced this issue Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant