Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Commit

Permalink
Added copyright and license info
Browse files Browse the repository at this point in the history
  • Loading branch information
vimofthevine committed Feb 22, 2010
1 parent 5569364 commit 5091853
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 16 deletions.
19 changes: 19 additions & 0 deletions LICENSE.md
@@ -0,0 +1,19 @@
Copyright (c) 2010 Kyle Treubig

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
8 changes: 6 additions & 2 deletions classes/grid.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Grid modeling library for creating data tables
* @author Kyle Treubig
* Grid modeling library for creating data tables
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
class Grid extends Grid_Core { }

8 changes: 6 additions & 2 deletions classes/grid/column.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Grid column model base class
* @author Kyle Treubig
* Grid column model base class
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
abstract class Grid_Column {

Expand Down
8 changes: 6 additions & 2 deletions classes/grid/column/action.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Action column for Grid library
* @author Kyle Treubig
* Action column for the Grid library
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
class Grid_Column_Action extends Grid_Column {

Expand Down
8 changes: 6 additions & 2 deletions classes/grid/column/date.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Date column for Grid library
* @author Kyle Treubig
* Date column for Grid library
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
class Grid_Column_Date extends Grid_Column {

Expand Down
8 changes: 6 additions & 2 deletions classes/grid/column/radio.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Radio column for Grid library
* @author Kyle Treubig
* Radio column for Grid library
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
class Grid_Column_Radio extends Grid_Column {

Expand Down
8 changes: 6 additions & 2 deletions classes/grid/column/text.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Text column for Grid library
* @author Kyle Treubig
* Text column for Grid library
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
class Grid_Column_Text extends Grid_Column {

Expand Down
13 changes: 11 additions & 2 deletions classes/grid/core.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Grid modeling library for creating data tables
* @author Kyle Treubig
* Grid modeling library for creating data tables
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
class Grid_Core {

Expand All @@ -16,6 +20,7 @@ class Grid_Core {
/**
* Add a column to the table
* @param type [optional] column type
* @return Grid_Column object
*/
public function &column($type='text') {
$model = 'Grid_Column_' . ucfirst($type);
Expand All @@ -29,6 +34,7 @@ public function &column($type='text') {
/**
* Add an action link to the table
* @param type [optional] link type
* @return Grid_Link object
*/
public function &link($type='text') {
$link = new Grid_Link($type);
Expand All @@ -41,6 +47,7 @@ public function &link($type='text') {
/**
* Add data to the table
* @param resource array of data objects
* @return Grid object
*/
public function data($resource) {
$dataset = array();
Expand All @@ -54,6 +61,8 @@ public function data($resource) {

/**
* Render the table as an HTML string
* @param view [optional] view file
* @return string
*/
public function render($view = 'grid/table') {
$view = View::factory($view);
Expand Down
10 changes: 8 additions & 2 deletions classes/grid/link.php
@@ -1,8 +1,12 @@
<?php defined('SYSPATH') or die('No direct access allowed.');

/**
* @brief Grid table action link model
* @author Kyle Treubig
* Grid table action link model
*
* @package Grid
* @author Kyle Treubig
* @copyright (C) 2010 Kyle Treubig
* @license MIT
*/
class Grid_Link {

Expand All @@ -26,6 +30,7 @@ public function __construct($type='text') {
* through method calls
* @param name variable name
* @param value variable value
* @return Grid_Link object
*/
public function __call($name, $value) {
if ((isset($this->$name)) OR ($this->$name === null)) {
Expand All @@ -36,6 +41,7 @@ public function __call($name, $value) {

/**
* Render the link as an HTML string
* @return string
*/
public function render() {
switch($this->type) {
Expand Down

0 comments on commit 5091853

Please sign in to comment.