Skip to content

Commit ac14237

Browse files
committed
Initial commit
0 parents  commit ac14237

File tree

12 files changed

+149
-0
lines changed

12 files changed

+149
-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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
7+
before_script:
8+
- curl -s http://getcomposer.org/installer | php
9+
- php composer.phar install --dev
10+
11+
script: phpunit

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013 Estanislau Trepat
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Baum
2+
3+
Baum is an implementation of the [Nested Set](http://en.wikipedia.org/wiki/Nested_set_model)
4+
pattern for [Laravel 4's](http://laravel.com/) Eloquent ORM.
5+
6+
## License
7+
8+
Baum is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT)
9+
(See LICENSE file for details).
10+
11+
---
12+
13+
Coded by Estanislau Trepat.

composer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "etrepat/baum",
3+
"type": "library",
4+
"description": "Baum is an implementation of the Nested Set pattern for Eloquent models.",
5+
"keywords": ["nested set", "laravel 4", "eloquent", "database"],
6+
"license": "MIT",
7+
"authors": [
8+
{
9+
"name": "Estanislau Trepat",
10+
"email": "[email protected]",
11+
"homepage": "http://etrepat.com"
12+
}
13+
],
14+
"require": {
15+
"php": ">=5.3.0",
16+
"illuminate/support": "4.0.x",
17+
"illuminate/database": "4.0.x"
18+
},
19+
"require-dev": {
20+
"phpunit/phpunit": "3.7.*"
21+
},
22+
"autoload": {
23+
"psr-0": {
24+
"Baum": "src/"
25+
}
26+
},
27+
"minimum-stability": "dev"
28+
}

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>

src/Baum/BaumServiceProvider.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
namespace Baum;
3+
4+
use Illuminate\Support\ServiceProvider;
5+
6+
class BaumServiceProvider extends ServiceProvider {
7+
8+
/**
9+
* Indicates if loading of the provider is deferred.
10+
*
11+
* @var bool
12+
*/
13+
protected $defer = false;
14+
15+
/**
16+
* Bootstrap the application events.
17+
*
18+
* @return void
19+
*/
20+
public function boot()
21+
{
22+
$this->package('etrepat/baum');
23+
}
24+
25+
/**
26+
* Register the service provider.
27+
*
28+
* @return void
29+
*/
30+
public function register()
31+
{
32+
//
33+
}
34+
35+
/**
36+
* Get the services provided by the provider.
37+
*
38+
* @return array
39+
*/
40+
public function provides()
41+
{
42+
// return array();
43+
return array('node');
44+
}
45+
46+
}

src/Baum/Node.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
namespace Baum;
3+
4+
use Illuminate\Database\Eloquent\Model;
5+
6+
abstract class Node extends Model {
7+
8+
}

src/config/.gitkeep

Whitespace-only changes.

src/lang/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)