Can you please clarify what needs to be done (on some very basic example: here what I have and here is what I want to have; as a code so it can be copy-pasted)?
It's not clear at all what you wish to be done here: if you want to generate setters/getters or something else.
So I implement an interface (e.g. ProductInterface) using Code/Implement Methods. The product interface has say 20/30 properties each with a getId()/setId(), getSku()/setSku(). I would like generate at the module level "private $_Id; private $_Sku;" and in each of the getters/setters
[code]
private $_Sku; public function getSku() { return $this->_sku; }
/** * Set product sku * * @param string $sku * @return $this */ public function setSku($sku) { $this->_sku=$sku; }
I mean automatically without having to type them all out.
Hi there,
Can you please clarify what needs to be done (on some very basic example: here what I have and here is what I want to have; as a code so it can be copy-pasted)?
It's not clear at all what you wish to be done here: if you want to generate setters/getters or something else.
So I implement an interface (e.g. ProductInterface) using Code/Implement Methods. The product interface has say 20/30 properties each with a getId()/setId(), getSku()/setSku(). I would like generate at the module level "private $_Id; private $_Sku;" and in each of the getters/setters
[code]
[/code]
I thought you could do it but I've looking everywhere and I can't seem to see how its done without typing it.
OK ... so you have getters/setters and need to introduce fields. Am I correct?
If so -- you can do it one by one:
Or you can do the same in a batch mode:
Code sample:
That's great! Thanks very much.