cvs: pear /DB_DataObject_FormBuilder/examples/classes Category.php Manufacturer.php Product.php formbuilder.ini formbuilder.links.ini
| From: | Markus Wolff | Date: | Mon, 15 Sep 2003 21:08:43 +0000 |
| Subject: | cvs: pear /DB_DataObject_FormBuilder/examples/classes Category.php Manufacturer.php Product.php formbuilder.ini formbuilder.links.ini | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12760@lists.php.net to get a copy of this message | ||
mw21st Mon Sep 15 17:08:43 2003 EDT
Added files:
/pear/DB_DataObject_FormBuilder/examples/classes Category.php
formbuilder.ini
formbuilder.links.ini
Manufacturer.php
Product.php
Log:
Initial commit of FormBuilder examples
Index: pear/DB_DataObject_FormBuilder/examples/classes/Category.php
+++ pear/DB_DataObject_FormBuilder/examples/classes/Category.php
<?php
/**
* Table Definition for category
*/
require_once 'DB/DataObject.php';
class Category extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'category'; // table name
var $category_id; // int(10) not_null primary_key unique_key unsigned
auto_increment
var $title; // string(80) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Category',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
?>
Index: pear/DB_DataObject_FormBuilder/examples/classes/formbuilder.ini
+++ pear/DB_DataObject_FormBuilder/examples/classes/formbuilder.ini
[category]
category_id = 1
title = 2
[category__keys]
category_id = 1
[manufacturer]
manufacturer_id = 1
name = 2
[manufacturer__keys]
manufacturer_id = 1
[product]
product_id = 1
title = 2
article_number = 2
description = 2
manufacturer_ID = 1
category_ID = 1
[product__keys]
product_id = 1
Index: pear/DB_DataObject_FormBuilder/examples/classes/formbuilder.links.ini
+++ pear/DB_DataObject_FormBuilder/examples/classes/formbuilder.links.ini
; This file defines relations between your tables. This is needed for
; automatic combobox building, auto-joins and more. Always keep it up-to-date.
; Format is pretty straightforward:
; [tablename]
; fieldname = targetTableName:targetFieldName
[product]
manufacturer_ID = manufacturer:manufacturer_id
category_ID = category:category_id
Index: pear/DB_DataObject_FormBuilder/examples/classes/Manufacturer.php
+++ pear/DB_DataObject_FormBuilder/examples/classes/Manufacturer.php
<?php
/**
* Table Definition for manufacturer
*/
require_once 'DB/DataObject.php';
class Manufacturer extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'manufacturer'; // table name
var $manufacturer_id; // int(10) not_null primary_key unique_key unsigned
auto_increment
var $name; // string(80) not_null
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return
DB_DataObject::staticGet('Manufacturer',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
// This class does not have the usual 'title' field as globally defined in the
// dataObject.ini file, thus it needs an overriding property so that selectboxes
// can be built correctly from this class.
var $select_display_field = 'name';
}
?>
Index: pear/DB_DataObject_FormBuilder/examples/classes/Product.php
+++ pear/DB_DataObject_FormBuilder/examples/classes/Product.php
<?php
/**
* Table Definition for product
*/
require_once 'DB/DataObject.php';
class Product extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
var $__table = 'product'; // table name
var $product_id; // int(10) not_null primary_key unsigned auto_increment
var $title; // string(80) not_null
var $article_number; // string(40)
var $description; // blob(65535) blob
var $manufacturer_ID; // int(10) not_null multiple_key unsigned
var $category_ID; // int(10) not_null multiple_key unsigned
/* ZE2 compatibility trick*/
function __clone() { return $this;}
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Product',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
?>