Archived
This forum has been archived. Please start a new discussion on GitHub.
Passing parameters to constructor
jacopo
in Help Center
Hi and sorry again for my broken English 
We were wondering about a method to pass parameters to constructor (isn' t it still possible, right?).
We have a set of empty PHP classes which call the respective C++ functions. Some of these classes need passing parameters to its constructor (to be implemented).
Have you any idea?
We have thought to make a function that act like the constructor, so this will be:
type myClass = new Class();
myClass->initialize(a,b,c);
instead of
type myClass = new Class(a,b,c);
Maybe have you any better solutions?
Thanks
We were wondering about a method to pass parameters to constructor (isn' t it still possible, right?).
We have a set of empty PHP classes which call the respective C++ functions. Some of these classes need passing parameters to its constructor (to be implemented).
Have you any idea?
We have thought to make a function that act like the constructor, so this will be:
type myClass = new Class();
myClass->initialize(a,b,c);
instead of
type myClass = new Class(a,b,c);
Maybe have you any better solutions?
Thanks
0
