Archived
This forum has been archived. Please start a new discussion on GitHub.
Passing parameters to constructor
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
Comments
-
Sorry for this up, but it' s important for us to have an answer.
Probably we have explanied not so good, but we would know if we have written a non-sense... :rolleyes:
Thanks in advance and sorry again0 -
Hi,
Sorry, but it is not clear to me what your question is. Does this have anything to do with Ice?
Take care,
- Mark0