username = $username; } return $this; } /** * Set password * * @access public * @param string $password * @return $this */ public function withPassword($password) { if (! empty($password)) { $this->password = $password; } return $this; } /** * Set procedure name * * @access public * @param string $procedureName * @return $this */ public function withProcedure($procedureName) { $this->procedureName = $procedureName; return $this; } /** * Add a new middleware * * @access public * @param MiddlewareInterface $middleware * @return MiddlewareHandler */ public function withMiddleware(MiddlewareInterface $middleware) { $this->middleware[] = $middleware; return $this; } /** * Execute all middleware * * @access public */ public function execute() { foreach ($this->middleware as $middleware) { $middleware->execute($this->username, $this->password, $this->procedureName); } } }