diff --git a/1872.zip b/1872.zip new file mode 100644 index 0000000..f099562 Binary files /dev/null and b/1872.zip differ diff --git a/1941.pdf b/1941.pdf new file mode 100644 index 0000000..472dd02 Binary files /dev/null and b/1941.pdf differ diff --git a/1955.html b/1955.html new file mode 100644 index 0000000..7a49ebf --- /dev/null +++ b/1955.html @@ -0,0 +1,31 @@ +Part One – Introduction
+Chapter 1 – PHP: Design and Management
+
+Part Two – Objects
+Chapter 2 – PHP and Objects
+Chapter 3 – Object Basics
+Chapter 4 – Advanced Features
+Chapter 5 – Object Tools
+Chapter 6 – Objects and Design
+
+Part Three – Patterns
+Chapter 7 – What Are Design Patterns? Why Use Them?
+Chapter 8 – Some Pattern Principles
+Chapter 9 – Generating Objects
+Chapter 10 – Designing for Object Relations
+Chapter 11 – Performing and Representing Tasks
+Chapter 12 – Enterprise Patterns
+
+Part Four – Practice
+Chapter 13 – Good (and Bad) Practice
+Chapter 14 – An Introduction to PEAR
+Chapter 15 – Generating Documentation with phpDocumentor
+Chapter 16 – Version Control with CVS
+Chapter 17 – Automated Build with Phing
+
+Part Five – Conclusion
+Chapter 18 – Objects, Patterns, Practice
+
+Part Six – Appendixes
+Appendix A – Bibliography
+Appendix B – A Simple Parser \ No newline at end of file diff --git a/2500.html b/2500.html new file mode 100644 index 0000000..2508286 --- /dev/null +++ b/2500.html @@ -0,0 +1 @@ + Errata for 582-3 Asleson (corrected in the second printing)

Errata 380-4 Zandstra (corrected in the 2nd printing)

Page

Original Sentence

Corrected Sentence

 408

protected function doScan( Scanner $scanner ) {

foreach( $this->parsers as $parser ) {

if ( ! ( $parser->trigger( $scanner ) &&

$scan=$parser->scan( $scanner )) ) {

return false;

}

}

return true;

protected function doScan( Scanner $scanner ) {

$s_copy = clone $scanner;

foreach( $this->parsers as $parser ) {

if ( ! ( $parser->trigger( $s_copy ) &&

$scan=$parser->scan( $s_copy )) ) {

return false;

}

}

$scanner->updateToMatch( $s_copy );

return true;

408

// This matches if one or more subparsers match

// This matches if zero or more subparsers match

408

protected function doScan( Scanner $scanner ) {

if ( empty( $this->parsers ) ) {

return true;

protected function doScan( Scanner $scanner ) {

$s_copy = clone $scanner;

if ( empty( $this->parsers ) ) {

409

if ( ! $parser->trigger( $scanner ) ) {

// no initial match is fine

return true;

}

if ( $parser->scan( $scanner ) ) {

// all is well. go again

$this->scan( $scanner );

} else {

// we got a partial match but failed

return false;

}

return true;

while ( true ) {

if ( ! $parser->trigger( $s_copy ) ) {

$scanner->updateToMatch( $s_copy );

return true;

}

$s_copy2 = clone $s_copy;

if ( ! $parser->scan( $s_copy2 ) ) {

$scanner->updateToMatch( $s_copy );

return true;

}

$s_copy = $s_copy2;

}

return true;

 

\ No newline at end of file diff --git a/9781590593806.jpg b/9781590593806.jpg new file mode 100644 index 0000000..390afbf Binary files /dev/null and b/9781590593806.jpg differ diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..85fa6f8 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,27 @@ +Freeware License, some rights reserved + +Copyright (c) 2004 Matt Zandstra + +Permission is hereby granted, free of charge, to anyone obtaining a copy +of this software and associated documentation files (the "Software"), +to work with the Software within the limits of freeware distribution and fair use. +This includes the rights to use, copy, and modify the Software for personal use. +Users are also allowed and encouraged to submit corrections and modifications +to the Software for the benefit of other users. + +It is not allowed to reuse, modify, or redistribute the Software for +commercial use in any way, or for a user’s educational materials such as books +or blog articles without prior permission from the copyright holder. + +The above copyright notice and this permission notice need to be included +in all copies or substantial portions of the software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..7d7e779 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +#Apress Source Code + +This repository accompanies [*PHP 5 Objects, Patterns, and Practice*](http://www.apress.com/9781590593806) by Matt Zandstra (Apress, 2004). + +[comment]: #cover +![Cover image](9781590593806.jpg) + +Download the files as a zip using the green button, or clone the repository to your machine using Git. + +##Releases + +Release v1.0 corresponds to the code in the published book, without corrections or updates. + +##Contributions + +See the file Contributing.md for more information on how you can contribute to this repository. diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..f6005ad --- /dev/null +++ b/contributing.md @@ -0,0 +1,14 @@ +# Contributing to Apress Source Code + +Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. + +## How to Contribute + +1. Make sure you have a GitHub account. +2. Fork the repository for the relevant book. +3. Create a new branch on which to make your change, e.g. +`git checkout -b my_code_contribution` +4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. +5. Submit a pull request. + +Thank you for your contribution! \ No newline at end of file