PHP Classes

File: src/Plugin/RequestHandlerInterface.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon   src/Plugin/RequestHandlerInterface.php   Download  
File: src/Plugin/RequestHandlerInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Jaxon
Call PHP classes from JavaScript using AJAX
Author: By
Last change:
Date: 4 months ago
Size: 1,240 bytes
 

Contents

Class file image Download
<?php

namespace Jaxon\Plugin;

use
Jaxon\Request\Target;
use
Psr\Http\Message\ServerRequestInterface;

interface
RequestHandlerInterface
{
   
/**
     * Get the target function or class and method
     *
     * @return Target|null
     */
   
public function getTarget(): ?Target;

   
/**
     * @param ServerRequestInterface $xRequest
     *
     * @return Target
     */
   
public function setTarget(ServerRequestInterface $xRequest): Target;

   
/**
     * Check if this plugin can process the current request
     *
     * Called by the <Jaxon\Plugin\RequestManager> when a request has been received to determine
     * if the request is targeted to this request plugin.
     *
     * @param ServerRequestInterface $xRequest
     *
     * @return bool
     */
   
public static function canProcessRequest(ServerRequestInterface $xRequest): bool;

   
/**
     * Process the current request
     *
     * Called by the <Jaxon\Plugin\RequestManager> when a request is being processed.
     * This will only occur when <Jaxon> has determined that the current request
     * is a valid (registered) jaxon enabled function via <jaxon->canProcessRequest>.
     *
     * @return void
     */
   
public function processRequest(): void;
}