PHP Objects, Patterns and Practice (3rd edition)
APPENDIX B ■ A SIMPLE PARSER } function trigger( Scanner $scanner ) { return true; } protected function doScan( Scanner $scanner ...
APPENDIX B ■ A SIMPLE PARSER protected function doScan( Scanner $scanner ) { $type = $scanner->tokenType(); foreach ( $this-& ...
APPENDIX B ■ A SIMPLE PARSER function trigger( Scanner $scanner ) { if ( $scanner->tokenType() != Scanner::WORD ) { return fa ...
APPENDIX B ■ A SIMPLE PARSER The idea behind this use of the Composite pattern is that a client can build up a grammar in code t ...
APPENDIX B ■ A SIMPLE PARSER $scanresult = $statement->scan( $scanner ); if (! $scanresult || $scanner->tokenType() != \gi ...
APPENDIX B ■ A SIMPLE PARSER ->setHandler( new StringLiteralHandler() ); $comp->add( $this->variable() ); $this->ope ...
APPENDIX B ■ A SIMPLE PARSER object. If the raw code does not parse, the compile() method throws an exception. Otherwise, it ret ...
APPENDIX B ■ A SIMPLE PARSER } class EqualsHandler implements \gi\parse\Handler { function handleMatch( \gi\parse\Parser $parser ...
Index ■ ■ ■ ■ A abstract classes, 45 approximation of, in PHP 4, 46 extending, 46 representing in UML, 111 reproducing the metho ...
■Index.......................................................................................................................... ...
■ INDEX channel element, 335, 339 channel-discover command, 328 channel-info command, 328 char_no(), 473 CharacterParse class, c ...
■ INDEX function keyword, 19 get_class(), 83 get_class_methods(), 84 get_class_vars(), 85 get_declared_classes(), 82 get_parent_ ...
■ INDEX add and remove functionality, implementing, 173 benefits of, 174 Civilization-style game, code listing, 170 class diagra ...
■ INDEX Notifier class, 140 RegistrationMgr class, 140 TextNotifier class, 140 See also decoupling create command, 363 create_fu ...
■ INDEX insert(), 277–278 Iterator interface, code listing, 281 Iterator interface, table of methods, 280 managing mapper creati ...
■ INDEX PEAR and, 129 PHP and, 129 Portland Pattern Repository, 126 programming-related web sites, list of, 464 promoting good d ...
■ INDEX encapsulating the concept that varies, 142 hiding implementation behind a clean interface, 138 endtoken attribute, 420 e ...
■ INDEX factory, definition of, 44, 148 Factory Method pattern ApptEncoder class, 153 being wary of duplicate conditionals, 154 ...
■ INDEX getApptEncoder(), 153, 156 getBacktrace(), table of elements, 331 getCause(), 332–333 getClass(), 93, 96 getClassSource( ...
■ INDEX maintaining a global key table, 290 managing information about objects, 289 Memcached, 291 ObjectWatcher class, 290 Spac ...
«
18
19
20
21
22
23
24
25
26
27
»
Free download pdf