SlideShare ist ein Scribd-Unternehmen logo
1 von 56
What's New in ZF 1.10? Ralph Schindler Zend Framework Software Engineer
In a Nutshell ,[object Object],[object Object],[object Object],[object Object]
Improvements Building incrementally
Improvements ,[object Object],Insert->Header & Footer
Improvements ,[object Object],Insert->Header & Footer
Improvements ,[object Object],Insert->Header & Footer
Improvements ,[object Object],Insert->Header & Footer
Improvements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
Improvements ,[object Object],[object Object],[object Object],Insert->Header & Footer
Improvements ,[object Object],Insert->Header & Footer
Improvements ,[object Object],Insert->Header & Footer
Improvements ,[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
Improvements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
Improvements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
Improvements
Improvements
Improvements
New Components Extending an already extensible and extensive framework
Zend_Barcode ,[object Object],[object Object]
$renderer  = Zend_Barcode::factory( 'code39' ,   // barcode type 'image' ,   // image or PDF array (   // barcode options 'text'   =>   'ZENDFRAMEWORK' , ), array (   // renderer options 'imageType'   =>   'png' , ) ); $image   =   $renderer ->draw(); imagepng ( $image ,   __DIR__ .   '/barcode.png' );
$validator  = new    Zend_Validate_Barcode( 'CODE39' ); if   ( $validator ->isValid( $input )) { // valid barcode text }   else   { // invalid barcode text }
Zend_Cache ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RewriteCond %{DOCUMENT_ROOT}/cached/%   {REQUEST_URI}.html -f RewriteRule .* cached/%{REQUEST_URI}.%1 [L]
$options  =  array ( 'public_dir'   =>     APPLICATION_PATH .   '/../public/cache' , ); // Where $manager is a Zend_Cache_Manager instance $manager ->setTemplateOptions( 'page' ,   $options ); $cache   =   $manager ->getCache( 'page' ); // In an action controller: public   function   preDispatch() { $this ->_helper->cache( // cache these actions: array ( 'foo' ,   'bar' ,   'baz' ), // use these tags: array ( $this ->_request->getControllerName()), // with this extension: 'html' ); }
$manager  = new Zend_Cache_Manager; $dbCache   =   array ( 'frontend'   =>   array ( 'name'   =>   'Core' , 'options'   =>   array ( 'lifetime'   =>   3600, 'automatic_serialization'   =>   true, ) ), 'backend'   =>   array ( 'name'   =>   'Core' , 'options'   =>   array ( 'cache_dir'   =>     APPLICATION_PATH .   '/../data/cache/db' , ), ), ); $manager ->setCacheTemplate( 'db' ,   $dbCache ); $cache   =   $manager ->getCache( 'db' );
Zend_Feed_Writer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
$feed  = new Zend_Feed_Writer_Feed; $feed ->setTitle( 'ZF Webinars' ) ->setLink(   'http://framework.zend.com/webinars/atom' ,     'atom' ) ->addAuthor( array ( 'name'   =>   'ZF DevTeam' , 'email'   =>   'fw-general@lists.zend.com' , 'uri'   =>   'http://framework.zend.com/' , )) ->setDateModified( strtotime (   '2010-03-17 12:00:00' ));
$entry  =  $feed ->createEntry(); $entry ->setLink(   'http://framework.zend.com/webinars/2010-03-17' ) ->addAuthor( array ( 'name'   =>   'Ralph Schindler' , 'email'   =>   'ralph.schindler@zend.com' , 'uri'   =>   'http://framework.zend.com/' , )) ->setDateModified( strtotime (   '2010-03-17 12:00:00' )) ->setDateCreated( strtotime (   '2010-03-15 08:39:00' )); $output   =   $feed ->export( 'atom' );
Zend_Feed_Pubsubhubbub ,[object Object],[object Object],[object Object],[object Object]
$publisher  = new Zend_Feed_Pubsubhubbub_Publisher; $publisher ->addHubUrls( array ( 'http://pubsubhubbub.appspot.com/' , 'http://wordpress.org/extend/plugins/pushpress/' , )) ->addUpdatedTopicUrls( array ( 'http://framework.zend.com/webinars/atom' , )); // Notify $publisher ->notifyAll();
$storage  = new Zend_Feed_Pubsubhubbub_Model_Subscription; $subscriber   =   new Zend_Feed_Pubsubhubbub_Subscriber; $subscriber ->setStorage( $storage ) ->addHubUrl(   'http://pubsubhubbub.appspot.com/' ) ->setTopicUrl(   'http://framework.zend.com/webinars/atom' ) ->setCallbackUrl(   'http://www.mydomain.com/hubbub/callback' ) ->subscribeAll();
$callback  = new   Zend_Feed_Pubsubhubbub_Subscriber_Callback; $callback ->setStorage( $storage ); $callback ->handle(); $callback ->sendResponse(); if   ( $callback ->hasFeedUpdate()) { $feedString   =   $callback ->getFedUpdate(); // start processing! }
Zend_Markup ,[object Object],[object Object],[object Object],[object Object],$bbcode  = Zend_Markup::factory( 'Bbcode' ); echo   $bbcode ->render( $someBbCodeMarkup ); $textile   =   Zend_Markup::factory( 'Textile' ); echo   $textile ->render( $someTextileMarkup );
Zend_Oauth ,[object Object]
$config  =  array ( 'callbackUrl'   =>   'http://example.com/callback' , 'siteUrl'   =>   'http://twitter.com/oauth' , 'consumerKey'   =>   'gg3DsFTW9OU9eWPnbuPzQ' , 'consumerSecret'   =>   'tFB0fyWLSMf74lkEu9FTyoHXcazOWpbrAjTCCK48A' ); $consumer   =   new   Zend_Oauth_Consumer( $config ); // Get request token: $token   =   $consumer ->getRequestToken(); // Persist the token $session   =   new   Zend_Session_Namespace( 'oauth' ); $session ->token   =   serialize ( $token ); // Redirect to oauth provider $consumer ->redirect();
// Within a controller action, assuming consumer // and session setup above $request   =   $this ->getRequest(); if   (! $request ->isGet() || !isset( $session ->token) ) { // error condition! } $token   =   $consumer ->getAccessToken( $request ->getQuery(), unserialize ( $session ->token) ); // use the token! $client   =   $token ->getHttpClient(); // ...
Zend_Serializer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
$serializer  = Zend_Serializer::factory( 'Json' ); $serialized   =   $serializer -> serialize ( $data ); $unserialized   =   $serializer -> unserialize ( $serialized );
New Services Extending your reach into the cloud
New Service - LiveDocx ,[object Object],[object Object],Insert->Header & Footer
New Service - LiveDocx Insert->Header & Footer
New Service - LiveDocx Insert->Header & Footer
New Service - LiveDocx ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
New Service - DeveloperGarden ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
New Service - DeveloperGarden ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
New Service - DeveloperGarden ,[object Object],Insert->Header & Footer
New Service - WindowsAzure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Insert->Header & Footer
New Service – WindowsAzure Insert->Header & Footer
Documentation updates Helping you educate yourself
Versioned Documentation ,[object Object],[object Object]
New Rendering Engine ,[object Object],[object Object],[object Object]
Tutorials ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Migration Notes ,[object Object],[object Object]
Commenting ,[object Object]
Thank you! ,[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

P H P Part I I, By Kian
P H P  Part  I I,  By  KianP H P  Part  I I,  By  Kian
P H P Part I I, By Kian
phelios
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of Smartmatch
Andrew Shitov
 
Exploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsExploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your plugins
Marian Marinov
 
Xslate sv perl-2013-7-11
Xslate sv perl-2013-7-11Xslate sv perl-2013-7-11
Xslate sv perl-2013-7-11
Goro Fuji
 
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
Sebastian Marek
 

Was ist angesagt? (20)

LPW: Beginners Perl
LPW: Beginners PerlLPW: Beginners Perl
LPW: Beginners Perl
 
Smarty
SmartySmarty
Smarty
 
Introduction to Perl Best Practices
Introduction to Perl Best PracticesIntroduction to Perl Best Practices
Introduction to Perl Best Practices
 
P H P Part I I, By Kian
P H P  Part  I I,  By  KianP H P  Part  I I,  By  Kian
P H P Part I I, By Kian
 
Ant
Ant Ant
Ant
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter Scott
 
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
 
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationGood practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
 
Into to DBI with DBD::Oracle
Into to DBI with DBD::OracleInto to DBI with DBD::Oracle
Into to DBI with DBD::Oracle
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of Smartmatch
 
Exploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsExploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your plugins
 
RESTFul IDEAS
RESTFul IDEASRESTFul IDEAS
RESTFul IDEAS
 
HTML Templates Using Clear Silver
HTML Templates Using Clear SilverHTML Templates Using Clear Silver
HTML Templates Using Clear Silver
 
Php
PhpPhp
Php
 
Xslate sv perl-2013-7-11
Xslate sv perl-2013-7-11Xslate sv perl-2013-7-11
Xslate sv perl-2013-7-11
 
Perl6 in-production
Perl6 in-productionPerl6 in-production
Perl6 in-production
 
Ods Markup And Tagsets: A Tutorial
Ods Markup And Tagsets: A TutorialOds Markup And Tagsets: A Tutorial
Ods Markup And Tagsets: A Tutorial
 
Back to basics - PHP_Codesniffer
Back to basics - PHP_CodesnifferBack to basics - PHP_Codesniffer
Back to basics - PHP_Codesniffer
 
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
 
Perl Teach-In (part 1)
Perl Teach-In (part 1)Perl Teach-In (part 1)
Perl Teach-In (part 1)
 

Ähnlich wie What's New in ZF 1.10

Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
Kiev ALT.NET
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
funkatron
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Atlassian
 

Ähnlich wie What's New in ZF 1.10 (20)

Framework
FrameworkFramework
Framework
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with Perl
 
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
 
SugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
SugarCon 2010 - Best Practices for Creating Custom Apps in SugarSugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
SugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
 
I Love codeigniter, You?
I Love codeigniter, You?I Love codeigniter, You?
I Love codeigniter, You?
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 
Zend framework 04 - forms
Zend framework 04 - formsZend framework 04 - forms
Zend framework 04 - forms
 
Advanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsAdvanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIs
 
Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and Python
 
Xenogenetics
XenogeneticsXenogenetics
Xenogenetics
 

Mehr von Ralph Schindler

Zend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View EnhancementsZend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View Enhancements
Ralph Schindler
 
Zend_Tool: Rapid Application Development with Zend Framework
Zend_Tool: Rapid Application Development with Zend FrameworkZend_Tool: Rapid Application Development with Zend Framework
Zend_Tool: Rapid Application Development with Zend Framework
Ralph Schindler
 

Mehr von Ralph Schindler (12)

Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
Zend Di in ZF 2.0
Zend Di in ZF 2.0Zend Di in ZF 2.0
Zend Di in ZF 2.0
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2
 
484 Days of PHP 5.3
484 Days of PHP 5.3484 Days of PHP 5.3
484 Days of PHP 5.3
 
Modeling best practices
Modeling best practicesModeling best practices
Modeling best practices
 
Extending ZF & Extending With ZF
Extending ZF & Extending With ZFExtending ZF & Extending With ZF
Extending ZF & Extending With ZF
 
Extending Zend_Tool
Extending Zend_ToolExtending Zend_Tool
Extending Zend_Tool
 
Zend_Tool In ZF 1.8 Webinar
Zend_Tool In ZF 1.8 WebinarZend_Tool In ZF 1.8 Webinar
Zend_Tool In ZF 1.8 Webinar
 
Zend Framework 1.8 Features Webinar
Zend Framework 1.8 Features WebinarZend Framework 1.8 Features Webinar
Zend Framework 1.8 Features Webinar
 
Software Engineering In PHP
Software Engineering In PHPSoftware Engineering In PHP
Software Engineering In PHP
 
Zend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View EnhancementsZend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View Enhancements
 
Zend_Tool: Rapid Application Development with Zend Framework
Zend_Tool: Rapid Application Development with Zend FrameworkZend_Tool: Rapid Application Development with Zend Framework
Zend_Tool: Rapid Application Development with Zend Framework
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

What's New in ZF 1.10

  • 1. What's New in ZF 1.10? Ralph Schindler Zend Framework Software Engineer
  • 2.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 18. New Components Extending an already extensible and extensive framework
  • 19.
  • 20. $renderer = Zend_Barcode::factory( 'code39' , // barcode type 'image' , // image or PDF array ( // barcode options 'text' => 'ZENDFRAMEWORK' , ), array ( // renderer options 'imageType' => 'png' , ) ); $image = $renderer ->draw(); imagepng ( $image , __DIR__ . '/barcode.png' );
  • 21. $validator = new Zend_Validate_Barcode( 'CODE39' ); if ( $validator ->isValid( $input )) { // valid barcode text } else { // invalid barcode text }
  • 22.
  • 23. RewriteCond %{DOCUMENT_ROOT}/cached/% {REQUEST_URI}.html -f RewriteRule .* cached/%{REQUEST_URI}.%1 [L]
  • 24. $options = array ( 'public_dir' => APPLICATION_PATH . '/../public/cache' , ); // Where $manager is a Zend_Cache_Manager instance $manager ->setTemplateOptions( 'page' , $options ); $cache = $manager ->getCache( 'page' ); // In an action controller: public function preDispatch() { $this ->_helper->cache( // cache these actions: array ( 'foo' , 'bar' , 'baz' ), // use these tags: array ( $this ->_request->getControllerName()), // with this extension: 'html' ); }
  • 25. $manager = new Zend_Cache_Manager; $dbCache = array ( 'frontend' => array ( 'name' => 'Core' , 'options' => array ( 'lifetime' => 3600, 'automatic_serialization' => true, ) ), 'backend' => array ( 'name' => 'Core' , 'options' => array ( 'cache_dir' => APPLICATION_PATH . '/../data/cache/db' , ), ), ); $manager ->setCacheTemplate( 'db' , $dbCache ); $cache = $manager ->getCache( 'db' );
  • 26.
  • 27. $feed = new Zend_Feed_Writer_Feed; $feed ->setTitle( 'ZF Webinars' ) ->setLink( 'http://framework.zend.com/webinars/atom' , 'atom' ) ->addAuthor( array ( 'name' => 'ZF DevTeam' , 'email' => 'fw-general@lists.zend.com' , 'uri' => 'http://framework.zend.com/' , )) ->setDateModified( strtotime ( '2010-03-17 12:00:00' ));
  • 28. $entry = $feed ->createEntry(); $entry ->setLink( 'http://framework.zend.com/webinars/2010-03-17' ) ->addAuthor( array ( 'name' => 'Ralph Schindler' , 'email' => 'ralph.schindler@zend.com' , 'uri' => 'http://framework.zend.com/' , )) ->setDateModified( strtotime ( '2010-03-17 12:00:00' )) ->setDateCreated( strtotime ( '2010-03-15 08:39:00' )); $output = $feed ->export( 'atom' );
  • 29.
  • 30. $publisher = new Zend_Feed_Pubsubhubbub_Publisher; $publisher ->addHubUrls( array ( 'http://pubsubhubbub.appspot.com/' , 'http://wordpress.org/extend/plugins/pushpress/' , )) ->addUpdatedTopicUrls( array ( 'http://framework.zend.com/webinars/atom' , )); // Notify $publisher ->notifyAll();
  • 31. $storage = new Zend_Feed_Pubsubhubbub_Model_Subscription; $subscriber = new Zend_Feed_Pubsubhubbub_Subscriber; $subscriber ->setStorage( $storage ) ->addHubUrl( 'http://pubsubhubbub.appspot.com/' ) ->setTopicUrl( 'http://framework.zend.com/webinars/atom' ) ->setCallbackUrl( 'http://www.mydomain.com/hubbub/callback' ) ->subscribeAll();
  • 32. $callback = new Zend_Feed_Pubsubhubbub_Subscriber_Callback; $callback ->setStorage( $storage ); $callback ->handle(); $callback ->sendResponse(); if ( $callback ->hasFeedUpdate()) { $feedString = $callback ->getFedUpdate(); // start processing! }
  • 33.
  • 34.
  • 35. $config = array ( 'callbackUrl' => 'http://example.com/callback' , 'siteUrl' => 'http://twitter.com/oauth' , 'consumerKey' => 'gg3DsFTW9OU9eWPnbuPzQ' , 'consumerSecret' => 'tFB0fyWLSMf74lkEu9FTyoHXcazOWpbrAjTCCK48A' ); $consumer = new Zend_Oauth_Consumer( $config ); // Get request token: $token = $consumer ->getRequestToken(); // Persist the token $session = new Zend_Session_Namespace( 'oauth' ); $session ->token = serialize ( $token ); // Redirect to oauth provider $consumer ->redirect();
  • 36. // Within a controller action, assuming consumer // and session setup above $request = $this ->getRequest(); if (! $request ->isGet() || !isset( $session ->token) ) { // error condition! } $token = $consumer ->getAccessToken( $request ->getQuery(), unserialize ( $session ->token) ); // use the token! $client = $token ->getHttpClient(); // ...
  • 37.
  • 38. $serializer = Zend_Serializer::factory( 'Json' ); $serialized = $serializer -> serialize ( $data ); $unserialized = $serializer -> unserialize ( $serialized );
  • 39. New Services Extending your reach into the cloud
  • 40.
  • 41. New Service - LiveDocx Insert->Header & Footer
  • 42. New Service - LiveDocx Insert->Header & Footer
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. New Service – WindowsAzure Insert->Header & Footer
  • 49. Documentation updates Helping you educate yourself
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.