10.04.2018 Views

Doctrine_manual-1-2-en

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 12: YAML Schema Files 208<br />

Below is a table containing the differ<strong>en</strong>t options you can use to customize the building of<br />

models. Notice we use the packagesPrefix, baseClassName and suffix options above.<br />

Name Default Description<br />

packagesPrefix Package What to prefix the middle package models<br />

with.<br />

packagesPath<br />

#models_path#/<br />

packages<br />

Path to write package files.<br />

packagesFolderName packages The name of the folder to put packages in,<br />

inside of the packages path.<br />

g<strong>en</strong>erateBaseClasses true Whether or not to g<strong>en</strong>erate abstract base<br />

models containing the definition and a top<br />

level class which is empty ext<strong>en</strong>ds the base.<br />

g<strong>en</strong>erateTableClasses true<br />

Whether or not to g<strong>en</strong>erate a table class for<br />

each model.<br />

baseClassPrefix Base The prefix to use for g<strong>en</strong>erated base class.<br />

baseClassesDirectory g<strong>en</strong>erated<br />

Name of the folder to g<strong>en</strong>erate the base<br />

class definitions in.<br />

baseTableClassName <strong>Doctrine</strong>_Table The base table class to ext<strong>en</strong>d the other<br />

g<strong>en</strong>erated table classes from.<br />

baseClassName<br />

classPrefix<br />

<strong>Doctrine</strong>_Record Name of the base <strong>Doctrine</strong>_Record class.<br />

The prefix to use on all g<strong>en</strong>erated classes.<br />

classPrefixFiles true Whether or not to use the class prefix for<br />

the g<strong>en</strong>erated file names as well.<br />

pearStyle false Whether or not to g<strong>en</strong>erated PEAR style<br />

class names and file names. This option if<br />

set to true will replace underscores(_) with<br />

the DIRECTORY_SEPARATOR in the path to<br />

the g<strong>en</strong>erated class file.<br />

suffix .php Ext<strong>en</strong>sion for your g<strong>en</strong>erated models.<br />

phpDocSubpackage<br />

phpDocName<br />

phpDocEmail<br />

The phpDoc subpackage name to g<strong>en</strong>erate<br />

in the doc blocks.<br />

The phpDoc author name to g<strong>en</strong>erate in the<br />

doc blocks.<br />

The phpDoc e-mail to g<strong>en</strong>erate in the doc<br />

blocks.<br />

Conclusion<br />

Now that we have learned all about YAML Schema files we are ready to move on to a great<br />

topic regarding Data Validation (page 209). This is an important topic because if you are not<br />

validating user inputted data yourself th<strong>en</strong> we want <strong>Doctrine</strong> to validate data before being<br />

persisted to the database.<br />

----------------- Brought to you by

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!