Commit graph

11 commits

Author SHA1 Message Date
Olly Betts
1f1349741f
[php] Generate PHP type declarations
We now automatically generate PHP type declarations for PHP >= 8.0.

The generated code still compiles with PHP 7.x but without type declarations.
2022-01-20 10:07:44 +13:00
Olly Betts
5577257301 Eliminate $needNewFlow from factory.i
$needNewFlow in an output typemap is now only relevant when wrapping
to a PHP __construct method, and there the return type is known so
factory.i isn't useful.
2021-04-21 16:32:56 +12:00
Olly Betts
c705ef8f32 Use PHP objects instead of resources to wrap pointers
Pointer to member is currently still wrapped as a resource.
2021-04-21 15:40:35 +12:00
Olly Betts
dcdaaba7ba Eliminate $zend_obj typemap variable
We can just get the zend_class_entry from the swig_type_info when
we need it.
2021-04-16 13:13:24 +12:00
Olly Betts
2ba0f82720 Merge branch 'master' into gsoc2017-php7-classes-via-c-api 2021-03-26 12:00:59 +13:00
Olly Betts
3fba8e7daa php: Trim trailing whitespace from PHP typemaps 2021-03-26 10:19:57 +13:00
Nihal
9c40bbdb85 Refactor SWIG_SetZval to simplify the arguments. Solve constructor rename bug
- Refactor SWIG_SetZval.
- Fix the Renamed constructor - turn into static factory method bug.

Conflicts:
	Source/Modules/php.cxx
2017-08-28 11:22:51 +05:30
Nihal
4252b31f8f Refactor code to rename class entry variables and ConvertPtr to work with wrapped objects.
- Rename class entry variables to SWIGTYPE_class_ce
- Refactor factory code to use SWIGTYPE_class_ce to create objects
- Refactor ConvertPtr to work of wrapped class objects.
2017-08-20 01:54:07 +05:30
Nihal
da53351cac Refactor code and introduce some functionalities.
Code Refactor
- Refactor code for return type of SWIGTYPE
- Workaround for Namespaced classes.
- Refactor code of SWIG_SetZval to take care of objects in class constructor.
- Introduce SWIG_generalize_object to generalize each object to swig object wrapper.
- Catch feature:immutable instead of feature:warnfilter - 462 for missing setter.
- Refactor code to create PHP objects for all instances of value, reference and pointer return types of C++ objects.
- Introduce getAccessMode to get the Access Mode of a method for generating Wrapper.
- Refactor free_object creation to include need_free condition. This is to check if there is a need to free. (Virtual Protected Destructors)
- Support for feature:exceptionclass. Extends class Exception.
- Improve condition check in Director class constructor to distinguish between, extended class creation or not.
  Swig::Director::swig_is_overridden_method is used.
2017-08-12 10:11:47 +05:30
Nihal
a930743932 Refactor Code and Support phpinterfaces, factory dispatch
- rewire return of type SWIGTYPE
- {NULL, NULL, NULL} to ZEND_FE_END
- feature:warnfilter - 462 of missing setter
- refactor code of return type (replaced)
- support conversion_operator
2017-08-04 23:13:19 +05:30
Miklos Vajna
0249eea389 Merge https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-vmiklos/
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11434 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-22 11:08:29 +00:00