Object-Oriented PHP Concepts, Techniques, and Code[PL] [pdf].pdf

(4256 KB) Pobierz
15268496 UNPDF
®
PHP
CONCEPTS , TECHNIQUES , A N D CODE
P E T E R L A V I N
OBJECT-ORIENTED
OBJECT-ORIENTED
PHP
15268496.235.png 15268496.246.png 15268496.257.png 15268496.268.png 15268496.001.png 15268496.012.png 15268496.023.png 15268496.034.png 15268496.045.png 15268496.056.png 15268496.067.png 15268496.078.png 15268496.089.png 15268496.100.png 15268496.111.png 15268496.121.png 15268496.132.png 15268496.143.png 15268496.153.png 15268496.164.png 15268496.174.png 15268496.185.png 15268496.196.png 15268496.204.png 15268496.205.png 15268496.206.png 15268496.207.png 15268496.208.png 15268496.209.png 15268496.210.png 15268496.211.png 15268496.212.png 15268496.213.png 15268496.214.png 15268496.215.png 15268496.216.png 15268496.217.png 15268496.218.png 15268496.219.png 15268496.220.png 15268496.221.png 15268496.222.png 15268496.223.png 15268496.224.png 15268496.225.png 15268496.226.png 15268496.227.png 15268496.228.png 15268496.229.png 15268496.230.png 15268496.231.png 15268496.232.png 15268496.233.png 15268496.234.png 15268496.236.png 15268496.237.png 15268496.238.png 15268496.239.png 15268496.240.png 15268496.241.png 15268496.242.png 15268496.243.png 15268496.244.png 15268496.245.png 15268496.247.png 15268496.248.png 15268496.249.png 15268496.250.png 15268496.251.png 15268496.252.png 15268496.253.png 15268496.254.png 15268496.255.png 15268496.256.png 15268496.258.png 15268496.259.png 15268496.260.png 15268496.261.png 15268496.262.png 15268496.263.png 15268496.264.png 15268496.265.png 15268496.266.png 15268496.267.png 15268496.269.png 15268496.270.png 15268496.271.png 15268496.272.png 15268496.273.png 15268496.274.png 15268496.275.png 15268496.276.png 15268496.277.png 15268496.278.png 15268496.002.png 15268496.003.png 15268496.004.png 15268496.005.png 15268496.006.png 15268496.007.png 15268496.008.png 15268496.009.png 15268496.010.png 15268496.011.png 15268496.013.png 15268496.014.png 15268496.015.png 15268496.016.png 15268496.017.png 15268496.018.png 15268496.019.png 15268496.020.png 15268496.021.png 15268496.022.png 15268496.024.png 15268496.025.png 15268496.026.png 15268496.027.png 15268496.028.png 15268496.029.png 15268496.030.png 15268496.031.png 15268496.032.png 15268496.033.png 15268496.035.png 15268496.036.png 15268496.037.png 15268496.038.png 15268496.039.png 15268496.040.png 15268496.041.png 15268496.042.png 15268496.043.png 15268496.044.png 15268496.046.png 15268496.047.png 15268496.048.png 15268496.049.png 15268496.050.png 15268496.051.png 15268496.052.png 15268496.053.png 15268496.054.png 15268496.055.png 15268496.057.png 15268496.058.png 15268496.059.png 15268496.060.png 15268496.061.png 15268496.062.png 15268496.063.png 15268496.064.png 15268496.065.png 15268496.066.png 15268496.068.png 15268496.069.png 15268496.070.png 15268496.071.png 15268496.072.png 15268496.073.png 15268496.074.png 15268496.075.png 15268496.076.png 15268496.077.png 15268496.079.png 15268496.080.png 15268496.081.png 15268496.082.png
15268496.083.png 15268496.084.png 15268496.085.png 15268496.086.png 15268496.087.png 15268496.088.png 15268496.090.png 15268496.091.png 15268496.092.png 15268496.093.png 15268496.094.png 15268496.095.png 15268496.096.png 15268496.097.png 15268496.098.png 15268496.099.png 15268496.101.png 15268496.102.png 15268496.103.png 15268496.104.png 15268496.105.png 15268496.106.png 15268496.107.png 15268496.108.png 15268496.109.png 15268496.110.png 15268496.112.png
 
OBJECT-ORIENTED
PHP
Concepts, Techniques,
and Code
by Peter Lavin
®
San Francisco
15268496.113.png 15268496.114.png 15268496.115.png 15268496.116.png 15268496.117.png 15268496.118.png 15268496.119.png 15268496.120.png 15268496.122.png 15268496.123.png 15268496.124.png 15268496.125.png 15268496.126.png 15268496.127.png 15268496.128.png 15268496.129.png 15268496.130.png 15268496.131.png 15268496.133.png 15268496.134.png 15268496.135.png 15268496.136.png 15268496.137.png 15268496.138.png 15268496.139.png 15268496.140.png 15268496.141.png 15268496.142.png
 
OBJECT-ORIENTED PHP. Copyright © 2006 by Peter Lavin.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or
mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior
written permission of the copyright owner and the publisher.
Printed on recycled paper in the United States of America
1 2 3 4 5 6 7 8 9 10 – 09 08 07 06
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and
company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark
symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the
benefit of the trademark owner, with no intention of infringement of the trademark.
Publisher: William Pollock
Managing Editor: Elizabeth Campbell
Associate Production Editor: Christina Samuell
Cover and Interior Design: Octopod Studios
Developmental Editor: William Pollock
Technical Reviewer: Peter MacIntyre
Copyeditors: Publication Services, Inc. and Sarah Lemaire
Compositor: Riley Hoffman
Proofreader: Stephanie Provines
For information on book distributors or translations, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
555 De Haro Street, Suite 250, San Francisco, CA 94107
phone: 415.863.9900; fax: 415.863.9950; info@nostarch.com; www.nostarch.com
The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been
taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any
person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the
information contained in it.
Library of Congress Cataloging-in-Publication Data
Lavin, Peter.
Object-oriented PHP : concepts, techniques, and code / Peter Lavin.
p. cm.
Includes index.
ISBN 1-59327-077-1
1. PHP (Computer program language) 2. Object-oriented programming (Computer science) I. Title.
QA76.73.P224L38 2006
005.1'17--dc22
2006015309
15268496.144.png 15268496.145.png 15268496.146.png 15268496.147.png 15268496.148.png 15268496.149.png 15268496.150.png 15268496.151.png 15268496.152.png 15268496.154.png 15268496.155.png 15268496.156.png 15268496.157.png 15268496.158.png 15268496.159.png 15268496.160.png 15268496.161.png 15268496.162.png 15268496.163.png 15268496.165.png 15268496.166.png 15268496.167.png 15268496.168.png 15268496.169.png 15268496.170.png 15268496.171.png 15268496.172.png 15268496.173.png
 
BRIEF CONTENTS
Acknowledgments ........................................................................................................ xiii
Introduction ...................................................................................................................xv
Chapter 1: What a Tangled Web We Weave....................................................................1
Chapter 2: Basics of Object-Oriented Programming ............................................................5
Chapter 3: Object-Oriented Features New to PHP 5 ..........................................................11
Chapter 4: Show a Little Class ........................................................................................17
Chapter 5: Mod UR Class ..............................................................................................25
Chapter 6: The ThumbnailImage Class.............................................................................35
Chapter 7: Building the PageNavigator Class...................................................................47
Chapter 8: Using the PageNavigator Class ......................................................................57
Chapter 9: Database Classes .........................................................................................65
Chapter 10: Improvement Through Inheritance..................................................................75
Chapter 11: Advanced Object-Oriented Programming Concepts ........................................91
Chapter 12: Keeping It Fresh..........................................................................................99
Chapter 13: More Magic Methods................................................................................111
Chapter 14: Creating Documentation Using the Reflection Classes ....................................125
Chapter 15: Extending SQLite ......................................................................................139
Chapter 16: Using PDO...............................................................................................157
Appendix A: Setting Up PHP 5 .....................................................................................165
Appendix B: Conversion Table: PHP 4 and PHP 5...........................................................169
Glossary ....................................................................................................................173
Index .........................................................................................................................179
15268496.175.png 15268496.176.png 15268496.177.png 15268496.178.png 15268496.179.png 15268496.180.png 15268496.181.png 15268496.182.png 15268496.183.png 15268496.184.png 15268496.186.png 15268496.187.png 15268496.188.png 15268496.189.png 15268496.190.png 15268496.191.png 15268496.192.png 15268496.193.png 15268496.194.png 15268496.195.png 15268496.197.png 15268496.198.png 15268496.199.png 15268496.200.png 15268496.201.png 15268496.202.png 15268496.203.png
 
Zgłoś jeśli naruszono regulamin