O'Reilly logo

PHP Application Development with NetBeans Beginner's Guide by M A Hossain Tonu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Service layer

The Service layer contains classes to serve applications, or simply provides a framework for the application. The application layer will communicate with this layer to have all sorts of application services, such as user authentication, user information registration, login session validation, and form validation. For a better understanding, we will keep our service classes inside a separate directory named Service and use the namespace My\Service, for the classes of this layer.

Creating the ValidatorService class

This class will perform validation tasks, such as form validation and login information validation, and also save to deliver form error messages and field values.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required