{"id":22463830,"url":"https://github.com/davidobinna/beginners-object-oriented-programming-php","last_synced_at":"2025-03-27T14:28:46.761Z","repository":{"id":167183250,"uuid":"526413383","full_name":"davidobinna/BEGINNERS-Object-Oriented-Programming-PHP","owner":"davidobinna","description":"Learn how to use PHP OOP from scratch","archived":false,"fork":false,"pushed_at":"2022-08-19T00:30:38.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T18:43:06.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidobinna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-19T00:28:56.000Z","updated_at":"2022-12-05T19:02:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"08235789-bdd2-439d-ae10-5b3aca71e46d","html_url":"https://github.com/davidobinna/BEGINNERS-Object-Oriented-Programming-PHP","commit_stats":null,"previous_names":["davidobinna/beginners-object-oriented-programming-php"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2FBEGINNERS-Object-Oriented-Programming-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2FBEGINNERS-Object-Oriented-Programming-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2FBEGINNERS-Object-Oriented-Programming-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2FBEGINNERS-Object-Oriented-Programming-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidobinna","download_url":"https://codeload.github.com/davidobinna/BEGINNERS-Object-Oriented-Programming-PHP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245862359,"owners_count":20684671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T09:14:12.854Z","updated_at":"2025-03-27T14:28:46.742Z","avatar_url":"https://github.com/davidobinna.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#PHP - OOP Document\n_PHP introduced object-oriented programming features since version 5.0. Object-Oriented programming is one of the most popular programming paradigms based on the concept of objects and classes.\n#Section 1. Objects \u0026 Classes\nObjects \u0026 Classes – learn the basic concepts of OOP including objects and classes.\nThe $this keyword – help you understand PHP $this keyword and how to use it effectively.\nAccess Modifiers: public vs. private – explain to you the access modifiers in PHP and help you understand the differences between the private and public access modifiers.\n\n#Section 2. Constructor and Destructor\nConstructor – explain to you the constructor concept and how to use it to initialize attributes.\nDestructor – learn how to use destructor to clean resources when the object is deleted.\n\n#Section 3. Properties\nTyped Properties – show you how to add type hints to class properties.\nReadonly Properties – use the readonly keyword to define readonly properties that can be initialized once within the class.\n\n#Section 4. Inheritance\nInheritance – how to extend a class for code reuse.\nCall the parent constructor – show you how to call the parent constructor from a child class’s constructor.\nOverriding method – guide you on how to override a parent class’s method in the child class.\nProtected Access Modifier – explain the protected access modifier and how to use protected properties and methods effectively.\n\n#Section 5. Abstract classes\nAbstract Class – guide you on abstract classes and how to use them effectively.\n\n#Section 6. Interfaces\nInterface – explain to you the interface concept and how to create interfaces.\n\n#Section 7. Polymorphism\nPolymorphism – explain the polymorphism concept and show you how to implement polymorphism in PHP using abstract classes or interfaces.\n\n#Section 8. Traits\niTraits – introduce you to traits.\n\n#Section 9. Static methods \u0026 properties\nStatic Methods and Properties – show you how to use static methods and properties.\nClass constants – learn how to define class constants using the const keyword.\nLate Static Binding – introduce the late static binding concept and how to use it effectively._\n\n#Section 10. Magic Methods\nMagic methods – understand how the magic methods work in PHP. __toString() – return the string representation of an object.\n__call() – show you how to use the __call() magic method.\n__callStatic() – show you how to use the __calStatic() magic method.\n__invoke() – learn how to define a function object or function by implementing the __invoke() magic method.\n\n#Section 11. Working with Objects\nSerialize Objects– use the serialize() function to serialize an object into a binary string and how to use the __serialize() and __sleep() magic methods\nUnserialize Objects – guide you on how to use the unserialize() function to convert a serialized string into an object. Also, discuss the __wakeup() and __unserialize() magic methods.\nCloning Objects – show you how to copy an object.\nComparing Objects – how to compare two objects.\nAnonymous class – learn how to define a class without a declared name.\n\n#Section 12. Namespaces\nNamespace – learn how to use namespaces to group the related classes.\n\n#Section 13. Autoloading\nAutoloading Class files – learn how to load classes automatically.\nAutoloading using Composer – show you how to use Composer to autoload classes.\n\n#Section 14. Exception Handling\ntry…catch – show you how to use the try…catch statement to handle exceptions that may occur in your script.\ntry…catch…finally – learn how to clean up the resources when an error occurs using the finally block.\nThrow an exception – guide you on how to throw an exception using the throw statement.\nSet an Exception Handler – show you how to use the set_exception_handler function to set a global exception handler to catch the uncaught exceptions.\n\n#Section 15. Class / Object Functions\nclass_exists – return true if a class exists\nmethod_exists – return true if an object or a class has a specific method.\nproperty_exists – return true if an object or a class has a specific property.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidobinna%2Fbeginners-object-oriented-programming-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidobinna%2Fbeginners-object-oriented-programming-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidobinna%2Fbeginners-object-oriented-programming-php/lists"}