Hey,
I have been given this question in prep for my ZCE exam, I believe this is a simple example of the 'Factory' pattern and that is what I have given. Can anyone advise?
Q: The following is an example of what design pattern?
PHP Code:
<?php
class MyClassBuilder {
public function build() {
return new MyClass();
}
}
?>
Answers (choose 1):
None of the above
Builder
Factory
Singleton
Observer
Cheers,
Picco