Alex Tech Adventures The webs best tutorials!

Error
  • Could not match ripper response
    URL: http://www.blip.tv/file/2418019
    Response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--[if IE 8]> <html class="ie8" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]--> <!--[if gt IE 8]><!--> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> <!--<![endif]--> <head prefix="og: http://ogp.me/ns# bliptvviewer: http://ogp.me/ns/apps/bliptvviewer#"> <!--chartbeat timer--> <script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script> <meta name="fb_channel_url" value="http://a.blip.tv/channel.html" /> <script type="text/javascript" src="http://a.blip.tv/scripts/BLIP/DestinationAnalytics.f8549cc.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-713068-1']); _Analytics.addVariables({"analytics":[[1,"template","lite-episode","3"],[2,"series name","zendtutorials","3"],[3,"QR","0","3"]]}); _Analytics.setVariables(); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <!-- rss--> <link rel="alternate" type="application/rss+xml" title="RSS Feed for zf 9 zend_registry and auth improvement" href="/rss/flash/2438056" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/reset.f8549cc.css" media="screen" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/common.f8549cc.css" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/episodePage.f8549cc.css" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/playerControls.f8549cc.css" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/endcap.f8549cc.css" /> <!-- Meta Tags --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>zf 9 zend_registry and auth improvement | zendtutorials on Blip</title> <meta name="description" content="Find out about sharing variables across entire application using Zend_Registry whil improving our existing authentication mechanism by introducing a controlled variable for role which eliminates unpredictable null values."/> <meta name="keywords" content="zendtutorials"/> <meta name="keywords" content="zendtutorials blip"/> <!-- FB Open Graph Tags --> <meta property="fb:app_id" content="136482209767138"/> <meta property="og:type" content="bliptvviewer:web_series_episode"/> <meta property="og:title" content="zf 9 zend_registry and auth improvement - zendtutorials on Blip"/> <meta property="og:image" content="http://a.images.blip.tv/Tmth-zf9Zend_registryAndAuthImprovement322-463.jpg"/> <meta property="og:description" content="Find out about sharing variables across entire application using Zend_Registry whil improving our existing authentication mechanism by introducing a controlled variable for role which eliminates unpredictable null values."/> <meta property="og:locale" content="en_US"/> <!-- <meta property="bliptvviewer:series" content="zendtutorials"/> <meta property="bliptvviewer:release_date" content="1248926232"/> <meta property="bliptvviewer:duration" content="527"/> <meta property="bliptvviewer:category" content="How To"/> <meta property="bliptvviewer:show_page" content="http://blip.tv/zendtutorials"/> --> <meta property="og:url" content="http://blip.tv/zendtutorials/zf-9-zend_registry-and-auth-improvement-2438056"/> <meta property="og:site_name" content="Blip"/> <meta property="og:video" content="http://blip.tv/play/AYGU6AwD"/> <meta property="og:video:type" content="application/x-shockwave-flash"/> <meta property="og:video:secure_url" content="https://blip.tv/play/AYGU6AwD"/> <meta name="robots" content="all" /> <script type="text/javascript" src="http://a.blip.tv/scripts/BLIP/DestinationEpisode.f8549cc.js"></script> <script> var loaded = (new Date()).valueOf(); </script> </head> <body> <div id="Header" class="clearfix"> <div id="HeaderContents" class="clearfix"> <h1 class="Logo"> <a href="/" alt="Blip" title="Blip Home"> <span>Blip</span> </a> </h1> <div class="SearchAndNav"> <div class="Browse HoverDropDown"> <div class="BrowseButton HeaderCaption"> <div class="BrowseButtonShadow"></div> <a class="BrowseButtonLink"> <span>Browse</span> <span class="DropDownArrow Icon"></span> </a> </div> <div class="ChannelList clearfix"> <ul class="List"> <li><a href="/animation-and-comics-videos">Animation & Comics</a></li> <li><a href="/comedy-videos">Comedy</a></li> <li><a href="/drama-videos">Drama</a></li> <li><a href="/celebrity-entertainment-news-videos">Entertainment</a></li> <li><a href="/fashion-and-beauty-videos">Fashion & Beauty</a></li> <li><a href="/food-drink-and-travel-videos">Food & Drink</a></li> <li><a href="/health-and-fitness-videos">Health & Fitness</a></li> <li><a href="/home-and-family-videos">Home & Family</a></li> <li><a href="/diy-how-to-videos">How To</a></li> <li><a href="/education-documentary-videos">Learning</a></li> <li><a href="/music-videos">Music</a></li> <li><a href="/news-money-and-politics-videos">News & Politics</a></li> <li><a href="/sports-and-cars-videos">Sports & Cars</a></li> <li><a href="/talk-and-interview-shows-videos">Talk & Interview</a></li> <li><a href="/apps-tech-and-gadgets-videos">Tech & Gadgets</a></li> <li><a href="/videogames-videos">Videogames</a></li> </ul> </div> </div> <form class="SearchHeader clearfix" method="get" action="/search"> <span class="Icon SearchIcon"></span> <input type="text" name="q" class="SearchTerms" autocomplete="off"/> </form> <div class="Subscriptions"> <a class="FacebookLoginButton" id="FacebookLoginButton" title="Log in with Facebook"> </a> <span class="Indicator"></span> <a class="LearnAboutSubscriptions" href="/subscriptions/start-subscribing"> About subscriptions </a> </div> </div> </div> </div> <div id="PageInfo" data-posts-id="2438056" data-users-id="418265" data-ad-sales-categories="Tech,Screencast" data-core-value="0" data-admin-rating="1" data-lock="0" style="display:none !important;"></div> <div class="EpisodeLite" id="Content"> <div id="TheaterLiteContainer" class="clearfix"> <div id="TheaterLite" class="clearfix"> <h2> zf 9 zend_registry and auth improvement </h2> <h3> <a href="/zendtutorials"> zendtutorials </a> </h3> <div class="clearfix"></div> <div class="VideoPlayer clearfix"> <div class="EpisodeList"> <h3>Best of Blip</h3> <div class="EpisodeListContents" style="overflow: hidden;"> <ul class="Scrollable"> <li data-episode-uri="/madbunny/malice-episode_01-5915783" class="clearfix"> <a class="EpisodeThumbnail" href="/madbunny/malice-episode_01-5915783"> <img src="http://2.i.blip.tv/g?src=Madbunny-Episode_01789-585.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/madbunny/malice-episode_01-5915783"> MALICE Episode_01 </a> </h4> <span class="From"> from </span> <a href="/madbunny">MALICE: The webseries</a> </div> </li> <li data-episode-uri="/madbunny/malice-episode_02-5915916" class="clearfix"> <a class="EpisodeThumbnail" href="/madbunny/malice-episode_02-5915916"> <img src="http://0.i.blip.tv/g?src=Madbunny-Episode_02255-629.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/madbunny/malice-episode_02-5915916"> MALICE Episode_02 </a> </h4> <span class="From"> from </span> <a href="/madbunny">MALICE: The webseries</a> </div> </li> <li data-episode-uri="/madbunny/malice_episode_03-5915977" class="clearfix"> <a class="EpisodeThumbnail" href="/madbunny/malice_episode_03-5915977"> <img src="http://5.i.blip.tv/g?src=Madbunny-MALICE_Episode_03848.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/madbunny/malice_episode_03-5915977"> MALICE_Episode_03 </a> </h4> <span class="From"> from </span> <a href="/madbunny">MALICE: The webseries</a> </div> </li> <li data-episode-uri="/brentalfloss/mega-man-3-game-over-with-lyrics-5697120" class="clearfix"> <a class="EpisodeThumbnail" href="/brentalfloss/mega-man-3-game-over-with-lyrics-5697120"> <img src="http://8.i.blip.tv/g?src=Brentalfloss-66025709.png&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/brentalfloss/mega-man-3-game-over-with-lyrics-5697120"> Mega Man 3 Game Over WITH LYRICS </a> </h4> <span class="From"> from </span> <a href="/brentalfloss">brentalfloss</a> </div> </li> <li data-episode-uri="/redlettermedia/star-wars-episode-1-the-phantom-menace-review-3814393" class="clearfix"> <a class="EpisodeThumbnail" href="/redlettermedia/star-wars-episode-1-the-phantom-menace-review-3814393"> <img src="http://6.i.blip.tv/g?src=Redlettermedia-StarWarsEpisode1ThePhantomMenaceReview980.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/redlettermedia/star-wars-episode-1-the-phantom-menace-review-3814393"> Star Wars Episode 1 The Phantom Menace Review </a> </h4> <span class="From"> from </span> <a href="/redlettermedia">RedLetterMedia</a> </div> </li> <li data-episode-uri="/fashiontv/naory-beachwear-sexy-bikini-bathing-suit-photoshoot-ftv-5920458" class="clearfix"> <a class="EpisodeThumbnail" href="/fashiontv/naory-beachwear-sexy-bikini-bathing-suit-photoshoot-ftv-5920458"> <img src="http://3.i.blip.tv/g?src=Fashiontv-NaoryBeachwearSexyBikiniBathingSuitPhotoshootFTV165-746.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/fashiontv/naory-beachwear-sexy-bikini-bathing-suit-photoshoot-ftv-5920458"> Naory Beachwear: Sexy Bikini & Bathing Suit Photoshoot | FTV </a> </h4> <span class="From"> from </span> <a href="/fashiontv">Fashion TV</a> </div> </li> <li data-episode-uri="/realwineshow/pinot-grigio-real-wine-episode-8-5919017" class="clearfix"> <a class="EpisodeThumbnail" href="/realwineshow/pinot-grigio-real-wine-episode-8-5919017"> <img src="http://8.i.blip.tv/g?src=Realwineshow-PinotGrigioRealWineEpisode8621.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/realwineshow/pinot-grigio-real-wine-episode-8-5919017"> Pinot Grigio - "Real Wine" Episode 8 </a> </h4> <span class="From"> from </span> <a href="/realwineshow">Real Wine</a> </div> </li> <li data-episode-uri="/profootballweekly/no-pressure-5934100" class="clearfix"> <a class="EpisodeThumbnail" href="/profootballweekly/no-pressure-5934100"> <img src="http://3.i.blip.tv/g?src=Profootballweekly-NoPressure553-547.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/profootballweekly/no-pressure-5934100"> No Pressure </a> </h4> <span class="From"> from </span> <a href="/profootballweekly">Pro Football Weekly</a> </div> </li> <li data-episode-uri="/seriousbusinessonbtr/ball-of-flame-shoot-fire-serious-business-on-btr-ep61-5929964" class="clearfix"> <a class="EpisodeThumbnail" href="/seriousbusinessonbtr/ball-of-flame-shoot-fire-serious-business-on-btr-ep61-5929964"> <img src="http://3.i.blip.tv/g?src=Seriousbusinessonbtr-25441204.png&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/seriousbusinessonbtr/ball-of-flame-shoot-fire-serious-business-on-btr-ep61-5929964"> Ball Of Flame Shoot Fire - Serious Business on BTR [ep61] </a> </h4> <span class="From"> from </span> <a href="/seriousbusinessonbtr">Serious Business on BTR</a> </div> </li> <li data-episode-uri="/the-louise-log/how-to-cope-with-war-on-a-video-set-the-louise-log-29-5927528" class="clearfix"> <a class="EpisodeThumbnail" href="/the-louise-log/how-to-cope-with-war-on-a-video-set-the-louise-log-29-5927528"> <img src="http://4.i.blip.tv/g?src=Anneflournoy-HowToCopeWithWarOnAVideoSetTheLouiseLog29615.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/the-louise-log/how-to-cope-with-war-on-a-video-set-the-louise-log-29-5927528"> How To Cope With War On A Video Set: The Louise Log #29 </a> </h4> <span class="From"> from </span> <a href="/the-louise-log">THE LOUISE LOG</a> </div> </li> <li data-episode-uri="/vampiremob/vampire-mob-episode-three-of-six-season-one-4063885" class="clearfix"> <a class="EpisodeThumbnail" href="/vampiremob/vampire-mob-episode-three-of-six-season-one-4063885"> <img src="http://0.i.blip.tv/g?src=VampireMob-VampireMobEpisodeThree665.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/vampiremob/vampire-mob-episode-three-of-six-season-one-4063885"> Vampire Mob Episode Three of Six (Season One) </a> </h4> <span class="From"> from </span> <a href="/vampiremob">Vampire Mob</a> </div> </li> <li data-episode-uri="/goodmythicalmorning/i-wear-women-s-deodorant-5921692" class="clearfix"> <a class="EpisodeThumbnail" href="/goodmythicalmorning/i-wear-women-s-deodorant-5921692"> <img src="http://5.i.blip.tv/g?src=GoodMythicalMorning-IWearWomensDeodorant899.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/goodmythicalmorning/i-wear-women-s-deodorant-5921692"> I Wear Women&#39s Deodorant </a> </h4> <span class="From"> from </span> <a href="/goodmythicalmorning">Good Mythical Morning</a> </div> </li> </ul> </div> </div> <div id="PlayerEmbed"> <div id="EmbedTarget"></div> <script> (function() { var embedder = new BLIP.Embedder.Embedder({ postsID : "2438056", swfLocation : "http://a.blip.tv/scripts/flash/stratos.swf", shoggLocation: "http://a.blip.tv/scripts/ShoggPlayer-min.js", siteURL : "http://blip.tv", width : "620", height : "350", target: 'PlayerEmbed', useShogg: true }); embedder.embed(); })(); </script> </div> <div class="EpisodeEndcapLite" data-src="/episode/get_endcap?users_id=418265&posts_id=2438056&no_wrap=1&esi=1&lite=1"></div> </div> </div> </div> <div id="SocialMediaSection" class="clearfix"> <ul> <li class="Share"><a rel="modal" data-modal-href="/episode/get_share_actions/2438056?no_wrap=1"> <span class="Icon ShareIcon"></span> Share </a></li> <li class="Comment"> <a> <span class="CommentCallout"> <span class="Icon CommentIcon"></span> <span class="CommentCount"></span> Comments </span> <span class="SampleComment"> <span class="Icon SampleCommentNub"></span> <span class="SampleCommentText"> </span> </span> </a> </li> <li class="Facebook"> <div class="FacebookLikeBox FacebookEpisodeLike" data-action="ep-facebook-like"> <fb:like class="" href="" send="false" width="300" height="35" show_faces="false" font="lucida grande" show_faces="false"></fb:like> </div> </li> </ul> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> <div class="Comments" id="disqus_thread" data-disqus-id="2438056" data-disqus-shortname="bliptv" data-disqus-developer="0"></div> <hr/> <!-- End Disqus Integration --> <div id="EpisodeDescriptionLite" class="clearfix"> <a class="ShowPoster" href="/zendtutorials"> <img src="http://a.blip.tv/skin/smooth/images/poster-none-available.png" /> </a> <div class="About"> <h2>About this episode</h2> <span class="ContentRating">TV-UN</span> <p> Find out about sharing variables across entire application using Zend_Registry whil improving our existing authentication mechanism by introducing a controlled variable for role which eliminates unpredictable null values. </p> <ul class="MetaDataPairs clearfix"> <li class="Channel"> <h3>Category</h3> <strong> <a href="/diy-how-to-videos">How To</a> </strong> <strong> <a href="/apps-tech-and-gadgets-videos">Tech & Gadgets</a> </strong> </li> <li> <h3>Release Date</h3> <h6>Jul 29, 2009</h6> </li> <li> <h3>Runtime</h3> <h6>08:47</h6> </li> </ul> </div> <div class="Advertisement"> <script src="http://31a2.v.fwmrm.net/ad/g/1?nw=10274&pvrn=12345&csid=diy-how-to-videos&resp=ad;pagetype=episode&showname=zendtutorials&postsId=2438056;slau=300x250_destination_display&ptgt=s&envp=g_js&slid=fw_showAdBlock&w=300&h=250" language="javascript"> </script> </div> </div> <div class="ConditionalScroll" data-url="/show/get_recommended_shows?users_id=418265&no_wrap=1&esi=1"></div> <div id="CommentLink"> <hr/> <a href="#SocialMediaSection"> <span class="Icon CommentIcon"></span> Have something to say? <strong>Comment on this video</strong> </a> </div> <hr/> </div> <div id="FooterWrap"> <ul id="Footer" class="clearfix"> <li class="Links"> <h5>Useful links</h5> <a href="/about">About Blip</a> <a href="http://theblog.blip.tv">Blog</a> <a href="/people">People</a> <a href="/contact">Contact</a> <a href="/principles">Principles</a> <a href="/careers">Careers</a> <a href="/advertise">Advertisers</a> <a href="http://press.blip.tv/">Press</a> <a href="/developers">Developers</a> <a href="/copyright">Copyright</a> <a href="/privacy">Privacy Policy</a> <a href="/terms">Terms of Use</a> </li> <li class="Producers"> <h5>For Producers</h5> <span>Want to create an awesome original web series on Blip?</span> <div class="ProducerButtons"> <a class="ProducerSignupFooter MinimalButton Highlight" href="/users/create">Join</a> <a class="ProducerTourFooter MinimalButton" href="/tour">Take a tour</a> </div> <span>If you're already producing an original series, login to access your dashboard.</span> <div class="ProducerButtons"> <a class="ProducerLoginFooter MinimalButton" href="/users/login">Log in</a> </div> </li> <li class="TwitterFooter"> <h5><span class="Icon TwitterIcon"></span>Blip on twitter</h5> <div class="TwitterFeed" data-twitter-name="bliptv"> <ul class="Feed"></ul> </div> <a href="http://twitter.com/bliptv">Follow Blip on Twitter</a> </li> <li class="FacebookFooter"> <h5><span class="Icon FacebookIcon"></span>Blip on Facebook</h5> <div class="FooterFacebookMessage clearfix"> <div class="FooterFacebookLikeButton"> <fb:like href="http://facebook.com/blip" layout="box_count" show_faces="false" width="50" font=""></fb:like> </div> If you like your original series spoon-fed, "Like" Blip for episode releases, industry news and behind-the-scenes footage. </div> <a href="http://facebook.com/blip">Follow Blip on Facebook</a> </li> </ul> <div id="FooterCopyright">Discover the best in original web series.<span class="Copyright">&copy; 2012 Blip Networks, Inc. All Rights Reserved.</span></div> </div> <script type="text/javascript"> setTimeout(function(){var a=document.createElement("script"); var b=document.getElementsByTagName('script')[0]; a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/8003.js"; a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 100); </script> <script type="text/javascript"> /* this is pretty weird, and there's probably a better way to do it. #TODO fix and delete! document.write, bad. var browserVersion = navigator.appVersion; if(browserVersion.substring(5,11)=="iPhone"){ document.write("<div id=\"Navigation\">"); document.write("<a href=\"http://blip.tv/?skin=iphone\" class=\"LastLink\">Blip Mobile Site</a>"); document.write("</div>"); document.write("<div class=\"Clear\"></div>"); } */ </script> <!-- Begin comScore Tag --> <script> var _comscore = _comscore || []; _comscore.push({ c1: "2", c2: "6708843" }); (function() { var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true; s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js"; el.parentNode.insertBefore(s, el); })(); </script> <noscript> <img src="http://b.scorecardresearch.com/p?c1=2&c2=6708843&cv=2.0&cj=1" /> </noscript> <!-- End comScore Tag --> <!-- Start Quantcast tag --> <script type="text/javascript"> _qoptions={ qacct:"p-74vRiZ03u2gFw" }; </script> <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script> <noscript> <img src="http://pixel.quantserve.com/pixel/p-74vRiZ03u2gFw.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/> </noscript> <!-- End Quantcast tag --> <script type="text/javascript"> var _sf_async_config={uid:15601,domain:"blip.tv"}; (function(){ function loadChartbeat() { window._sf_endpt=(new Date()).getTime(); var e = document.createElement('script'); e.setAttribute('language', 'javascript'); e.setAttribute('type', 'text/javascript'); e.setAttribute('src', (("https:" == document.location.protocol) ? "https://s3.amazonaws.com/" : "http://") + "static.chartbeat.com/js/chartbeat.js"); document.body.appendChild(e); } var oldonload = window.onload; window.onload = (typeof window.onload != 'function') ? loadChartbeat : function() { oldonload(); loadChartbeat(); }; })(); </script> <div id="SubscribeLoginModal" style="display:none;"> <div class="Shade"></div> <div class="Content"> <div class="Note"> We keep track of your subscriptions through your Facebook account. No additional registration required.<br/> Nothing will be posted to Facebook without your explicit permission. </div> </div> </div> </body> </html>
    Regex: setPostsId\s*\(\s*(\d+)\s*\)

Zend_Registry and authentication improvement

(0 votes, average 0 out of 5)

In tutorials 5 and 6 i made an assumption that if zend_auth object is null then user is a guest, i.e. not logged in. This is fine for small applications. It also raises PHP notice message. For those who do not want any messages or need more refined controlled over guest permissions there is a need to have a proper role created for guest. So we take advantage of Zend_Registry and create a global variable for role that takes Zend_Auth’s role variable if user is logged in or default variable value ‘guest’ if otherwise.

View the episode

Download source

P.S. I had a real hard time uploading this video and I am still not sure if it came out correctly. It suppose to be 48 minutes long. Please report if its broken.

P.P.S By request, here’s the SQL for the database. Its very small so i’ll just include it here:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
-- phpMyAdmin SQL Dump
-- version 3.2.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 14, 2009 at 11:42 AM
-- Server version: 5.1.37
-- PHP Version: 5.2.10
 
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Database: `zftutorial`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `books`
--
 
CREATE TABLE IF NOT EXISTS `books` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `author` varchar(100) COLLATE latin1_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5 ;
 
--
-- Dumping data for table `books`
--
 
INSERT INTO `books` (`id`, `title`, `author`) VALUES
(1, 'Core PHP Programming', 'Leon Atkinson'),
(2, 'Programming in Python 3', 'Mark Summerfield '),
(3, 'Core Java', 'Cay S. Horstmann and Gary Cornell'),
(4, 'AJAX and PHP: Building Responsive Web Applications', 'Bogdan Brinzarea, Cristian Darie, Filip Chereches-Tosa, Mihai Bucica ');
 
-- --------------------------------------------------------
 
--
-- Table structure for table `users`
--
 
CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `password` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `role` varchar(50) COLLATE latin1_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;
 
--
-- Dumping data for table `users`
--
 
INSERT INTO `users` (`id`, `username`, `password`, `role`) VALUES
(1, 'john', 'pass1', 'users'),
(2, 'rob', 'pass2', 'admins');
 

 

 

Last Updated ( Friday, 21 August 2009 19:33 )  
You need to login or register to post comments.
Discuss...
You are here: Home Development Zend Framework Zend_Registry and authentication improvement

Statistics

Members : 1401
Content : 42
Web Links : 1
Content View Hits : 191194

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 35 guests online