
Learn how to build an advanced search from with PHP.Learn how to build an advanced search from with PHP.
In this video we will start by writing the test and all supporting traits for the Database insert method.
In this episode we will implement the insert method and for the first time make use of the database migrations that came with the exercise files.
In this episode we will have a look at the update and fetchObject method of the abstract Database class.
In this video we will write tests for the Database::fetchObject method created in the previous episode.
In this lecture we are adding the remove() and count() methods to our PHP PDO database wrapper class.
In this episode we will add the last method to the Database component called fetchObjects, which will return a collection of objects of the specified type. Additionally we will create a bootstrap autoloader to accommodate our environment variables and make use of the IOC Container.
In this episode we are going to build a simple IoC Container to accommodate requirements of our small application.
To combine common functionality of all models in our exercise, we will create an abstract Model class that will have all methods necessary to interact with each model.
We continue with our abstract Model class, this time adding the update(), delete() and all() methods.
To set the order of the returned items and limit number of records we need to add the order by and limit clause to our sql statement. In this video we add two new methods to our Model class named orderBy and limit.
With our Model super class ready, we can start writing tests for the models representing records in our lookup tables.
Continuing where we've left in the previous episode, we are adding tests for the update and remove methods of the Model class.
In this episode we will create several model classes with associated tests and take a look at how we can refactor pieces of code that are shared across all of them.
In this episode we use previously declared classes to obtain records that are used to generate our form.
In this episode we will learn how we can extract the list of years associated with book records and access them via the Year class.
In this video we will start working on the Book class. The Book::sql() method will use a number of sub-queries to obtain concatenated list of names from the lookup tables.
In this episode we will continue writing tests for the Book class.
In this episode we will fetch book records and display them on the page, adding extra methods as we go along.
With names from the lookup tables returned as concatenated strings, we can now use php's built in functions to split and join them together in any way we wish.
Before we will be able to filter the results based on the submitted request, we need to collect all data and filter it to only obtain a valid input. In this episode we will write the Search class, which takes care of all this.
In this episode we will code the class responsible for retaining submitted data within the form.
In this video we complete the Sticky class with all associated tests and apply its methods to our search form.
Our Filter component will generate the sql statement that will return the records based on the search criteria. The first set of classes will represent the concatenators for the WHERE sql clause.
In this episode we will create an abstract Query class.
To allow us work with the sub-queries that deal with the pivot tables we will produce a number of Pivot classes.
In this episode we will write tests for our Pivot classes.
In this episode we will add some sub-classes to extend our abstract Query class and provide the necessary vocabulary for our sql statement builder.
Filter class is responsible for processing the sql segments and returning the correct statement for the WHERE clause.
In this episode we will write tests for the Equals query class.
In this episode we will write some tests for the Filter class using Equals query class.
In this episode we are testing our Exists query class.
In this episode we will write some tests for the Filter class using Exists query class.
In this episode we are testing our LikePercentBoth query class.
In this episode we will write some tests for the Filter class using LikePercentBoth query class.
With our Filter component ready, we can start building our filter set.
In this episode we will add the search method to our Model class to allow any class that inherits from it to provide search functionality.
Filter manager will make it easier to organise all filters and use them with any Model sub-class.
In this episode we will write a couple of tests to ensure our search method does what it's supposed to.
In this episode we will write the main Pagination class, which will be responsible for generating pagination data.
With all properties set to private, we need to declare a few accessor / getter methods for the client to be able to gain access to certain pagination data.
As with every other component in our application, in order to ensure that it works as expected, we will write a set of tests using phpunit.
Pagination view class is used to obtain the pagination html output - for this exercise we use the pagination with the select dropdown menu and previous and next buttons.
In this episode we will write the necessary pagination view tests.
Now it's time to do some refactoring to free our tests of code duplication.
Our views will have access to the Paginator instance, which will provide all necessary methods for displaying the pagination on the page.
In this, last episode of this course we add thew paginate method to our Model class and make use of the Paginator instance in our view.
During this course you will learn how to use the best practice and how to make use of the Design Patterns in order to code the reusable component, which will allow you to filter your records.
We will build a simple Object Relational Mapper - to be used with Model classes representing entities of our project.
For each sub-component will write a set of tests using PHPUnit.
This course is for anyone who has a fundamental understanding of PHP programming language in its Object Oriented environment.