Skip to content

Commit 11b1ccf

Browse files
committed
Initial commit
0 parents  commit 11b1ccf

File tree

12 files changed

+441
-0
lines changed

12 files changed

+441
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/vendor
2+
composer.phar
3+
composer.lock
4+
.DS_Store

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
8+
- hhvm
9+
10+
before_script:
11+
- composer self-update
12+
- composer install --prefer-source --no-interaction --dev
13+
14+
script: phpunit

composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "manavo/bootstrap-forms",
3+
"description": "",
4+
"authors": [
5+
{
6+
"name": "Philip Manavopoulos",
7+
"email": "[email protected]"
8+
}
9+
],
10+
"require": {
11+
"php": ">=5.4.0",
12+
"illuminate/support": "4.2.*"
13+
},
14+
"autoload": {
15+
"classmap": [
16+
"src/migrations"
17+
],
18+
"psr-0": {
19+
"Manavo\\BootstrapForms\\": "src/"
20+
}
21+
},
22+
"minimum-stability": "stable"
23+
}

phpunit.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
>
13+
<testsuites>
14+
<testsuite name="Package Test Suite">
15+
<directory suffix=".php">./tests/</directory>
16+
</testsuite>
17+
</testsuites>
18+
</phpunit>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php namespace Manavo\BootstrapForms;
2+
3+
use Illuminate\Html\HtmlServiceProvider as IlluminateHtmlServiceProvider;
4+
5+
class BootstrapFormsServiceProvider extends IlluminateHtmlServiceProvider {
6+
7+
/**
8+
* Indicates if loading of the provider is deferred.
9+
*
10+
* @var bool
11+
*/
12+
protected $defer = false;
13+
14+
/**
15+
* Bootstrap the application events.
16+
*
17+
* @return void
18+
*/
19+
public function boot()
20+
{
21+
$this->package('manavo/bootstrap-forms');
22+
}
23+
24+
/**
25+
* Register the service provider.
26+
*
27+
* @return void
28+
*/
29+
public function registerFormBuilder()
30+
{
31+
$this->app->bindShared('form', function($app)
32+
{
33+
$form = new FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
34+
35+
return $form->setSessionStore($app['session.store']);
36+
});
37+
}
38+
39+
/**
40+
* Get the services provided by the provider.
41+
*
42+
* @return array
43+
*/
44+
public function provides()
45+
{
46+
return array();
47+
}
48+
49+
}

0 commit comments

Comments
 (0)