PHP Classes

File: src/App/Component/AbstractComponent.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon   src/App/Component/AbstractComponent.php   Download  
File: src/App/Component/AbstractComponent.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: 811 bytes
 

Contents

Class file image Download
<?php

namespace Jaxon\App\Component;

use
Jaxon\Di\Container;
use
Jaxon\Plugin\Request\CallableClass\ComponentHelper;
use
Jaxon\Script\Call\JxnCall;

abstract class
AbstractComponent
{
   
/**
     * Get the component helper
     *
     * @return ComponentHelper
     */
   
abstract protected function helper(): ComponentHelper;

   
/**
     * Initialize the component
     *
     * @param Container $di
     * @param ComponentHelper $xHelper
     *
     * @return void
     */
   
abstract protected function initComponent(Container $di, ComponentHelper $xHelper);

   
/**
     * Get the js call factory.
     *
     * @param string $sClassName
     *
     * @return JxnCall
     */
   
protected function rq(string $sClassName = ''): JxnCall
   
{
        return
$this->helper()->rq($sClassName);
    }
}