# EnumerationClassPattern.class.php

Go to the documentation of this file.

    00001 <?php
    00002 /***************************************************************************
    00003  *   Copyright (C) 2006-2007 by Konstantin V. Arkhipov                     *
    00004  *                                                                         *
    00005  *   This program is free software; you can redistribute it and/or modify  *
    00006  *   it under the terms of the GNU Lesser General Public License as        *
    00007  *   published by the Free Software Foundation; either version 3 of the    *
    00008  *   License, or (at your option) any later version.                       *
    00009  *                                                                         *
    00010  ***************************************************************************/
    00011
    00015     class EnumerationClassPattern extends BasePattern
    00016     {
    00017         public function daoExists()
    00018         {
    00019             return false;
    00020         }
    00021
    00022         public function tableExists()
    00023         {
    00024             return false;
    00025         }
    00026
    00030         public function build(MetaClass $class)
    00031         {
    00032             $userFile = ONPHP_META_BUSINESS_DIR.$class->getName().EXT_CLASS;
    00033
    00034             if (
    00035                 MetaConfiguration::me()->isForcedGeneration()
    00036                 || !file_exists($userFile)
    00037             )
    00038                 $this->dumpFile(
    00039                     $userFile,
    00040                     Format::indentize(EnumerationClassBuilder::build($class))
    00041                 );
    00042
    00043             return $this;
    00044         }
    00045     }
    00046 ?>