Models
[ class tree: Models ] [ index: Models ] [ all elements ]

Source for file Pattern.php

Documentation is available at Pattern.php

  1. <?php
  2. /**
  3.  * Db_User_Pattern
  4.  *
  5.  * Copyright (C) 2009  Mai (Me Artificial Intelligence)
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation, either version 3 of the License, or
  10.  * (at your option) any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19.  *
  20.  * @author Wouter Bulten (wouterbulten@mai-ai.org)
  21.  * @copyright Copyright (C) 2009  Mai (Me Artificial Intelligence)
  22.  * @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
  23.  * @link http://www.launchpad.net/mai
  24.  *
  25.  * @package Models
  26.  * @subpackage Database
  27.  *
  28.  */
  29.  
  30. /**
  31.  * Db_User_Pattern is the table class for the pattern table on the user databse.
  32.  *
  33.  * @author Wouter Bulten (wouterbulten@mai-ai.org)
  34.  * @copyright Copyright (C) 2009  Mai (Me Artificial Intelligence)
  35.  * @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
  36.  * @link http://www.launchpad.net/mai
  37.  *
  38.  * @package Models
  39.  * @subpackage Database
  40.  *
  41.  * @property integer $id 
  42.  * @property integer $user_id 
  43.  * @property string $pattern 
  44.  * @property string|array$pattern_array 
  45.  * 
  46.  */
  47. abstract class Db_User_Pattern extends Doctrine_Record
  48. {
  49.     public function setTableDefinition()
  50.     {
  51.         $this->setTableName('pattern');
  52.         $this->hasColumn('id''integer'4array(
  53.              'primary' => true,
  54.              'autoincrement' => true,
  55.              'type' => 'integer',
  56.              'length' => '4',
  57.              ));
  58.         $this->hasColumn('user_id''integer'4array(
  59.              'type' => 'integer',
  60.              'length' => '4',
  61.              ));
  62.         $this->hasColumn('pattern''string'255array(
  63.              'type' => 'string',
  64.              'notblank' => true,
  65.              'length' => '255',
  66.              ));
  67.         $this->hasColumn('pattern_array''string'255array(
  68.              'type' => 'string',
  69.              'notblank' => true,
  70.              'length' => '255',
  71.              ));
  72.         $this->hasColumn('pattern_response''string'255array(
  73.              'type' => 'string',
  74.              'notblank' => true,
  75.              'length' => '255',
  76.              ));
  77.         $this->hasColumn('pattern_response_array''string'255array(
  78.              'type' => 'string',
  79.              'notblank' => true,
  80.              'length' => '255',
  81.              ));
  82.     }
  83.  
  84. }

Documentation generated on Mon, 27 Jul 2009 19:51:57 +0200 by phpDocumentor 1.4.1