PHP Classes
elePHPant
Icontem

lezaz: Template engine that compiles tags into PHP code

Recommend this page to a friend!
  Info   View files Documentation   Videos Videos   View files View files (60)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-09-20 (3 hours ago) RSS 2.0 feedStarStarStarStarStar 81%Total: 214 This week: 2All time: 8,011 This week: 239Up
Version License PHP version Categories
lezaz 1.0The PHP License5.0PHP 5, Databases, Templates, Compression, C...
Description Author

This package implements a template engine that compiles tags into PHP code.

It can process templates with special tags that may appear in template files and compiles them into PHP scripts that once executed produce the template engine output.

The tags and processed by plugin scripts that extend the template engine functionality. Currently it supports plugins to:

- Include additional templates
- Iterate over array template variables
- Evaluate conditions and process template sections according to the condition results
- Import CSS and JavaScript to the HTML output with support to compress the CSS and JavaScript
- Include raw PHP code
- Iterate over the results of given SQL query

Recommendations

Meta Symbol replacement in text
I need to take a piece of text and replace certain symbols in it

  Performance   Level  
Name: bassam alessawi <contact>
Classes: 2 packages by
Country: Jordan Jordan

Details
Website : http://lezaz.org
Video youtube : https://www.youtube.com/watch?v=_KMxLd4mcrM&index=10&list=PLfmjPOLGRrvptly-gRs39-2lGV3WKncit&utm_source=Hsoub%20I%2FO&utm_medium=Social&utm_campaign=Hsoub%20I%2FO%20Post-38767


معنى لزاز
تاج العروس - (ج 1 / ص 3800)
لِزازٌ : فرَسٌ للنبيِّ صلّى الله تعالى عليه وسلَّم سُمِّي به لشِدَّةِ تَلَزُّزِه واجتماعِ خَلْقِه وهي التي أَهْدَاها المُقَوْقِسُ مَلِكُ الإسكَندرِيَّة مع مارِيَةَ القِبْطِيَّة . 

-------------install-----------------
install folder contain 
install.php
install.sql 
install.zip 


------------lezaz----------------------
lezaz~func(parm1,parm2) // for function call and echo result  its mean  func(parm1,parm2) 
lezaz#id // echo value for lezaz syntax use id  its mean $lezaz_id
lezaz#id[parm] // echo value for lezaz syntax use id parameter  its mean  $lezaz_id[parm]
lezaz$parm // echo $parm from php files  its mean $parm 
lezaz$parm[item] // echo array item from $parm using in php files  its mean $parm[item] 
lezaz:func(parm) // echo result from lezaz class its mean $lezaz->func(parm)
    lezaz:get(param) = $_GET[param]
    lezaz:post(param) = $_POST[param]
    lezaz:cons(param) = param
    lezaz:sess(param) = $_SESSION[param]
    lezaz:sess(param,key) = $_SESSION[param][key]

*********************************************************

>>>setting file in theme folder with name setting.ini
$lezaz->setting('bassamxz') // get setting
$lezaz->setting('bassamxz','defult value') // get setting , if not exist then print defult value.
$lezaz->setsetting('bassamxz','xxcc'); // add setting
$lezaz->setsetting('bassamxz'); // remove setting
    
*********************************************************




 
<<lezaz:if/>
Attribute	Description        Default
--------------------------------------------
id           referance for this syntax use like lezaz#id             Null
condition    condition if syntax                                     1==1
pass         return this value if pass                               1
fail         return this value if fail                               0
print        print result attr if value = any pass like 1,true,yes   0

inside code you can use <lezaz_else/> 

Example
--------
<lezaz:if id='myid' condition="lezaz$parm==1" pass="yes" fail="no" print="false"/>

<lezaz:if id='myid' condition="lezaz$parm==1" pass="yes" fail="no" print="false">
the value for $parm = lezaz$parm and its 1 <br>
<lezaz_else/> 
the value for $parm = lezaz$parm and its not 1
</lezaz:if>
the result for if syntax is lezaz#myid

----------------------------------------------------------------------------------
  <lezaz:for/>
  Attribute	Description        Default
  --------------------------------------------
  id         referance for this syntax use like lezaz#id             Null
  condition  condition for syntax you can use $i as primary          $i<=to
  from       start count for from                                    1
  to         end count for                                           10
  step       number of step jump                                     0
  print        print result attr if value = any pass like 1,true,yes 0

  inside code you can use lezaz#id to print for value repete

  Example
  --------
  <lezaz:for id='idfor' from="5" to="100" step="5"/>

  <lezaz:for id="idfor" from='3' condition='$i<lezaz:get(bass)' to='27' step='1' print='false'>
  lezaz#idfor <br>
  </lezaz:for>
  the result syntax is lezaz#idfor as last value for this variable

----------------------------------------------------------------------------------
  <lezaz:block/>
  Attribute	Description        Default
  --------------------------------------------
  id         referance for this syntax use like lezaz#id             Null
  file       template file to include                                Null
  param1     you can use parameter to set before including file      Null

  Example
  --------
    <lezaz:block file="header_en" param1="bassam" param2="ahmad"/>
    <lezaz:block id='myid' file="{template}folder/template.inc"/>


----------------------------------------------------------------------------------

<lezaz:sql/>
Attribute	Description        Default
--------------------------------------------
id           referance for this syntax use like lezaz#id                   Null
sql          SQL syntax                                                    null
limit        number of rows to show                                        null
style1 
multipage    for using pagination value = true                             false      
print        print result attr if value = any pass like 1,true,yes         0
counter      initial value for counter parameter                           1

inside code you can use lezaz#id[field] >> print field value
                        lezaz#id_num >> print number of rows 
                        lezaz#id_counter >> print counter for this row or last counter if use after colse sql
                        lezaz#id_multipage >> show paginition

Example
--------
<lezaz:sql id='myid' sql="select * from table where id=lezaz$parm" limit="1" print="true"/>

<lezaz:sql id='myid' sql="select * from table where id=lezaz$parm" limit="1">
the value of field name = lezaz#myid[name] <br>
</lezaz:sql>

----------------------------------------------------------------------------------

 <lezaz:each/>
  Attribute	Description        Default
  --------------------------------------------
  id         referance for this syntax use like lezaz#id             Null
  array      array parameter without $ or $_SESSION                  Null
  type       type of array use session for $_SESSION['array']        variable  you can use session,server,get,post,cookie,request,variable
  counter    initial value for counter parameter                     1

  inside code you can use
  lezaz#id_key to print key item
  lezaz#id_value to print value item
  lezaz#id_counter to print counter item

  Example
  --------
  <lezaz:each id='ideach' array="variable1" type="session" counter="5" />

  <lezaz:each id='ideach' array="variable1" type="session" counter="5">
  lezaz#ideach_counter: lezaz#ideach_key =>  lezaz#ideach_value <br>
  </lezaz:each>
  the result syntax for lezaz#ideach is true if there is at least 1 item in array

----------------------------------------------------------------------------------

  <lezaz:import/>
  Attribute	Description        Default
  ----------------------------------------------------------------------
  dir    import all files from this dir                           Null
  type         css/js                                             Null
  compress     to compress all files in one                       Null
 * 1   >> without compress 
 * 2   >> with compress                  
  sort        fort import files ASC DESC                          ASC

  inside code you can use list of file to import link like
 * {theme}js/jquery.js ; //inside theme folder use js folder then file 
 * js/jquery.js; //same apove coz defult directory is theme 
 * {template}admin/js/file.js; // inside template folder use admin folder then js file
  TODO: * url:http://sdn.com/file.js -> {theme}js/file.js ;//check if url valid and return 200 then import else import from your server

  Example
  --------
  <lezaz:import dir='js' type="css"/>
  <lezaz:import dir='js' type="css">
  {template}admin/css/file.css
  url:http://sdn.com/file.css -> css/file2.css
  </lezaz:import>
----------------------------------------------------------------------------------

 <lezaz:input/>
  Attribute	Description        Default
  --------------------------------------------
  type        text,password,select,check,radio,button,submit,reset,textarea,date,                             text
  id          referance for this input use like lezaz#id, if there is no attr name we wll use id as name      null
  value       its a value!
  label       label text if no attr label we wll not add label element!
  size        number from 1:12 defult is 9 , this is size of this element
  sizegroup   number from 1:12 defult is 12 , this is size of groub form for this element
  validation >>
  optional or o: Only validate when the field is not empty
  required or r: Field is required
  length[100] or l : Between x and y characters allowed
  Max:7 or M: Set the maximum chr
  min:7 : Set the minimum chr
  confirm[fieldID] c: Match the other field (ie:confirm[password] or c[password])
  telephone or t: Match telephone regEx rule.
  email or e: Match email regEx rule.
  number or n: Numbers only
  nospecialcaracters or s: No special characters allowed
  letter : Letters only
  exemptString : Will not validate if the string match
  date or d:  date format Ex. d[yy,dd,mm:datehere]
  regx : regular expression use like rege:^[a-z\ \']+
  placeholder   normal
  icon          icon for element from awsomefont
  help          show button for help , when press this attr value wll show          Null
  msgvalidation if fail validation this msg wll show                                Null


  Example
  --------
  <lezaz:input id='myid' type="text" label="text" value="x" size="9" validation="r"/>



  button
  ======
  color : info2,purple,pink,light,yellow,grey,white | grey
  size  : xlg,mini,minier,sm | sm width-auto
  border: true,false or 1,0 | 1
  hover : true,false or 1,0 | 1
  option : bold,round,app | Null
  icon : {fontawsome fa-check} like check,trash-o,bigger-160 | Null , left if not null
  icon-right : {fontawsome fa-check} like check,trash-o,bigger-160 | Null , left if not null
 <lezaz:input type="button" color="info2" size="xlg"/>
  Files folder image Files  
File Role Description
Files folder imagecache (4 files)
Files folder imageclasses (3 files, 2 directories)
Files folder imageplugin (1 file, 3 directories)
Files folder imagetemplate (2 directories)
Files folder imagetmp (1 file)
Files folder imageuploaded (1 file, 1 directory)
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file conf.php Conf. Configuration script
Accessible without login Image file favicon.ico Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.txt Doc. adding readme file!

  Files folder image Files  /  cache  
File Role Description
  Accessible without login Plain text file 4e7a1bbe08787b7c42...cc717267fb57b5c.php Output adding readme file!
  Accessible without login Plain text file 58fbd6f189d6847c49...2de362283e03_ar.php Output Sample output
  Accessible without login Plain text file 58fbd6f189d6847c49...2de362283e03_en.php Example Example script
  Accessible without login Plain text file cacheSQLfile_30_fa...43fac4262b5af150cb5 Data Auxiliary data

  Files folder image Files  /  classes  
File Role Description
Files folder imageautoinclude (8 files)
Files folder imageautoload (5 files)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Plain text file clean_html.php Class Class source
  Plain text file ___core.php Class Class source

  Files folder image Files  /  classes  /  autoinclude  
File Role Description
  Plain text file class.JavaScriptPacker.php Class Class source
  Plain text file class.phpmailer.php Class Class source
  Plain text file comment.php Class Class source
  Accessible without login Plain text file compress.php Aux. Auxiliary script
  Plain text file Image.php Class Class source
  Accessible without login Plain text file language.php Aux. Auxiliary script
  Plain text file pure_captcha.php Class Class source
  Plain text file search.php Class Class source

  Files folder image Files  /  classes  /  autoload  
File Role Description
  Plain text file __db.php Class Class source
  Plain text file __file.php Class Class source
  Plain text file __lezaz.php Class Class source
  Plain text file __mailer.php Class Class source
  Plain text file __string.php Class Class source

  Files folder image Files  /  plugin  
File Role Description
Files folder imagelezaz (1 file, 1 directory)
Files folder imagemyplugin (4 files, 1 directory)
Files folder imagetest_plugin (1 file)
  Accessible without login Plain text file .htaccess Data Auxiliary data

  Files folder image Files  /  plugin  /  lezaz  
File Role Description
Files folder imageplugin (10 files)
  Accessible without login Plain text file index.php Aux. Auxiliary script

  Files folder image Files  /  plugin  /  lezaz  /  plugin  
File Role Description
  Plain text file block.php Class Class source
  Plain text file each.php Class Class source
  Plain text file email.php Class Class source
  Plain text file filter.php Class Class source
  Plain text file for.php Class Class source
  Plain text file if.php Class Class source
  Accessible without login Plain text file img.php Example Example script
  Plain text file import.php Class Class source
  Plain text file php.php Class Class source
  Plain text file sql.php Class Class source

  Files folder image Files  /  plugin  /  myplugin  
File Role Description
Files folder imagelang (2 files)
  Accessible without login Plain text file footer.php Aux. Auxiliary script
  Accessible without login Plain text file index.php Example Example script
  Accessible without login Plain text file init.php Aux. Auxiliary script
  Accessible without login Plain text file term.php Aux. Auxiliary script

  Files folder image Files  /  plugin  /  myplugin  /  lang  
File Role Description
  Accessible without login Plain text file ar Data Auxiliary data
  Accessible without login Plain text file en Data Auxiliary data

  Files folder image Files  /  plugin  /  test_plugin  
File Role Description
  Accessible without login Plain text file index.php Test Unit test script

  Files folder image Files  /  template  
File Role Description
Files folder imagemytheme (2 files)
Files folder imagesample (3 files, 3 directories)

  Files folder image Files  /  template  /  mytheme  
File Role Description
  Accessible without login Plain text file index.inc Data Auxiliary data
  Accessible without login Plain text file setting.ini Data Auxiliary data

  Files folder image Files  /  template  /  sample  
File Role Description
Files folder imagecss (2 files)
Files folder imageimages (3 files)
Files folder imagejs (2 files)
  Accessible without login Plain text file 404.inc Data Auxiliary data
  Accessible without login Plain text file doc.inc Data Auxiliary data
  Accessible without login Plain text file index.inc Data Auxiliary data

  Files folder image Files  /  template  /  sample  /  css  
File Role Description
  Accessible without login Plain text file bootstrap-theme.min.css Data Auxiliary data
  Accessible without login Plain text file bootstrap.min.css Data Auxiliary data

  Files folder image Files  /  template  /  sample  /  images  
File Role Description
  Accessible without login Image file slide_1.png Data Auxiliary data
  Accessible without login Image file slide_2.png Data Auxiliary data
  Accessible without login Image file slide_3.png Data Auxiliary data

  Files folder image Files  /  template  /  sample  /  js  
File Role Description
  Accessible without login Plain text file bootstrap.js Data Auxiliary data
  Accessible without login Plain text file jquery.js Data Auxiliary data

  Files folder image Files  /  tmp  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data

  Files folder image Files  /  uploaded  
File Role Description
Files folder imagemember (2 files)
  Accessible without login Plain text file .htaccess Data Auxiliary data

  Files folder image Files  /  uploaded  /  member  
File Role Description
  Accessible without login Image file 1461005086.jpg Icon Icon image
  Accessible without login Image file 1461005982.PNG Icon Icon image

 Version Control Unique User Downloads Download Rankings  
 100%
Total:214
This week:2
All time:8,011
This week:239Up
 User Ratings  
 
 All time
Utility:91%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:91%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:91%StarStarStarStarStar
Videos:-
Overall:81%StarStarStarStarStar
Rank:13