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

Time for action — creating the user application

We will integrate the API into our user application file, which will be the main application file; there might be interfaces or view files for each application purpose. Let's go through the following steps:

  1. Create a new PHP file inside the project directory named UserApplication.php, and type in the following UserApplication class:
    <?php namespace My\Application; use My\Service\UserService; use My\Service\ValidatorService; session_start(); require_once "Dao/BaseDao.php"; require_once "Dao/UserDao.php"; require_once "Service/ValidatorService.php"; require_once "Service/UserService.php"; class UserApplication { public function __ construct (UserService $userService, ValidatorService $validator) { $this->userService ...

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