[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/propel-generator/classes/propel/phing/ -> AbstractPropelDataModelTask.php (sommaire)

An abstract base Propel task to perform work related to the XML schema file. The subclasses invoke templates to do the actual writing of the resulting files.

Author: Hans Lellelid <hans@xmpl.org> (Propel)
Author: Jason van Zyl <jvanzyl@zenplex.com> (Torque)
Author: Daniel Rall <dlr@finemaltcoding.com> (Torque)
Poids: 635 lignes (20 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 26 fonctions

  getDataModels()
  getDataModelDbMap()
  addSchemaFileset()
  getTargetDatabase()
  setTargetDatabase()
  getTargetPackage()
  setTargetPackage()
  setPackageObjectModel()
  setValidate()
  setXsd()
  setXsl()
  setTemplatePath()
  getTemplatePath()
  setOutputDirectory()
  setDbEncoding()
  getOutputDirectory()
  createMapper()
  getMappedFile()
  getPlatformForTargetDatabase()
  loadDataModels()
  joinDatamodels()
  createContext()
  getPropelProperties()
  getPropelProperty()
  populateContextProperties()
  validate()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

getDataModels()   X-Ref
Return the data models that have been
processed.

return: List data models

getDataModelDbMap()   X-Ref
Return the data model to database name map.

return: Hashtable data model name to database name map.

addSchemaFileset(Fileset $set)   X-Ref
Adds a set of xml schema files (nested fileset attribute).

param: set a Set of xml schema files

getTargetDatabase()   X-Ref
Get the current target database.

return: String target database(s)

setTargetDatabase($v)   X-Ref
Set the current target database. (e.g. mysql, oracle, ..)

param: v target database(s)

getTargetPackage()   X-Ref
Get the current target package.

return: string target PHP package.

setTargetPackage($v)   X-Ref
Set the current target package. This is where generated PHP classes will
live.

param: string $v target PHP package.

setPackageObjectModel($v)   X-Ref
Set the packageObjectModel switch on/off

param: string $v The build.property packageObjectModel

setValidate($v)   X-Ref
Set whether to perform validation on the datamodel schema.xml file(s).

param: boolean $v

setXsd(PhingFile $v)   X-Ref
Set the XSD schema to use for validation of any datamodel schema.xml file(s).

param: $v PhingFile

setXsl(PhingFile $v)   X-Ref
Set the normalization XSLT to use to transform datamodel schema.xml file(s) before validation and parsing.

param: $v PhingFile

setTemplatePath($templatePath)   X-Ref
[REQUIRED] Set the path where Capsule will look
for templates using the file template
loader.

return: void

getTemplatePath()   X-Ref
Get the path where Velocity will look
for templates using the file template
loader.

return: string

setOutputDirectory(PhingFile $outputDirectory)   X-Ref
[REQUIRED] Set the output directory. It will be
created if it doesn't exist.

param: PhingFile $outputDirectory
return: void

setDbEncoding($v)   X-Ref
Set the current target database encoding.

param: v target database encoding

getOutputDirectory()   X-Ref
Get the output directory.

return: string

createMapper()   X-Ref
Nested creator, creates one Mapper for this task.

return: Mapper  The created Mapper type object.

getMappedFile($from)   X-Ref
Maps the passed in name to a new filename & returns resolved File object.

param: string $from
return: PhingFile Resolved File object.

getPlatformForTargetDatabase()   X-Ref
Get the Platform class based on the target database type.

return: Platform Class that implements the Platform interface.

loadDataModels()   X-Ref
Gets all matching XML schema files and loads them into data models for class.

return: void

joinDatamodels($ads)   X-Ref
Joins the datamodels collected from schema.xml files into one big datamodel

This applies only when the the packageObjectModel option is set. We need to
join the datamodels in this case to allow for foreign keys that point to
tables in different packages.

param: array $ads The datamodels to join

createContext()   X-Ref
Creates a new Capsule context with some basic properties set.
(Capsule is a simple PHP encapsulation system -- aka a php "template" class.)

return: Capsule

getPropelProperties()   X-Ref
Fetches the propel.xxx properties from project, renaming the propel.xxx properties to just xxx.

Also, renames any xxx.yyy properties to xxxYyy as PHP doesn't like the xxx.yyy syntax.

return: array Assoc array of properties.

getPropelProperty($name)   X-Ref
Fetches a single propel.xxx property from project, using "converted" property names.

param: string $name Name of property to fetch (in converted CamelCase)
return: string The value of the property (or NULL if not set)

populateContextProperties(Capsule $context)   X-Ref
Adds the propel.xxx properties to the passed Capsule context, changing names to just xxx.

Also, move xxx.yyy properties to xxxYyy as PHP doesn't like the xxx.yyy syntax.

param: Capsule $context

validate()   X-Ref
Checks this class against Basic requrements of any propel datamodel task.




Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7