Skip to content

Commit dfec6b8

Browse files
author
Anderson 'Duodraco' Casimiro
committed
Primeiro commit da nova versão
1 parent 30f3eff commit dfec6b8

File tree

477 files changed

+28189
-10763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

477 files changed

+28189
-10763
lines changed

Diff for: VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.1

Diff for: application/bootstrap.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
#uses
3+
4+
#includepath
5+
set_include_path(get_include_path().PATH_SEPARATOR.__DIR__.'/library');
6+
require __DIR__.'/library/Lyla/Common/Autoload.php';
7+
require __DIR__.'/../vendor/autoload.php';
8+
spl_autoload_register(Lyla\Common\Autoload::getInstance());
9+
10+
$router = new Respect\Rest\Router;
11+
12+
$router->get('/phpinfo',function(){
13+
phpinfo();
14+
});

Diff for: application/library/Lyla/Common/Autoload.php

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
namespace Lyla\Common;
4+
5+
class Autoload
6+
{
7+
protected static $instance;
8+
9+
protected function __construct()
10+
{
11+
}
12+
13+
public function getInstance()
14+
{
15+
if(!self::$instance){
16+
self::$instance = new self;
17+
}
18+
return self::$instance;
19+
}
20+
21+
public function __invoke($className) {
22+
$fileParts = explode('\\', ltrim($className, '\\'));
23+
foreach ($fileParts as $index => $part) {
24+
$fileParts[$index] = ucfirst($part);
25+
}
26+
if (false !== strpos(end($fileParts), '_')) {
27+
array_splice($fileParts, -1, 1, explode('_', current($fileParts)));
28+
}
29+
$fileParts = implode(DIRECTORY_SEPARATOR, $fileParts);
30+
foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) {
31+
$file = $path . DIRECTORY_SEPARATOR . $fileParts . '.php';
32+
if (is_file($file)) {
33+
require $file;
34+
return true;
35+
}
36+
}
37+
return false;
38+
}
39+
}

Diff for: build.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project.basepath=${project.basedir}

Diff for: build.xml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0"?>
2+
<project name="Lyla" default="version">
3+
<property file="build.properties" />
4+
5+
<loadfile property="version" file="VERSION"/>
6+
7+
<target name="version">
8+
<echo msg="Project ${phing.project.name} v.${version}"/>
9+
</target>
10+
11+
<target name="clean">
12+
<delete dir="${project.basepath}"/>
13+
</target>
14+
15+
<target name="mkdir">
16+
<mkdir dir="${project.basepath}/application/library"/>
17+
<mkdir dir="${project.basepath}/application/resources"/>
18+
<mkdir dir="${project.basepath}/application/settings"/>
19+
<mkdir dir="${project.basepath}/bin"/>
20+
<mkdir dir="${project.basepath}/tests"/>
21+
<mkdir dir="${project.basepath}/web/js"/>
22+
<mkdir dir="${project.basepath}/web/css"/>
23+
<mkdir dir="${project.basepath}/web/img"/>
24+
</target>
25+
26+
27+
<target name="deps">
28+
<composer command="install"/>
29+
</target>
30+
31+
</project>

Diff for: composer.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name":"lyla/lyla",
3+
"require":{
4+
"php":">5.4.0",
5+
"monolog/monolog":"1.3.1",
6+
"respect/rest":"0.5.1"
7+
}
8+
}

Diff for: composer.lock

+207
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: composer.phar

658 KB
Binary file not shown.

Diff for: logo_phpsp.png

19.6 KB
Loading

0 commit comments

Comments
 (0)