Avatar of rgb192
rgb192Flag for United States of America asked on

built in php objects

from a lynda.com tutorial
how could I learn more about this subject matter,
I think it is built in php objects

this is the transcript
00:00	In this chapter, I'm going to explore built-in PHP objects.
00:04	I'll start with the standard class, which is pretty generic,
00:07	then demonstrate how to get objects from the database.
00:10	We'll handle errors in an object-oriented way, then customize them to meet our needs.
00:14	Let's start with the standard class.
00:16	A standard class is a generic class that can be created by typecasting a value
00:20	as an object, like casting the string "hello, world" as an object.
00:24	It won't have any methods, but it will have values.
00:27	In case you were wondering, if you typecast an object to an object, that's kind of
00:31	goofy, and nothing will happen.
00:34	If you typecast that array to an object, the result will be an object with
00:37	properties named for the keys to the array, with values corresponding to the array values.
00:43	Let's clean up the demo, and remove the cloning tests.
00:46	Create a test standard class object out of a nested array.
00:51	Echo <h2> Testing typecasting to an object>.
01:01	$test_object = (object). This is the typecasting. array. hello as the key and
01:10	world as the value. Then nested as an array ( 'key => value').
01:24	Then, debug the test object.
01:29	Save, then refresh your browser.
01:33	The result will be a standard class with properties "hello" and "nested," with nested
01:37	containing an array.
01:39	If I was to typecast any other data type like a string, the value would be
01:43	converted to a standard object, with one property named scalar.
01:47	Return to the demo, and replace the array definition with the number 12345. Save, and refresh.
02:00	The test object now has one property, scalar, with the value 12345.
02:07	Standard class objects are practically used in a number of ways.
02:10	For example, returning a defined data structure with fixed branches without nesting.
02:16	Sometimes, it's used as a shorthand to speed code development, as it takes less
02:20	characters to access a property than it does to specify a key.
02:24	Finally, you can use a standard object when interacting with a method that is
02:28	looking for an object with particular properties, but isn't actually
02:31	checking for the class.
02:33	In the next video, I will show you how to load objects directly from the
02:37	database, then intelligently load addresses from the database into the
02:40	correct class.

Open in new window

PHP

Avatar of undefined
Last Comment
rgb192

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Loganathan Natarajan

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
rgb192

thanks for object tutorials
Your help has saved me hundreds of hours of internet surfing.
fblack61