Skip to content

Commit 7d57f74

Browse files
committed
Blue Spring
1 parent ee22054 commit 7d57f74

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

install

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?php
2+
if (php_sapi_name() !== 'cli') exit('It\'s no cli!');
3+
4+
$config = dirname(dirname(dirname(__DIR__))).'/Config/Html.php';
5+
6+
if(is_file($config)) return "\n--- HTML Engine configuration file already exists!\n";
7+
if(!is_dir(dirname($config))) return "\n\n--- Configuration file for HTML Engine not instaled!\n\n";
8+
9+
$data = <<<'EOD'
10+
<?php
11+
/**
12+
* HTML Engine Configurations
13+
* @copyright Bill Rocha - http://google.com/+BillRocha
14+
* @license MIT
15+
* @author Bill Rocha - [email protected]
16+
* @version 0.0.1
17+
* @package Config\Neos
18+
* @access public
19+
* @since 0.3.0
20+
*
21+
* The MIT License
22+
*
23+
* Copyright 2015 http://google.com/+BillRocha.
24+
*
25+
* Permission is hereby granted, free of charge, to any person obtaining a copy
26+
* of this software and associated documentation files (the "Software"), to deal
27+
* in the Software without restriction, including without limitation the rights
28+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29+
* copies of the Software, and to permit persons to whom the Software is
30+
* furnished to do so, subject to the following conditions:
31+
*
32+
* The above copyright notice and this permission notice shall be included in
33+
* all copies or substantial portions of the Software.
34+
*
35+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
41+
* THE SOFTWARE.
42+
*/
43+
44+
namespace Config;
45+
46+
class Html
47+
{
48+
private $name = 'default';
49+
private $cached = false;
50+
private $mode = 'dev'; //pro|dev
51+
52+
private $pathHtml = '';
53+
private $pathHtmlCache = '';
54+
private $pathWww = '';
55+
private $pathStyle = '';
56+
private $pathScript = '';
57+
58+
private $header = null;
59+
private $footer = null;
60+
61+
private $forceCompress = false;
62+
private $tag = 'x:';
63+
64+
65+
/**
66+
* Boot settings
67+
*/
68+
function __construct()
69+
{
70+
defined('_HTML') && $this->pathHtml = _APP.'Html/';
71+
defined('_WWW') && $this->pathWww = _WWW;
72+
73+
$this->pathHtmlCache = $this->pathHtml.'cache/';
74+
$this->pathStyle = $this->pathWww.'css/';
75+
$this->pathScript = $this->pathWww.'js/';
76+
77+
$this->header = $this->pathHtml.'header.html';
78+
$this->footer = $this->pathHtml.'footer.html';
79+
}
80+
81+
/*
82+
* Return all parameters
83+
*/
84+
public function getParams()
85+
{
86+
foreach($this as $k=>$v){
87+
$cfg[$k] = $v;
88+
}
89+
return $cfg;
90+
}
91+
92+
}
93+
EOD;
94+
95+
file_put_contents($config, $data);
96+
97+
return "\n\n--- HTML Engine instaled!\n\n";

0 commit comments

Comments
 (0)