symfony API

sfData Class

« Back to API menu

action

addon

cache

config

controller

countable

database

debug

exception

filter

generator

helper

i18n

log

request

response

storage

test

user

util

validator

view

You are currently browsing the symfony documentation for the 1.0 version. Switch to:

This class defines the interface for interacting with data, as well as default implementations.

Inheritence

sfPropelData  <  sfData

Method Summary

  • doLoadData($fixture_files)
    Manages reading all of the fixture data files and loading them into the data source
  • array getFiles($directory_or_file = null)
    Gets a list of one or more *.yml files and returns the list in an array
  • setDeleteCurrentData($boolean)
    Sets a flag to indicate if the current data in the database should be deleted before new data is loaded.
  • loadDataFromArray($data)
    Manages the insertion of data into the data source
  • boolean getDeleteCurrentData()
    Gets the current value of the flag that indicates whether current data is to be deleted or not.
  • doLoadDataFromFile($fixture_file)
    Loads data for the database from a YAML file

Method Details

  • doLoadData ($fixture_files)

    $fixture_files The path names of the YAML data files

    Manages reading all of the fixture data files and loading them into the data source

  • (array) getFiles ($directory_or_file = null)

    $directory_or_file A directory or file name; if null, then defaults to 'sf_data_dir'/fixtures

    Gets a list of one or more *.yml files and returns the list in an array

    returns A list of *.yml files.

    throws sfInitializationException If the directory or file does not exist.

  • setDeleteCurrentData ($boolean)

    $boolean The flag value

    Sets a flag to indicate if the current data in the database should be deleted before new data is loaded.

  • loadDataFromArray ($data)

    $data The data to be inserted into the data source

    Manages the insertion of data into the data source

  • (boolean) getDeleteCurrentData ()

    Gets the current value of the flag that indicates whether current data is to be deleted or not.

  • doLoadDataFromFile ($fixture_file)

    $fixture_file The path to the YAML file.

    Loads data for the database from a YAML file