Changeset 362 for trunk/Model.php


Ignore:
Timestamp:
Jan 18, 2012, 9:32:07 PM (13 years ago)
Author:
chronos
Message:
  • Upraveno: Doplněny rozšiřující typy s jinou velikostí.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Model.php

    r360 r362  
    11<?php
     2
     3define('PropertyInteger8', 'Integer8');
     4define('PropertyInteger16', 'Integer16');
     5define('PropertyInteger24', 'Integer24');
     6define('PropertyInteger32', 'Integer32');
     7define('PropertyInteger64', 'Integer64');
     8
     9define('PropertyText8', 'Text8');
     10define('PropertyText16', 'Text16');
     11define('PropertyText24', 'Text24');
     12define('PropertyText32', 'Text32');
    213
    314define('PropertyDate', 'Date');
    415define('PropertyTime', 'Time');
    516define('PropertyDateTime', 'DateTime');
    6 define('PropertyText', 'Text');
     17define('PropertyText', 'Text16');
    718define('PropertyString', 'String');
    819define('PropertyBoolean', 'Boolean');
    9 define('PropertyInteger', 'Integer');
     20define('PropertyInteger', 'Integer32');
    1021define('PropertyFloat', 'Float');
     22define('PropertyDouble', 'Double');
    1123define('PropertyOneToMany', 'OneToMany');
    1224define('PropertyManyToOne', 'ManyToOne');
    1325define('PropertyManyToMany', 'ManyToMany');
     26
    1427
    1528class Model
     
    5669  }
    5770
     71  function AddPropertyText8($Name)
     72  {     
     73    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyText8);
     74  }
     75
     76  function AddPropertyText16($Name)
     77  {     
     78    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyText16);
     79  }
     80
     81  function AddPropertyText24($Name)
     82  {     
     83    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyText24);
     84  }
     85
     86  function AddPropertyText32($Name)
     87  {     
     88    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyText32);
     89  }
     90
    5891  function AddPropertyString($Name)
    5992  {     
     
    6699  }
    67100
    68     function AddPropertyFloat($Name)
     101  function AddPropertyInteger8($Name)
     102  {     
     103    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyInteger8);
     104  }
     105
     106  function AddPropertyInteger16($Name)
     107  {     
     108    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyInteger16);
     109  }
     110
     111  function AddPropertyInteger24($Name)
     112  {     
     113    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyInteger24);
     114  }
     115
     116  function AddPropertyInteger32($Name)
     117  {     
     118    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyInteger32);
     119  }
     120
     121  function AddPropertyInteger64($Name)
     122  {     
     123    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyInteger64);
     124  }
     125
     126  function AddPropertyFloat($Name)
    69127  {     
    70128    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyFloat);
     129  }
     130
     131  function AddPropertyDouble($Name)
     132  {     
     133    $this->Properties[] = array('Name' => $Name, 'Type' => PropertyDouble);
    71134  }
    72135
Note: See TracChangeset for help on using the changeset viewer.