Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Aug 27, 2013
0 parents commit 39f2365
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
/vendor
composer.phar
composer.lock
.DS_Store
12 changes: 12 additions & 0 deletions .travis.yml
@@ -0,0 +1,12 @@
language: php

php:
- 5.3
- 5.4
- 5.5

before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev

script: phpunit
20 changes: 20 additions & 0 deletions composer.json
@@ -0,0 +1,20 @@
{
"name": "adam-wathan/boot-forms",
"description": "Extends Illuminate\\Html\\FormBuilder to provide some Bootstrap specific conveniences",
"authors": [
{
"name": "Adam Wathan",
"email": "adam.wathan@gmail.com"
}
],
"require": {
"php": ">=5.3.0",
"illuminate/support": "4.0.x"
},
"autoload": {
"psr-0": {
"AdamWathan\\BootForms": "src/"
}
},
"minimum-stability": "dev"
}
18 changes: 18 additions & 0 deletions phpunit.xml
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
</phpunit>
7 changes: 7 additions & 0 deletions src/AdamWathan/BootForms/BootFormBuilder.php
@@ -0,0 +1,7 @@
<?php namespace AdamWathan\BootForms;

use Illuminate\Html\FormBuilder;

class BootFormBuilder extends FormBuilder {

}
40 changes: 40 additions & 0 deletions src/AdamWathan/BootForms/BootFormsServiceProvider.php
@@ -0,0 +1,40 @@
<?php namespace AdamWathan\BootForms;

use Illuminate\Support\ServiceProvider;

class BootFormsServiceProvider extends ServiceProvider {

/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
$this->app['bootform'] = $this->app->share(function($app)
{
$form = new BootFormBuilder($app['html'], $app['url'], $app['session']->getToken());

return $form->setSessionStore($app['session']);
});
}

/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return array('bootform');
}

}
12 changes: 12 additions & 0 deletions src/AdamWathan/BootForms/Facades/BootForm.php
@@ -0,0 +1,12 @@
<?php namespace AdamWathan\BootForms\Facades;

class BootForm extends Facade {

/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor() { return 'bootform'; }

}
Empty file added tests/.gitkeep
Empty file.

0 comments on commit 39f2365

Please sign in to comment.