Skip to content

Commit 0de127b

Browse files
committed
cambio total
1 parent f3db488 commit 0de127b

File tree

6 files changed

+10
-48
lines changed

6 files changed

+10
-48
lines changed

composer.json

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,14 @@
11
{
2-
"name": "wcadena/string-blade-compiler",
2+
"name": "wcadena/laravel-string-blade-compiler",
33
"description": "Render Blade templates from a string",
4-
"keywords": ["laravel", "blade", "compiler", "eloquent", "model"],
54
"license": "MIT",
65
"authors": [
7-
{
8-
"name": "Bilal",
9-
"email": "[email protected]",
10-
"homepage": "https://phalcosoft.com"
11-
},
12-
{
13-
"name": "Digivo",
14-
"email": "[email protected]"
15-
},
16-
{
17-
"name": "Flyn San",
18-
"email": "[email protected]"
19-
},
20-
{
21-
"name": "Ebrahim Radi",
22-
"email": "[email protected]",
23-
"homepage": "http://me2bits.com"
24-
},
256
{
267
"name": "Wagner Cadena",
27-
"email": "[email protected]",
28-
"homepage": "http://ecuatask.com"
8+
"email": "[email protected]"
299
}
3010
],
11+
"minimum-stability": "dev",
3112
"require": {
3213
"php": ">=7"
3314
},
@@ -40,7 +21,10 @@
4021
"laravel": {
4122
"providers": [
4223
"Wcadena\\StringBladeCompiler\\StringBladeCompilerServiceProvider"
43-
]
24+
],
25+
"aliases": {
26+
"StringView": "Wcadena\\StringBladeCompiler\\Facades\\StringView"
27+
}
4428
}
4529
}
4630
}

readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## String Blade Compiler
22

33
Originally forked from [Flynsarmy/laravel-db-blade-compiler](https://github.com/Flynsarmy/laravel-db-blade-compiler)
4+
y
5+
Originally forked from [bilaliqbalr/laravel-string-blade-compiler](https://github.com/bilaliqbalr/laravel-string-blade-compiler)
46

57
### Render Blade templates from a string
68

@@ -10,7 +12,7 @@ This package generates and returns a compiled view from a provided string
1012

1113
Require this package in your composer.json and run composer update (or run `composer require wcadena/string-blade-compiler:1.*` directly):
1214

13-
"wcadena/string-blade-compiler": "1.*"
15+
"wcadena/laravel-string-blade-compiler": "1.*"
1416

1517
After updating composer, add the ServiceProvider to the providers array in app/config/app.php
1618

src/Wcadena/StringBladeCompiler/Facades/StringView.php renamed to src/Facades/StringView.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
namespace Wcadena\StringBladeCompiler\Facades;
33

44
use Illuminate\Support\Facades\Facade;
5-
use Illuminate\Support\Facades\Log;
65

76
class StringView extends Facade
87
{
@@ -14,7 +13,6 @@ class StringView extends Facade
1413
*/
1514
protected static function getFacadeAccessor()
1615
{
17-
//Log::info('datoasdasd88asd8asd');
1816
return 'StringView';
1917
}
2018
}

src/Wcadena/StringBladeCompiler/StringBladeCompiler.php renamed to src/StringBladeCompiler.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class StringBladeCompiler extends BladeCompiler implements CompilerInterface
1313

1414
public function __construct($filesystem, $cache_path, $config, $app)
1515
{
16-
//Log::info('asdy7nascascascasc');
1716
// Get Current Blade Instance
1817
$blade = app('view')->getEngineResolver()->resolve('blade')->getCompiler();
1918

@@ -34,7 +33,6 @@ public function __construct($filesystem, $cache_path, $config, $app)
3433
*/
3534
public function compile($path = NULL)
3635
{
37-
//Log::info('asdy7nascascascasc222222222222222');
3836
$contents = $this->compileString($path);
3937

4038
if (!is_null($this->cachePath)) {
@@ -50,7 +48,6 @@ public function compile($path = NULL)
5048
*/
5149
public function getCompiledPath($path)
5250
{
53-
//Log::info('asdy7nascascascasc33333333333333');
5451
/*
5552
* A unique path for the given model instance must be generated
5653
* so the view has a place to cache. The following generates a
@@ -69,7 +66,6 @@ public function getCompiledPath($path)
6966
*/
7067
public function isExpired($path)
7168
{
72-
//Log::info('asdy7nascascascascsasda22222222222222222');
7369
if (!$this->config->get('string-blade-compiler.cache') OR !$this->config->get('string-blade-compiler.cache_time') OR !is_int($this->config->get('string-blade-compiler.cache_time'))) {
7470
return true;
7571
}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace Wcadena\StringBladeCompiler;
33

4-
use Illuminate\Support\Facades\Log;
54
use Illuminate\Support\ServiceProvider;
65
use Illuminate\View\Engines\CompilerEngine;
76

@@ -22,7 +21,6 @@ class StringBladeCompilerServiceProvider extends ServiceProvider
2221
*/
2322
public function boot()
2423
{
25-
//Log::info('Entroa aca3333333333333333333333333333333333!!!!!');
2624
$config_path = __DIR__ . '/../../../config/string-blade-compiler.php';
2725
$this->publishes([$config_path => config_path('string-blade-compiler.php')], 'config');
2826

@@ -37,7 +35,6 @@ public function boot()
3735
*/
3836
public function register()
3937
{
40-
//Log::info('Entroa aca1111111111111111111!!!!!');
4138
$config_path = __DIR__ . '/../../../config/string-blade-compiler.php';
4239
$this->mergeConfigFrom($config_path, 'string-blade-compiler');
4340

@@ -64,7 +61,6 @@ public function register()
6461
*/
6562
public function provides()
6663
{
67-
//Log::info('hahahahahahaha11111111111111111');
6864
return array();
6965
}
7066
}

src/Wcadena/StringBladeCompiler/StringView.php renamed to src/StringView.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22
namespace Wcadena\StringBladeCompiler;
33

4-
use Illuminate\Support\Facades\Log;
54
use View;
6-
use Closure;
75
use ArrayAccess;
86
use Illuminate\Contracts\Support\Arrayable;
97
use Illuminate\Contracts\Support\Renderable;
@@ -16,13 +14,11 @@ class StringView extends \Illuminate\View\View implements ArrayAccess, Renderabl
1614

1715
public function __construct($config)
1816
{
19-
//Log::info('asdasdasd8a8asd8a8sdasd');
2017
$this->config = $config;
2118
}
2219

2320
public function setEngine($compiler)
2421
{
25-
//Log::info('asdasdasd8a8asd8a8sdasd22222222222222222222222222222');
2622
$this->engine = $compiler;
2723
return $this;
2824
}
@@ -37,7 +33,6 @@ public function setEngine($compiler)
3733
*/
3834
public function make($view, $data = array(), $mergeData = array())
3935
{
40-
//Log::info('asdasdasd8a8asd8a8sdasd3333333333333333333333333333333333');
4136
$this->path = $view;
4237
$this->data = array_merge($mergeData, $this->parseData($data));
4338

@@ -52,7 +47,6 @@ public function make($view, $data = array(), $mergeData = array())
5247
*/
5348
public function render(callable $callback = null)
5449
{
55-
//Log::info('asdasdasd8a8asd8a8sdasd444444444444444444444444444444444');
5650
$contents = $this->renderContents();
5751

5852
$response = isset($callback) ? $callback($this, $contents) : null;
@@ -72,7 +66,6 @@ public function render(callable $callback = null)
7266
*/
7367
protected function renderContents()
7468
{
75-
//Log::info('asdasdasd8a8asd8a8sdasd55555555555555555555555555555555555');
7669
// We will keep track of the amount of views being rendered so we can flush
7770
// the section after the complete rendering operation is done. This will
7871
// clear out the sections for any separate views that may be rendered.
@@ -96,7 +89,6 @@ protected function renderContents()
9689
*/
9790
protected function parseData($data)
9891
{
99-
//Log::info('asdasdasd8a8asd8a8sdasd66666666666666666666666666');
10092
return $data instanceof Arrayable ? $data->toArray() : $data;
10193
}
10294

@@ -107,7 +99,6 @@ protected function parseData($data)
10799
*/
108100
protected function gatherData()
109101
{
110-
//Log::info('asdasdasd8a8asd8a8sdasd777777777777777777777777777777');
111102
$data = array_merge(View::getShared(), $this->data);
112103

113104
foreach ($data as $key => $value) {
@@ -129,7 +120,6 @@ protected function gatherData()
129120
*/
130121
public function nest($key, $view, array $data = array())
131122
{
132-
//Log::info('asdasdasd8a8asd8a8sdasd888888888888888888888888888888');
133123
return $this->with($key, View::make($view, $data));
134124
}
135125

@@ -141,7 +131,6 @@ public function nest($key, $view, array $data = array())
141131
*/
142132
public function offsetExists($key)
143133
{
144-
//Log::info('asdasdasd8a8asd8a8sdasd9999999999999999999999999999999');
145134
return array_key_exists($key, $this->data);
146135
}
147136

@@ -153,7 +142,6 @@ public function offsetExists($key)
153142
*/
154143
public function offsetGet($key)
155144
{
156-
//Log::info('asdasdasd8a8asd8a8sdasd100000000000000000000100000000');
157145
return $this->data[$key];
158146
}
159147

@@ -166,7 +154,6 @@ public function offsetGet($key)
166154
*/
167155
public function offsetSet($key, $value)
168156
{
169-
//Log::info('chixZXZX11111111111111');
170157
$this->with($key, $value);
171158
}
172159

@@ -178,7 +165,6 @@ public function offsetSet($key, $value)
178165
*/
179166
public function offsetUnset($key)
180167
{
181-
//Log::info('chixZXZX1111111111111122222222222222222222222');
182168
unset($this->data[$key]);
183169
}
184170
}

0 commit comments

Comments
 (0)