PHP Objects, Patterns and Practice (3rd edition)
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING and queries transparent to the client. Trees are easy to traverse (as we s ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING I can now acquire a polluted tile very easily: $tile = new PollutedPlains( ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING Figure 10–4. More hard-coded variations What happens, though, when you nee ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING Here, I have declared Tile and Plains classes as before but introduced a n ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING Figure 10–5. The Decorator pattern This model is very extensible. You can ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING class LogRequest extends DecorateProcess { function process( RequestHelper ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING Consequences Like the Composite pattern, Decorator can be confusing. It is ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING function getNameFromLine( $line ) { if ( preg_match( "/.-(.)\s\d+/", $line ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING } private function compile() { $lines = getProductFileLines( $this->fil ...
CHAPTER 10 ■ PATTERNS FOR FLEXIBLE OBJECT PROGRAMMING ...
C H A P T E R 11 ■ ■ ■ Performing and Representing Tasks In this chapter, we get active. I look at patterns that help you to get ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS Of course, you have a programming language at hand right away. It’s called PHP. H ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS Table 11–1 lists EBNF names. So what is EBNF all about? It’s a notation that you ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS will then be passed along to other Expression objects. So that data can be retrie ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS I’ll begin with the InterpreterContext class. As you can see, it is really only a ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS $myvar->setValue("five"); $myvar->interpret( $context ); print $context-> ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS ■Note doInterpret() is an instance of the Template Method pattern. In this patter ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS these objects compares the VariableExpression object stored in $input with a Lite ...
■Chapter 11: Performing and Representing Tasks ............................................. 4: top marks 52: dunce hat on You m ...
CHAPTER 11 ■ PERFORMING AND REPRESENTING TASKS position to offer your users a nice, friendly language. Appendix B contains some ...
«
6
7
8
9
10
11
12
13
14
15
»
Free download pdf