The Framework PHP Helpers



Code of PHP Helper class: "HelperRaw"

DOWNLOAD version 0.1.0
released at 2018-02-25 19:50 GMT

  1. Download Helpers (zip file)
  2. Unzip it in your vendors folder (e.g)
  3. Include autoload.php in your bootstrap file
    <?php
    /*
    lets suposse you have this folder tree
        yourproject/
            vendors/
                lib_1/
                lib_n/
                theframework/   -->uncompressed zip
                    helpers/
            index.php
    */
    //this file is: yourproject/index.php
    include_once("vendors/theframework/helpers/autoload.php");
    
    use TheFramework\Helpers\HelperInputText;
    $oInput = new HelperInputText();
    $oInput->set_value("Hello World");
    $oInput->add_class("form-control");
    $oInput->show();
  4. Result: Example of HelperInputText



PHP Class code

<?php
/**
 * @author Eduardo Acevedo Farje.
 * @link www.eduardoaf.com
 * @version 1.0.1
 * @name HelperRaw
 * @date 06-12-2016 14:38
 * @file helper_raw.php
 * @requires
 */
namespace TheFramework\Helpers;
use TheFramework\Helpers\TheFrameworkHelper;
class HelperRaw extends TheFrameworkHelper
{
    
    public function __construct($sRawHtml="")
    {
        $this->_inner_html = $sRawHtml;
    }
    
    //Raw
    public function get_html()
    {  
        //Agrega a inner_html los valores obtenidos con get_html
        $sHtmlToReturn = "";
        $this->load_inner_objects();
        $sHtmlToReturn .= $this->_inner_html;
        return $sHtmlToReturn;
    }
    
    //Escondo este metodo
    public function set_rawhtml($sRawHtml,$asEntity=0){parent::set_innerhtml($sRawHtml,$asEntity);}
    
    //**********************************
    //             SETS
    //**********************************
    
    //**********************************
    //             GETS
    //**********************************
    
    //**********************************
    //           MAKE PUBLIC
    //**********************************
}