symfony API

sfDoctrineBaseTask Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.3 version. Switch to:

Base class for all symfony Doctrine tasks.

Method Summary

  • callDoctrineCli($task, $args)
    Calls a Doctrine CLI command.
  • array canonicalizeModelDefinition($model, $definition)
    Canonicalizes a model definition in preparation for merging.
  • array filterSchemaGlobals($models)
    Removes and returns globals from the supplied array of models.
  • array getCliConfig()
    Returns an array of configuration variables for the Doctrine CLI.
  • array getDoctrineDatabases($databaseManager, $names)
    Returns Doctrine databases from the supplied database manager.
  • string prepareSchemaFile()
    Merges all project and plugin schema files into one.

Methods inherited from sfBaseTask

checkAppExists , checkModuleExists , checkProjectExists , createConfiguration , createTask , disablePlugin , doRun , enablePlugin , getFilesystem , getFirstApplication , getPluginManager , initializeAutoload , installDir , reloadAutoload , reloadTasks , replaceTokens , setConfiguration

Methods inherited from sfCommandApplicationTask

createTask , getMailer , getRouting , initializeMailer , initializeRouting , log , logSection , runTask , setCommandApplication

Methods inherited from sfTask

addArgument , addArguments , addOption , addOptions , ask , askAndValidate , askConfirmation , asXml , configure , doRun , execute , getAliases , getArguments , getBriefDescription , getDetailedDescription , getFormatter , getFullName , getName , getNamespace , getOptions , getSynopsis , initialize , log , logBlock , logSection , process , run , runFromCLI , setFormatter , strlen , __construct

Method Details

  • callDoctrineCli ($task, $args) Browse code

    $task Name of the Doctrine task to call
    $args Arguments for the task

    Calls a Doctrine CLI command.

  • (array) canonicalizeModelDefinition ($model, $definition) Browse code

    $model The model name
    $definition The model definition

    Canonicalizes a model definition in preparation for merging.

    returns The canonicalized model definition

  • (array) filterSchemaGlobals ($models) Browse code

    $models An array of model definitions

    Removes and returns globals from the supplied array of models.

    returns An array of globals

  • (array) getCliConfig () Browse code

    Returns an array of configuration variables for the Doctrine CLI.

    returns $config

  • (array) getDoctrineDatabases ($databaseManager, $names) Browse code

    $names An array of names or NULL for all databases

    Returns Doctrine databases from the supplied database manager.

    returns An associative array of {@link sfDoctrineDatabase} objects and their names

    throws InvalidArgumentException If a requested database is not a Doctrine database

  • (string) prepareSchemaFile () Browse code

    Merges all project and plugin schema files into one.


    Schema files are merged similar to how other configuration files are in
    symfony, utilizing a configuration cascade. Files later in the cascade
    can change values from earlier in the cascade.

    The order in which schema files are processed is like so:

    1. Plugin schema files
    * Plugins are processed in the order which they were enabled in ProjectConfiguration
    * Each plugin's schema files are processed in alphabetical order
    2. Project schema files
    * Project schema files are processed in alphabetical order

    A schema file is any file saved in a plugin or project's config/doctrine/
    directory that matches the "*.yml" glob.

    returns Absolute path to the consolidated schema file