Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.47 KB

fORMSchema.wiki

File metadata and controls

46 lines (36 loc) · 1.47 KB

Table of Contents

fORMSchema

<<css mode="next" class="sidebar"></css>> (((

Class Resources <<toc></toc>>

 - '''<a href="/docs/fORMSchema">Class Documentation</a>'''
 - <a href="/api/fORMSchema">API Reference</a>
 - <a href="https://github.com/flourishlib/flourish-classes/blob/master/fORMSchema.php" target="_blank">Source Code</a>

<<toc></toc>>

ORM Classes <<toc></toc>>

 - fActiveRecord
 - fRecordSet

 - fORM
 - fORMColumn
 - fORMDatabase
 - fORMDate
 - fORMFile
 - fORMJSON
 - fORMMoney
 - fORMOrdering
 - fORMRelated
 - '''fORMSchema'''
 - fORMValidation

)))

The fORMSchema class provides database schema information to the Flourish ORM. For end-developers the class provides access to a single instance of the fSchema class and allows for simple caching of the schema data.

fSchema Singleton

Since the Flourish ORM bases almost all of its functionality on the schema of the database connected to, an instance of the fSchema class is required for it to properly function. As long as an instance of fDatabase has been properly attached using fORMDatabase, an instance of fSchema will be created and automatically attached to fORMSchema.

If fSchema was extended or for some reason a custom instance needs to be attached, the static method ::attach() will do that.

When writing custom code for the ORM, the fSchema singleton can be access by calling the static method ::retrieve().