Advanced OOPand Design PatternsStefan PriebschthePHP.ccCodeWorks 09 Copyright © 2009 thePHP.cc, GermanyPremium PHP Consulting & Training. Worldwide.Sebastian ArneStefanBergmannBlankertsPriebschWhy OOP?<?php header('Content-Type: text/html; charset=' .$GLOBALS['charset']); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">PHP<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang_iso_code; ?>" lang="<?php echo $lang_iso_code; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"><head><link rel="icon" href="./favicon.ico" type="image/x-icon" /><title>phpMyAdmin <?php echo PMA_VERSION; ?> -<?php echo htmlspecialchars($HTTP_HOST); ?></title><meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /><meta name="robots" content="noindex,nofollow" /><script type="text/javascript">window.onload = function() { if (onloadCnt == 0) { if (typeof(onLoadHandler) == "function") { onLoadHandler(); } };</script><script src="./js/common.js" type="text/javascript"></script></head><?php $query = "select `postId`,`filename`,`filesize`,`imgId` from SQL`tiki_blog_posts_images` where `postId`=?";$result = $this->query($query,array((int) $postId));$ret = array();while ($res = $result->fetchRow()) { $imgId = $res['imgId']; $res['link'] = "<img src='tiki-view_blog_post_image.php?imgId=$imgId' border='0' alt='image' />"; $parts = parse_url($_SERVER['REQUEST_URI']); $path = str_replace('tiki-blog_post.php', 'tiki-view_blog_post_image.php', $parts['path']); $res['absolute'] = $tikilib->httpPrefix(). $path . "?imgId=$imgId"; $ret[] = $res;} return $ret; } ?><?php if ($GLOBALS['text_dir'] === 'ltr') { ?><frame frameborder="0" id="frame_navigation" src="navigation.php<?php echo $url_query; ?>" name="frame_navigation" /><?php } ?><frame frameborder="0" id="frame_content" src="<?php echo $main_target; ?>" name="frame_content" /><?php if ($GLOBALS['text_dir'] === 'rtl') { ?>HTML<frame frameborder="0" id="frame_navigation" src="navigation.php<?php echo $url_query; ?>" name="frame_navigation" /><?php } ?><noframes><body><p><?php echo $GLOBALS['strNoFrames']; ?></p></body></noframes></frameset></html><?php header('Content-Type: text/html; charset=' .$GLOBALS['charset']); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">PHP<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang_iso_code; ?>" lang="<?php echo $lang_iso_code; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"><head><link rel="icon" href="./favicon.ico" type="image/x-icon" /><title>phpMyAdmin <?php echo PMA_VERSION; ?> -<?php echo htmlspecialchars($HTTP_HOST); ?></title><meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /><meta name="robots" content="noindex,nofollow" /><script type="text/javascript">window.onload = function() { if (onloadCnt == 0) { if (typeof(onLoadHandler) == "function") { onLoadHandler(); } };</script><script src="./js/common.js" type="text/javascript"></script></head><?php $query = "select `postId`,`filename`,`filesize`,`imgId` from SQL`tiki_blog_posts_images` where `postId`=?";$result = $this->query($query,array((int) $postId));$ret = array();while ($res = $result->fetchRow()) { $imgId = $res['imgId']; $res['link'] = "<img src='tiki-view_blog_post_image.php?imgId=$imgId' border='0' alt='image' />"; $parts = parse_url($_SERVER['REQUEST_URI']); $path = str_replace('tiki-blog_post.php', 'tiki-view_blog_post_image.php', $parts['path']); $res['absolute'] = $tikilib->httpPrefix(). $path . "?imgId=$imgId"; $ret[] = $res;} return $ret; } ?><?php if ($GLOBALS['text_dir'] === 'ltr') { ?><frame frameborder="0" id="frame_navigation" src="navigation.php<?php echo $url_query; ?>" name="frame_navigation" /><?php } ?><frame frameborder="0" id="frame_content" src="<?php echo $main_target; ?>" name="frame_content" /><?php if ($GLOBALS['text_dir'] === 'rtl') { ?>HTML<frame frameborder="0" id="frame_navigation" src="navigation.php<?php echo $url_query; ?>" name="frame_navigation" /><?php } ?><noframes><body><p><?php echo $GLOBALS['strNoFrames']; ?></p></body></noframes></frameset></html><?php header('Content-Type: text/html; charset=' .$GLOBALS['charset']); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">PHP<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang_iso_code; ?>" lang="<?php echo $lang_iso_code; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"><head><link rel="icon" href="./favicon.ico" type="image/x-icon" /><title>phpMyAdmin <?php echo PMA_VERSION; ?> -<?php echo htmlspecialchars($HTTP_HOST); ?></title><meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /><meta name="robots" content="noindex,nofollow" /><script type="text/javascript">window.onload = function() { if (onloadCnt == 0) { if (typeof(onLoadHandler) == "function") { onLoadHandler(); } };</script><script src="./js/common.js" type="text/javascript"></script></head><?php $query = "select `postId`,`filename`,`filesize`,`imgId` from SQL`tiki_blog_posts_images` where `postId`=?";$result = $this->query($query,array((int) $postId));$ret = array();while ($res = $result->fetchRow()) { $imgId = $res['imgId']; $res['link'] = "<img src='tiki-view_blog_post_image.php?imgId=$imgId' border='0' alt='image' />"; $parts = parse_url($_SERVER['REQUEST_URI']); $path = str_replace('tiki-blog_post.php', 'tiki-view_blog_post_image.php', $parts['path']); $res['absolute'] = $tikilib->httpPrefix(). $path . "?imgId=$imgId"; $ret[] = $res;} return $ret; } ?><?php if ($GLOBALS['text_dir'] === 'ltr') { ?><frame frameborder="0" id="frame_navigation" src="navigation.php<?php echo $url_query; ?>" name="frame_navigation" /><?php } ?><frame frameborder="0" id="frame_content" src="<?php echo $main_target; ?>" name="frame_content" /><?php if ($GLOBALS['text_dir'] === 'rtl') { ?>HTML<frame frameborder="0" id="frame_navigation" src="navigation.php<?php echo $url_query; ?>" name="frame_navigation" /><?php } ?><noframes><body><p><?php echo $GLOBALS['strNoFrames']; ?></p></body></noframes></frameset></html>PHPSQLHTMLPresentationLogicData AccessSeparation ofConcernsGood OOP starts before classescome into playDocument Outline
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
- ÿ
Add New Comment