logging in or signing up How To Create Collections in PHP - ProdigyView ProdigyView Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 18 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 27, 2011 This Presentation is Public Favorites: 0 Presentation Description collections,data structures,design patterns,how-to,php,prodigyview,programming,tutorial Comments Posting comment... Premium member Presentation Transcript Collections: CollectionsOverview: Overview Objective Learn how add and retrieve information into a collection. Requirements Basics of ProdigyView Estimated Time 8 minutes www.prodigyview.comFollow Along With Code Example: Follow Along With Code Example Download a copy of the example code at www.prodigyview.com/source . Install the system in an environment you feel comfortable testing in. Proceed to examples/ design/ Collections.phpWhat Are Collections: What Are Collections In programming a collection resembles a container. A container can be described as a class or data structure that is composed of instances of other objects and/or variables. In other words, it’s a class designed for holding data of a specific type or any type. Some collections may hold only strings while other collections may hold strings, doubles, and integers. In ProdigyView , collections store any type of data and can be ran through an iterator when needed. www.prodigyview.comCollections Visual: Collections Visual My Collections Box My collections can h old anything!Creating A Collection: Creating A Collection Let’s start out by simply creating a collection and adding some data too it. Using the add() function will add a value to the collection. Instantiate the collections object Add Values to the CollectionAdding Name Data: Adding Name Data That was very straight forward. Now we are going to add more information in, except this time we are going to define a key so we easily find the data later. Set the key that will be used to access the collection Set the value to be stored in the collection associated with the keyRecalling Information: Recalling Information If you haven’t caught on yet, we’ve been adding a famous 1970 pop single. Now in our last slide we added data with a key. Let’s get that data back using the key. Retrieve the value stored in the collection based on the keyRecalled Info: Recalled Info www.prodigyview.comThe Iterator: The Iterator So we’ve added all this data to the collection and we can pull it out using the name/key if we know it. What about data that was added without a key using the add method? At this point we need to iterate through our data using the built in iterator. Get the collection’s iterator Iterate through the collectionThe Iterator Says…: The Iterator Says… Looping through the iterator should give you this:Iterate Manually: Iterate Manually Now on some occasions we might want to have control of the iterator. Not a problem, lets move it up, down, left and right as we please.Iterate Manually Results: Iterate Manually Results The output from iterating manually. www.prodigyview.comThe Not So Obvious: The Not So Obvious PVCollections can take any object, array, or singular value and add it the collection. The iterator is actually a class called PVIterator which can be called to work on its own when needed. Every object that extends PVObject and PVStaticObject has a PVCollection . Using the magic functions __set() and __get() will put and retrieve information into that collection. www.prodigyview.comSummary: Summary Using the add() function to added an item to the collection. Use the addWithName () to add an item by it’s name. Item can be retrieved by it’s name also. Use the getIterator () to retrieve the iterator and iterate through the data in the collection. www.prodigyview.comAPI Reference: API Reference For a better understanding of the Collections and the Iterator, check out the api at the two links below. PVCollections PVIterator www.prodigyview.com More Tutorials For more tutorials, please visit: http:// www.prodigyview.com /tutorials You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
How To Create Collections in PHP - ProdigyView ProdigyView Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 18 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 27, 2011 This Presentation is Public Favorites: 0 Presentation Description collections,data structures,design patterns,how-to,php,prodigyview,programming,tutorial Comments Posting comment... Premium member Presentation Transcript Collections: CollectionsOverview: Overview Objective Learn how add and retrieve information into a collection. Requirements Basics of ProdigyView Estimated Time 8 minutes www.prodigyview.comFollow Along With Code Example: Follow Along With Code Example Download a copy of the example code at www.prodigyview.com/source . Install the system in an environment you feel comfortable testing in. Proceed to examples/ design/ Collections.phpWhat Are Collections: What Are Collections In programming a collection resembles a container. A container can be described as a class or data structure that is composed of instances of other objects and/or variables. In other words, it’s a class designed for holding data of a specific type or any type. Some collections may hold only strings while other collections may hold strings, doubles, and integers. In ProdigyView , collections store any type of data and can be ran through an iterator when needed. www.prodigyview.comCollections Visual: Collections Visual My Collections Box My collections can h old anything!Creating A Collection: Creating A Collection Let’s start out by simply creating a collection and adding some data too it. Using the add() function will add a value to the collection. Instantiate the collections object Add Values to the CollectionAdding Name Data: Adding Name Data That was very straight forward. Now we are going to add more information in, except this time we are going to define a key so we easily find the data later. Set the key that will be used to access the collection Set the value to be stored in the collection associated with the keyRecalling Information: Recalling Information If you haven’t caught on yet, we’ve been adding a famous 1970 pop single. Now in our last slide we added data with a key. Let’s get that data back using the key. Retrieve the value stored in the collection based on the keyRecalled Info: Recalled Info www.prodigyview.comThe Iterator: The Iterator So we’ve added all this data to the collection and we can pull it out using the name/key if we know it. What about data that was added without a key using the add method? At this point we need to iterate through our data using the built in iterator. Get the collection’s iterator Iterate through the collectionThe Iterator Says…: The Iterator Says… Looping through the iterator should give you this:Iterate Manually: Iterate Manually Now on some occasions we might want to have control of the iterator. Not a problem, lets move it up, down, left and right as we please.Iterate Manually Results: Iterate Manually Results The output from iterating manually. www.prodigyview.comThe Not So Obvious: The Not So Obvious PVCollections can take any object, array, or singular value and add it the collection. The iterator is actually a class called PVIterator which can be called to work on its own when needed. Every object that extends PVObject and PVStaticObject has a PVCollection . Using the magic functions __set() and __get() will put and retrieve information into that collection. www.prodigyview.comSummary: Summary Using the add() function to added an item to the collection. Use the addWithName () to add an item by it’s name. Item can be retrieved by it’s name also. Use the getIterator () to retrieve the iterator and iterate through the data in the collection. www.prodigyview.comAPI Reference: API Reference For a better understanding of the Collections and the Iterator, check out the api at the two links below. PVCollections PVIterator www.prodigyview.com More Tutorials For more tutorials, please visit: http:// www.prodigyview.com /tutorials