PHP Classes

File: src/Plugin/CodeGeneratorInterface.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon   src/Plugin/CodeGeneratorInterface.php   Download  
File: src/Plugin/CodeGeneratorInterface.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: 1 year ago
Size: 1,424 bytes
 

Contents

Class file image Download
<?php

/**
 * CodeGeneratorInterface.php - Code generator interface
 *
 * Any class generating css or js code must implement this interface.
 *
 * @package jaxon-core
 * @author Thierry Feuzeu <thierry.feuzeu@gmail.com>
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
 * @link https://github.com/jaxon-php/jaxon-core
 */

namespace Jaxon\Plugin;

use Jaxon\Plugin\Code\JsCode;

interface CodeGeneratorInterface
{
    /**
     * Get the value to be hashed
     *
     * @return string
     */
    public function getHash(): string;

    /**
     * Get the HTML tags to include CSS code and files into the page
     *
     * The code must be enclosed in the appropriate HTML tags.
     *
     * @return string
     */
    public function getCss(): string;

    /**
     * Get the HTML tags to include javascript code and files into the page
     *
     * The code must be enclosed in the appropriate HTML tags.
     *
     * @return string
     */
    public function getJs(): string;

    /**
     * Get the javascript code to include into the page
     *
     * The code must NOT be enclosed in HTML tags.
     *
     * @return string
     */
    public function getScript(): string;

    /**
     * Get the javascript codes to include into the page
     *
     * The code must NOT be enclosed in HTML tags.
     *
     * @return JsCode|null
     */
    public function getJsCode(): ?JsCode;
}