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

oop(s) #26

Closed
jarnix opened this issue Jan 9, 2015 · 1 comment
Closed

oop(s) #26

jarnix opened this issue Jan 9, 2015 · 1 comment
Labels

Comments

@jarnix
Copy link

jarnix commented Jan 9, 2015

I don't understand the point of having namespaces and oop if we need to require a file having functions defined globally like in functions.php

<?php

if (!function_exists('React\Promise\resolve')) {
    require __DIR__.'/functions.php';
}
@jsor
Copy link
Member

jsor commented Jan 9, 2015

All functions are under the React\Promise namespace and the file must be required as we don't have function autoloading (yet) in PHP. This particular code is a workaround, see #23.

@cboden cboden closed this as completed Jan 25, 2015
@clue clue added the question label Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants