symfony API

sfProjectConfiguration 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:

sfProjectConfiguration represents a configuration for a symfony project.

Method Summary

  • disablePlugins($plugins)
    Disables a plugin.
  • enableAllPluginsExcept($plugins)
    Enabled all installed plugins except the one given as argument.
  • enablePlugins($plugins)
    Enables a plugin or a list of plugins.
  • sfProjectConfiguration getActive()
    Returns the active configuration.
  • array getAllPluginPaths()
    Returns an array of paths for all available plugins.
  • sfApplicationConfiguration getApplicationConfiguration($application, $environment, $debug, $rootDir, $dispatcher)
    Returns a sfApplicationConfiguration configuration for a given application.
  • array getConfigPaths($configPath)
    Gets the configuration file paths for a given relative configuration path.
  • sfEventDispatcher getEventDispatcher()
    Returns the event dispatcher.
  • array getGeneratorSkeletonDirs($class, $theme)
    Gets directories where the skeleton is stored for a generator class and a specific theme.
  • string getGeneratorTemplate($class, $theme, $path)
    Gets the template to use for a generator class.
  • array getGeneratorTemplateDirs($class, $theme)
    Gets directories where template files are stored for a generator class and a specific theme.
  • array getModelDirs()
    Gets directories where model classes are stored. The order of returned paths is lowest precedence
  • sfPluginConfiguration getPluginConfiguration($name)
    Returns the configuration for the requested plugin.
  • array getPluginPaths()
    Gets the paths to plugins root directories, minding overloaded plugins.
  • array getPlugins()
    Gets the list of enabled plugins.
  • array getPluginSubPaths($subPath)
    Gets the paths plugin sub-directories, minding overloaded plugins.
  • string getRootDir()
    Returns the project root directory.
  • string getSymfonyLibDir()
    Returns the symfony lib directory.
  • string guessRootDir()
    Guesses the project root directory.
  • boolean hasActive()
    Returns true if these is an active configuration.
  • loadPlugins()
    Loads the project's plugin configurations.
  • setCacheDir($cacheDir)
    Sets the cache root directory.
  • setLogDir($logDir)
    Sets the log directory.
  • setPluginPath($plugin, $path)
    Manually sets the location of a particular plugin.
  • setPlugins($plugins)
    Sets the enabled plugins.
  • setRootDir($rootDir)
    Sets the project root directory.
  • setup()
    Setups the current configuration.
  • setupPlugins()
    Sets up plugin configurations.
  • setWebDir($webDir)
    Sets the web root directory.
  • mixed __call($method, $arguments)
    Calls methods defined via sfEventDispatcher.
  • __construct($rootDir, $dispatcher)
    Constructor.

Method Details

  • disablePlugins ($plugins) Browse code

    $plugins A plugin name or a plugin list

    Disables a plugin.

    throws LogicException If plugins have already been loaded

  • enableAllPluginsExcept ($plugins) Browse code

    $plugins A plugin name or a plugin list

    Enabled all installed plugins except the one given as argument.

    throws LogicException If plugins have already been loaded

  • enablePlugins ($plugins) Browse code

    $plugins A plugin name or a plugin list

    Enables a plugin or a list of plugins.

  • (sfProjectConfiguration) getActive () Browse code

    Returns the active configuration.

    returns The current sfProjectConfiguration instance

  • (array) getAllPluginPaths () Browse code

    Returns an array of paths for all available plugins.

  • (sfApplicationConfiguration) getApplicationConfiguration ($application, $environment, $debug, $rootDir, $dispatcher) Browse code

    $application An application name
    $environment The environment name
    $debug true to enable debug mode
    $rootDir The project root directory
    $dispatcher An event dispatcher

    Returns a sfApplicationConfiguration configuration for a given application.

    returns A sfApplicationConfiguration instance

  • (array) getConfigPaths ($configPath) Browse code

    $configPath The configuration path

    Gets the configuration file paths for a given relative configuration path.

    returns An array of paths

  • (sfEventDispatcher) getEventDispatcher () Browse code

    Returns the event dispatcher.

    returns A sfEventDispatcher instance

  • (array) getGeneratorSkeletonDirs ($class, $theme) Browse code

    $class The generator class name
    $theme The theme name

    Gets directories where the skeleton is stored for a generator class and a specific theme.

    returns An array of directories

  • (string) getGeneratorTemplate ($class, $theme, $path) Browse code

    $class The generator class name
    $theme The theme name
    $path The template path

    Gets the template to use for a generator class.

    returns A template path

    throws sfException

  • (array) getGeneratorTemplateDirs ($class, $theme) Browse code

    $class The generator class name
    $theme The theme name

    Gets directories where template files are stored for a generator class and a specific theme.

    returns An array of directories

  • (array) getModelDirs () Browse code

    Gets directories where model classes are stored. The order of returned paths is lowest precedence

    to highest precedence.

    returns An array of directories

  • (sfPluginConfiguration) getPluginConfiguration ($name) Browse code

    Returns the configuration for the requested plugin.

  • (array) getPluginPaths () Browse code

    Gets the paths to plugins root directories, minding overloaded plugins.

    returns The plugin root paths.

    throws InvalidArgumentException If an enabled plugin does not exist

  • (array) getPlugins () Browse code

    Gets the list of enabled plugins.

    returns An array of enabled plugins

  • (array) getPluginSubPaths ($subPath) Browse code

    $subPath The subdirectory to look for

    Gets the paths plugin sub-directories, minding overloaded plugins.

    returns The plugin paths.

  • (string) getRootDir () Browse code

    Returns the project root directory.

    returns The project root directory

  • (string) getSymfonyLibDir () Browse code

    Returns the symfony lib directory.

    returns The symfony lib directory

  • (string) guessRootDir () Browse code

    Guesses the project root directory.

    returns The project root directory

  • (boolean) hasActive () Browse code

    Returns true if these is an active configuration.

  • loadPlugins () Browse code

    Loads the project's plugin configurations.

  • setCacheDir ($cacheDir) Browse code

    $cacheDir The absolute path to the cache dir.

    Sets the cache root directory.

  • setLogDir ($logDir) Browse code

    $logDir The absolute path to the log dir.

    Sets the log directory.

  • setPluginPath ($plugin, $path) Browse code

    Manually sets the location of a particular plugin.


    This method can be used to ease functional testing of plugins. It is not
    intended to support sharing plugins between projects, as many plugins
    save project specific code (to /lib/form/base, for example).

  • setPlugins ($plugins) Browse code

    $plugins An array of plugin names

    Sets the enabled plugins.

    throws LogicException If plugins have already been loaded

  • setRootDir ($rootDir) Browse code

    $rootDir The project root directory

    Sets the project root directory.

  • setup () Browse code

    Setups the current configuration.


    Override this method if you want to customize your project configuration.

  • setupPlugins () Browse code

    Sets up plugin configurations.


    Override this method if you want to customize plugin configurations.

  • setWebDir ($webDir) Browse code

    $webDir The absolute path to the web dir.

    Sets the web root directory.

  • (mixed) __call ($method, $arguments) Browse code

    $method The method name
    $arguments The method arguments

    Calls methods defined via sfEventDispatcher.

    returns The returned value of the called method

  • __construct ($rootDir, $dispatcher) Browse code

    $rootDir The project root directory
    $dispatcher The event dispatcher

    Constructor.