Source for file Index.php

Documentation is available at Index.php

  1. <?php
  2. /*
  3.  *  $Id$
  4.  *
  5.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  6.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  7.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  8.  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  9.  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  10.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  11.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  12.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  13.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  14.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  15.  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16.  *
  17.  * This software consists of voluntary contributions made by many individuals
  18.  * and is licensed under the LGPL. For more information, see
  19.  * <http://www.phpdoctrine.com>.
  20.  */
  21.  
  22. /**
  23.  * Doctrine_File_Index
  24.  *
  25.  * @author      Konsta Vesterinen <kvesteri@cc.hut.fi>
  26.  * @package     Doctrine
  27.  * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
  28.  * @version     $Revision$
  29.  * @category    Object Relational Mapping
  30.  * @link        www.phpdoctrine.com
  31.  * @since       1.0
  32.  */
  33. {
  34.     public function setTableDefinition()
  35.     {
  36.         $this->hasColumn('keyword''string'255array('notnull' => true,
  37.                                                          'primary' => true));
  38.                                                          
  39.         $this->hasColumn('field''string'50array('notnull' => true,
  40.                                                       'primary' => true));
  41.  
  42.         $this->hasColumn('position''string'255array('notnull' => true,
  43.                                                           'primary' => true));
  44.                                                           
  45.         $this->hasColumn('file_id''integer'8array('notnull' => true,
  46.                                                         'primary' => true));
  47.     }
  48.     public function setUp()
  49.     {
  50.         $this->hasOne('Doctrine_File'array('local' => 'file_id',
  51.                                              'foreign' => 'id',
  52.                                              'onDelete' => 'CASCADE',
  53.                                              'onUpdate' => 'CASCADE'));
  54.     }
  55. }