Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: EFTEC/BladeOne
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.15.1
Choose a base ref
...
head repository: EFTEC/BladeOne
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 11 commits
  • 4 files changed
  • 4 contributors

Commits on Oct 10, 2024

  1. Update BladeOne.php

    space symbol between '?' and '>' produced php parsing error during running cached file.
    
    Fixing...
    
    This is forks for me.
    Dreamer0x01 authored Oct 10, 2024
    Copy the full SHA
    2271b3b View commit details
  2. Merge pull request #196 from Dreamer0x01/patch-2

    Update BladeOne.php
    jorgecc authored Oct 10, 2024
    Copy the full SHA
    49d927c View commit details
  3. 4.15.2

    jorgecc-business-account committed Oct 10, 2024
    Copy the full SHA
    7f05b92 View commit details

Commits on Oct 11, 2024

  1. 4.16

    jorgecc-business-account committed Oct 11, 2024
    Copy the full SHA
    94570df View commit details

Commits on Oct 17, 2024

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    023181d View commit details

Commits on Dec 30, 2024

  1. 4.17

    jorgecc-business-account committed Dec 30, 2024
    Copy the full SHA
    f28ac77 View commit details
  2. Merge pull request #198 from ipranjal/patch-1

    fix: broken type hint in constructor
    jorgecc authored Dec 30, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    aeb170a View commit details
  3. 4.17.1

    jorgecc-business-account committed Dec 30, 2024
    Copy the full SHA
    6eaf11a View commit details
  4. 4.17.1

    jorgecc-business-account committed Dec 30, 2024
    Copy the full SHA
    7f2bb41 View commit details

Commits on Feb 22, 2025

  1. 4.18

    jorgecc-business-account committed Feb 22, 2025
    Copy the full SHA
    75ce1c6 View commit details
  2. 4.18

    jorgecc-business-account committed Feb 22, 2025
    Copy the full SHA
    fb51dcd View commit details
Showing with 161 additions and 49 deletions.
  1. +2 −2 README.md
  2. +25 −0 examples/teststack.php
  3. +28 −0 examples/views/Test2/stack.blade.php
  4. +106 −47 lib/BladeOne.php
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ BladeOne is a standalone version of Blade Template Engine that uses a single PHP

[![Packagist](https://img.shields.io/packagist/v/eftec/bladeone.svg)](https://packagist.org/packages/eftec/bladeone)
[![Total Downloads](https://poser.pugx.org/eftec/bladeone/downloads)](https://packagist.org/packages/eftec/bladeone)
[![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)]()
[![Maintenance](https://img.shields.io/maintenance/yes/2025.svg)]()
[![composer](https://img.shields.io/badge/composer-%3E1.6-blue.svg)]()
[![php](https://img.shields.io/badge/php->5.6-green.svg)]()
[![php](https://img.shields.io/badge/php-7.x-green.svg)]()
@@ -536,7 +536,7 @@ You are welcome to use it, share it, ask for changes and whatever you want to. J

## License
MIT License.
BladeOne (c) 2016-2024 Jorge Patricio Castro Castillo
BladeOne (c) 2016-2025 Jorge Patricio Castro Castillo
Blade (c) 2012 Laravel Team (This code is based and inspired in the work of the team of Laravel, however BladeOne is
mostly an original work)

25 changes: 25 additions & 0 deletions examples/teststack.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* Copyright (c) 2014 Jorge Patricio Castro Castillo MIT License.
*/
include "../lib/BladeOne.php";
use eftec\bladeone\BladeOne;

$views = __DIR__ . '/views';
$compiledFolder = __DIR__ . '/compiled';
$blade=new BladeOne($views,$compiledFolder,BladeOne::MODE_DEBUG);


$products=[
["name"=>"cocacola","price"=>10],
["name"=>"fanta","price"=>20],
["name"=>"sprite","price"=>30],
];


try {
echo $blade->run("Test2.stack", ['products'=>$products]);
} catch (Exception $e) {
echo "error found ".$e->getMessage()."<br>".$e->getTraceAsString();
}

28 changes: 28 additions & 0 deletions examples/views/Test2/stack.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---stack style:---<br>
@stack("style")
<br>---stack example1:---<br>
@stack("example1")
<br>---stack example*:---<br>
@stack("example*")
<br>---stack examplenotexist:---<br>
@stack("examplenotexist","notfound")
@push("example1")
alpha
@endpush
@push("example1")
beta
@endpush
@push("example1","gamma")

@foreach($products as $product)
<div class="blue">{{$product['name']}} ${{$product['price']}}</div>
@pushonce("style")
<style>
.blue {
background-color: blue;
color:white;
}
</style>
@endpushonce
@endforeach

Loading