- Download Helpers (zip file)
- Unzip it in your vendors folder (e.g)
-
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();
-
Result:
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
//**********************************
}
Back to Top