-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New feature: it now is also possible to call the $object->getIterator…
…() method explicitly when a C++ class implements the Traversable interface + this fixes the issue that in PHP 8 environments an error was reported that all Traversable objects could not be instantiated because they were abstract
- Loading branch information
1 parent
cfc3460
commit f9fe7a9
Showing
4 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
*.d | ||
*.o | ||
*.a | ||
*.so | ||
*.txt | ||
*.a.* | ||
*.so.* | ||
build/ | ||
.vscode/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Base class for defining your own objects | ||
* | ||
* @author Emiel Bruijntjes <[email protected]> | ||
* @copyright 2013 - 2022 Copernica BV | ||
* @copyright 2013 - 2024 Copernica BV | ||
*/ | ||
|
||
/** | ||
|
@@ -285,6 +285,14 @@ class PHPCPP_EXPORT Base | |
*/ | ||
Php::Value __count(Php::Parameters ¶ms); | ||
|
||
/** | ||
* Method that is called when an explicit call to $object->getIterator() is | ||
* made, AND that is called when running on PHP 8 and higher (because somehow | ||
* the get_iterator function is skipped by PHP 8 for non-internal classes)? | ||
* @return Php::Value | ||
*/ | ||
Php::Value __getIterator(); | ||
|
||
|
||
private: | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters