SlideShare une entreprise Scribd logo
1  sur  17
Observer Design Pattern
Overview
Objective

Learn how to use the observer design pattern.

Requirements

 Basics of ProdigyView
Estimated Time

8 minutes




                     www.prodigyview.com
Follow Along With Code
           Example
1. Download a copy of the example code at
  www.prodigyview.com/source.

2. Install the system in an environment you feel
  comfortable testing in.

3. Proceed to examples/design/Observers.php
What Are Observers
Observers are a design pattern, most commonly used in
event driven programming, where an object has a list of
observers and the observers are notified of a state
change.

A simpler explanation would be when a function is
executed, a list of other functions is automatically
executed.
Observers Visual
MyObject::doSomething




  Method doSomething
executes. Notify observers
execution has taken place.




         Output
PVPatterns and
               PVStaticPatterns
The classes that contain the methods for using observers is the
PVPatterns and PVStaticPatterns classes.

PVPatterns is for instances and PVStaticPatterns is for static
methods.

Both PVObject and PVStaticObject extend the pattern classes.
Let's Begin
    In our example, we are going to pretend you want to
    integrate a function with social media. So lets start by
    making two social media classes. Keep note that in our
    example, one of our classes has a static method.
The argument passed from the method observed
Messenger Object
        Now we are going create a class that has the ability to
        send messages to objects that are observing this method.

                                                                  Extends PVObject
Implements the ability to call observers




The name of the event that observrs look for   Value passed to objects that are observing
Take Notice!
1. Our class extends PVObject. PVObject extends
  PVPatterns which has our methods needed to use the
  observer. The method that will notify other methods
  than an action has occurred is _notify().
2. The method notify has the parameter 'new_message'.
  This is the name of the event that is going to cause the
  notifications. After the event name, we can add as many
  parameters as we want but in this example we are only
  adding one, the message.
Round 1
The first test we are going to do is just sending a message
without adding an observer. So lets initialize the object
and send a message.
Result
The result here will be very simple.
Round 2
Now lets attach our observers. At minimum, the observer
requires 3 arguments. The first argument is the name of the
event. Our event name has to match to event name set in
the notifier, which is 'new_message'. The second argument
is the class to be called and the third is the method in the
class to be called when the event is executed The last is
options, namely for if our method is not static, apply the
'instance’ option here.

Code example on next slide =>
Attach the Observers
                                                        Call an instance of
Event Name    Class to call   Method in class to call   an object




Event Name    Class to call   Method in class to call
And the output….
Challenge!
Below is an optional challenge to perform that is designed to help you
gain a better understanding of the design pattern.

1. Look through ProdigyView’s source code and find the PVSession
    class.

2. Find the event name for either writing a session or writing a
    cookie.

3. Create a class that accepts the same parameters that the method
    in the Session class outputs.

4. Add that class as an observer to PVSession:writeCookie() or
    PVSession::writeMethod

5. Execute PVSession:writeCookie() or PVSession::writeMethod
    and print out the results in the class you created.
Summary
1. Add _notify to a function and set the event name. Add
  as many parameters as you need after the event name.
  Parameters will be passed to the functions that’s are
  listening.

2. Attach an observer with _addObserver. Make sure to
  specify the name of the event, the class and method the
  even will be calling.
API Reference
For a better understanding of the Collections and the
Iterator, check out the api at the two links below.

PVStaticPatterns

PVPatterns



                     More Tutorials
For more tutorials, please visit:
http://www.prodigyview.com/tutorials



                         www.prodigyview.com

Contenu connexe

En vedette

Design patterns
Design patternsDesign patterns
Design patternsISsoft
 
The Observer Pattern (Definition using UML)
The Observer Pattern (Definition using UML)The Observer Pattern (Definition using UML)
The Observer Pattern (Definition using UML)John Ortiz
 
Observer & singleton pattern
Observer  & singleton patternObserver  & singleton pattern
Observer & singleton patternbabak danyal
 
Observer Pattern Khali Young 2006 Aug
Observer Pattern Khali Young 2006 AugObserver Pattern Khali Young 2006 Aug
Observer Pattern Khali Young 2006 Augmelbournepatterns
 
Design patterns 4 - observer pattern
Design patterns   4 - observer patternDesign patterns   4 - observer pattern
Design patterns 4 - observer patternpixelblend
 
Design patterns: observer pattern
Design patterns: observer patternDesign patterns: observer pattern
Design patterns: observer patternJyaasa Technologies
 
Design Patterns in Cocoa Touch
Design Patterns in Cocoa TouchDesign Patterns in Cocoa Touch
Design Patterns in Cocoa TouchEliah Nikans
 
Reflective portfolio
Reflective portfolioReflective portfolio
Reflective portfoliojobbo1
 
Design Pattern - Observer Pattern
Design Pattern - Observer PatternDesign Pattern - Observer Pattern
Design Pattern - Observer PatternMudasir Qazi
 
Design pattern - Software Engineering
Design pattern - Software EngineeringDesign pattern - Software Engineering
Design pattern - Software EngineeringNadimozzaman Pappo
 
Observer and Decorator Pattern
Observer and Decorator PatternObserver and Decorator Pattern
Observer and Decorator PatternJonathan Simon
 
Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...
Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...
Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...Crishantha Nanayakkara
 
ICTA Technology Meetup 06 - Enterprise Application Design Patterns
ICTA Technology Meetup 06 - Enterprise Application Design PatternsICTA Technology Meetup 06 - Enterprise Application Design Patterns
ICTA Technology Meetup 06 - Enterprise Application Design PatternsCrishantha Nanayakkara
 
Object-oriented design patterns in UML [Software Modeling] [Computer Science...
Object-oriented design patterns  in UML [Software Modeling] [Computer Science...Object-oriented design patterns  in UML [Software Modeling] [Computer Science...
Object-oriented design patterns in UML [Software Modeling] [Computer Science...Ivano Malavolta
 

En vedette (20)

Design patterns
Design patternsDesign patterns
Design patterns
 
The Observer Pattern (Definition using UML)
The Observer Pattern (Definition using UML)The Observer Pattern (Definition using UML)
The Observer Pattern (Definition using UML)
 
Observer & singleton pattern
Observer  & singleton patternObserver  & singleton pattern
Observer & singleton pattern
 
Observer pattern
Observer patternObserver pattern
Observer pattern
 
Observer Pattern Khali Young 2006 Aug
Observer Pattern Khali Young 2006 AugObserver Pattern Khali Young 2006 Aug
Observer Pattern Khali Young 2006 Aug
 
Design patterns 4 - observer pattern
Design patterns   4 - observer patternDesign patterns   4 - observer pattern
Design patterns 4 - observer pattern
 
Design patterns: observer pattern
Design patterns: observer patternDesign patterns: observer pattern
Design patterns: observer pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Observer pattern
Observer patternObserver pattern
Observer pattern
 
Factory Pattern
Factory PatternFactory Pattern
Factory Pattern
 
Design Patterns in Cocoa Touch
Design Patterns in Cocoa TouchDesign Patterns in Cocoa Touch
Design Patterns in Cocoa Touch
 
Reflective portfolio
Reflective portfolioReflective portfolio
Reflective portfolio
 
Design Pattern - Observer Pattern
Design Pattern - Observer PatternDesign Pattern - Observer Pattern
Design Pattern - Observer Pattern
 
Design pattern - Software Engineering
Design pattern - Software EngineeringDesign pattern - Software Engineering
Design pattern - Software Engineering
 
Observer and Decorator Pattern
Observer and Decorator PatternObserver and Decorator Pattern
Observer and Decorator Pattern
 
Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...
Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...
Colombo Architecture Meetup - Enterprise Architectural Challenges in Large En...
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
ICTA Technology Meetup 06 - Enterprise Application Design Patterns
ICTA Technology Meetup 06 - Enterprise Application Design PatternsICTA Technology Meetup 06 - Enterprise Application Design Patterns
ICTA Technology Meetup 06 - Enterprise Application Design Patterns
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Object-oriented design patterns in UML [Software Modeling] [Computer Science...
Object-oriented design patterns  in UML [Software Modeling] [Computer Science...Object-oriented design patterns  in UML [Software Modeling] [Computer Science...
Object-oriented design patterns in UML [Software Modeling] [Computer Science...
 

Plus de ProdigyView

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-insProdigyView
 
Building An Application
Building An ApplicationBuilding An Application
Building An ApplicationProdigyView
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing ApplicationsProdigyView
 
Video Content Management
Video Content ManagementVideo Content Management
Video Content ManagementProdigyView
 
Audio Content Management
Audio Content ManagementAudio Content Management
Audio Content ManagementProdigyView
 
File Content Management
File Content ManagementFile Content Management
File Content ManagementProdigyView
 
Email Configuration
Email ConfigurationEmail Configuration
Email ConfigurationProdigyView
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialProdigyView
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags TutorialProdigyView
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHPProdigyView
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHPProdigyView
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyViewProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHPProdigyView
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPProdigyView
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web CacheProdigyView
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS LibrariesProdigyView
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements TutorialProdigyView
 

Plus de ProdigyView (20)

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-ins
 
Building An Application
Building An ApplicationBuilding An Application
Building An Application
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing Applications
 
Video Content Management
Video Content ManagementVideo Content Management
Video Content Management
 
Audio Content Management
Audio Content ManagementAudio Content Management
Audio Content Management
 
File Content Management
File Content ManagementFile Content Management
File Content Management
 
Email Configuration
Email ConfigurationEmail Configuration
Email Configuration
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHP
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHP
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 

Dernier

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Dernier (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

Tutorial On The Observer Design Pattern

  • 2. Overview Objective Learn how to use the observer design pattern. Requirements  Basics of ProdigyView Estimated Time 8 minutes www.prodigyview.com
  • 3. Follow Along With Code Example 1. Download a copy of the example code at www.prodigyview.com/source. 2. Install the system in an environment you feel comfortable testing in. 3. Proceed to examples/design/Observers.php
  • 4. What Are Observers Observers are a design pattern, most commonly used in event driven programming, where an object has a list of observers and the observers are notified of a state change. A simpler explanation would be when a function is executed, a list of other functions is automatically executed.
  • 5. Observers Visual MyObject::doSomething Method doSomething executes. Notify observers execution has taken place. Output
  • 6. PVPatterns and PVStaticPatterns The classes that contain the methods for using observers is the PVPatterns and PVStaticPatterns classes. PVPatterns is for instances and PVStaticPatterns is for static methods. Both PVObject and PVStaticObject extend the pattern classes.
  • 7. Let's Begin In our example, we are going to pretend you want to integrate a function with social media. So lets start by making two social media classes. Keep note that in our example, one of our classes has a static method. The argument passed from the method observed
  • 8. Messenger Object Now we are going create a class that has the ability to send messages to objects that are observing this method. Extends PVObject Implements the ability to call observers The name of the event that observrs look for Value passed to objects that are observing
  • 9. Take Notice! 1. Our class extends PVObject. PVObject extends PVPatterns which has our methods needed to use the observer. The method that will notify other methods than an action has occurred is _notify(). 2. The method notify has the parameter 'new_message'. This is the name of the event that is going to cause the notifications. After the event name, we can add as many parameters as we want but in this example we are only adding one, the message.
  • 10. Round 1 The first test we are going to do is just sending a message without adding an observer. So lets initialize the object and send a message.
  • 11. Result The result here will be very simple.
  • 12. Round 2 Now lets attach our observers. At minimum, the observer requires 3 arguments. The first argument is the name of the event. Our event name has to match to event name set in the notifier, which is 'new_message'. The second argument is the class to be called and the third is the method in the class to be called when the event is executed The last is options, namely for if our method is not static, apply the 'instance’ option here. Code example on next slide =>
  • 13. Attach the Observers Call an instance of Event Name Class to call Method in class to call an object Event Name Class to call Method in class to call
  • 15. Challenge! Below is an optional challenge to perform that is designed to help you gain a better understanding of the design pattern. 1. Look through ProdigyView’s source code and find the PVSession class. 2. Find the event name for either writing a session or writing a cookie. 3. Create a class that accepts the same parameters that the method in the Session class outputs. 4. Add that class as an observer to PVSession:writeCookie() or PVSession::writeMethod 5. Execute PVSession:writeCookie() or PVSession::writeMethod and print out the results in the class you created.
  • 16. Summary 1. Add _notify to a function and set the event name. Add as many parameters as you need after the event name. Parameters will be passed to the functions that’s are listening. 2. Attach an observer with _addObserver. Make sure to specify the name of the event, the class and method the even will be calling.
  • 17. API Reference For a better understanding of the Collections and the Iterator, check out the api at the two links below. PVStaticPatterns PVPatterns More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com