
In this lecture we start by examining the basic structure of a PHP class, create a class with properties and behaviors, create an object and use it.
Now that you know how to create and instantiate a class, you can learn how to initialize an object using a constructor.
Encapsulation refers to protecting the internals of an object from direct manipulation by the client. The client can send messages, but the client cannot directly change the properties in the object. Lets see how to encapsulate an object in PHP.
Inheritance is the ability for a subclass to inherits all of the public and protected methods and properties from the parent class.
Declaring class properties or methods as static makes them accessible without needing an instantiation of the class. Let talk about Static Methods & Properties and learn how to use them in PHP.
With Object-oriented programming, the possibilities are endless, let's now consider a new concept in OOP called method chaining.
In this lecture you will learn both theoretical and practical implementation of abstract classes in PHP using a simple case study
In this lecture, you will learn both the theoretical and practical implementation of abstract classes in PHP using a simple case study.
In this lecture, you will learn about object interfaces in PHP, why they are important, why you should use them, and also how to use interfaces using a simple case study.
Let's talk more about late static binding and fix a bug from the last lecture using late static binding.
Let's now discuss about namespaces and autoloading in PHP as these are two very important aspects when building model applications
In this video I'll go over the requirements for the simple grading class that we are going to build
Lets build the class to compute result for 5 subjects in a semester
Time to tie everything together by linking the grading class to the form and outputting relevant data to the UI
This section introduces building a bug report submission app in PHP, using composer and PHPUnit, and emphasizes test-driven development and object-oriented design to create reliable, well-tested code.
Create the core project folders by establishing the source directory and a test territory, then organize config, contracts, database with drivers, exceptions, helpers, logger, and templates for emails and scripts.
Convert PHP warnings and notices into exceptions by mapping severity, message, file, and line to a custom exception, then integrate it with the error handling class.
Define a PSR-3 logger interface with emergency, alert, critical, error, warning, notice, info, and debug levels, plus a log method and a log level class.
Test and implement a logging system by validating log levels, messages, and key-value data, then confirm file-based application logs for emergency and info events.
Create a PHPUnit configuration file in the project root to define bootstrap and encoding, and configure unit and functional test suites with color, error-to-exception conversion, and stop-on-failure.
Extend unit tests by adding an application test that validates basic data from the application instance, including environment, time, and log path, using assertions.
Explore unit testing of a logger class, validating interface implementation, writing and verifying log files at multiple levels, and handling invalid log levels in a test-driven approach.
Build a database abstraction layer for runtime switching between PDU and Mya's Kukali API, using a connection interface and dependency injection to stay loosely coupled, with unit tests.
Develop and test a MySQLi database connection for a school using an object-oriented design, implementing an abstract connection, a school-specific connector, and credential handling within a test-driven workflow.
Build an abstract database query builder in PHP using dependency injection and a database connection interface, supporting PDO and MySQLi, prepared statements, placeholders, and bindings.
Define and implement abstract methods in the query builder, including get, count, prepare, execute, and mapping to objects, then add create, update, delete, find by, and first for data retrieval.
Extend the query builder to implement abstract methods for the PDO API, wiring prepare, execute, fetch, and count, enabling fetch into classes and last insert handling.
Explore implementing abstract methods for the MySQLi API in PHP, using reflection to bind parameters, manage result sets, and execute prepared statements with type-safe bindings (string, integer, double).
Demonstrates how to automatically clean up the database for each test by wrapping in a transaction and rolling back, using a query factory and test credentials.
Explore adding more test cases in a PHP object-oriented and test-driven workflow, covering find by id and by value, updates, and deletes, while debugging query behavior.
A brief introduction to the concept of Entities and Repositories design pattern.
Let's start this section by writing a few test-cases for Entities and Repository.
In this lecture let's create an abstract entity and also an entity named BugReport
PHP Implementation of the repository pattern
PHP Implementation of the repository pattern
Making Test Cases Pass and Adding new Test
Writing Test Case for Create Bug Report with POST Request
Writing Test Case for Update and Delete Bug Report with POST Request
Describe logging during the request life cycle and exception handling in a bug-report workflow, using try-catch blocks, log messages, and context data like post content and errors.
Lets build a simple CRUD UI
Testing that We Can Visit The Homepage and See Certain Data
Step into the world of modern PHP development with our advanced course, tailored for those who want to leave outdated PHP practices behind. Our curriculum is meticulously crafted to transition you into the realm of Object-Oriented PHP and Test-Driven Development (TDD) using PHPUnit, focusing on real-world applicability without unnecessary dependencies.
Why is this course a game-changer for your PHP development journey? Here's what sets us apart:
Deep Dive into Object-Oriented PHP: Understand both foundational and advanced concepts of OOP, empowering you to write clean, maintainable, and scalable code.
Expert Guidance in Test-Driven Development: Learn TDD with PHPUnit to create robust, bug-resistant software, enhancing your code quality and reliability.
Mastering Dependency Management: Unravel the intricacies of Dependency Inversion and Dependency Injection, key to handling complex projects seamlessly.
Proficiency in PHP Design Patterns: Equip yourself with essential design patterns for PHP, elevating your problem-solving skills and organizational abilities.
Building a Custom Database Wrapper: Construct a versatile database wrapper compatible with PDO and MySQLi, optimizing your data handling processes.
Balanced PHP Utilization: Gain insights into when to use basic versus advanced PHP features for maximum efficiency and effectiveness.
Join a course that's more than just theory. With our focus on practical, job-ready skills, you’ll be equipped to confidently tackle any PHP project. PHP remains a powerhouse in the programming world; mastering it opens doors to numerous opportunities. Enroll now and transform your PHP skills from ordinary to extraordinary!"