Recently, I used getMemento() quite often. I noticed getMemento runs all getters in the object. I was wondering how could I have the same behavior when using only get() ?
productService = getInstance( “ProductService” );
product = productService.get( 1 ); // Object was created and initialized
dump( product.getMemento() ); // All getters were executed
dump( product ); // No getters were executed
Any tips or suggestions? Thank you.