Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • AutomaticTranslationCommand
  • ConsoleFormatterUtil
  • CronCommand
  • CryptSetupCommand
  • DummyCommand
  • ExportFixtureCommand
  • MigrateCustomCommand
  • SampleDataCommand
  • UpdateCommand
  • UpdaterPackageCommand
  • Overview
  • Package
  • Class
  • Tree

Class ExportFixtureCommand

Exports a table in the live database (or a range of records in it) to a fixture/init script

CComponent
Extended by CConsoleCommand
Extended by ExportFixtureCommand
Package: application\commands
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/commands/ExportFixtureCommand.php
Methods summary
public
# errorMessage( mixed $spec, mixed $arg )
public
# formatRecord( mixed $data, mixed $alias = null )
public
# validInput( mixed $arg_in, mixed $validator )
public
# actionInteractive( array $args )

Export the contents of a table in the live database as a fixture or init script.

Export the contents of a table in the live database as a fixture or init script.

Usage: ./yiic exportfixture interactive [table name] [f|i] [range] [columns] [o|r]

Parameters

$args
array
$args
public
# actionExport( mixed $tableName, mixed $type = 'f', mixed $range = 1, mixed $columns = '*', mixed $writeCond = 's', array $aliases = array () )

Non-interactive fixture export with option to specify aliases as command line args

Non-interactive fixture export with option to specify aliases as command line args

Methods inherited from CConsoleCommand
__construct(), afterAction(), beforeAction(), behaviors(), buildFileList(), confirm(), copyFiles(), ensureDirectory(), getCommandRunner(), getHelp(), getName(), getOptionHelp(), init(), onAfterAction(), onBeforeAction(), pluralize(), prompt(), renderFile(), resolveRequest(), run(), usageError()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public array $args array( 0 => array( 'tableName', 'table name', null, '$pass = array_key_exists($arg_in, Yii::app()->db->schema->tables);', "Table doesn't exist" ), 1 => array( 'type', 'fixture (f) or init script (i)', 'f', '$pass = in_array($arg_in, array("i", "f"));', 'Must be "i" or "f"' ), 2 => array( 'range', '"WHERE" clause', '1', '$pass=($arg_in != null);', 'cannot be null' ), 3 => array( 'columns', 'table columns to include', '*', '$pass=($arg_in != null);', 'cannot be null' ), 4 => array( 'writeCond', 'overwrite (o), rename existing (r), output to stdout (s), output to file ([filename])', 's', '$pass=true;', '', //'$pass=in_array($arg_in, array("o","r","s"));', //'Must be "o", "r", or "s"' ), )
#

Specification for the command line arguments.

Each entry takes this form: array(
[local var name],
[command line description],
[default value],
[validation expression],
[validation error message] )

Specification for the command line arguments.

Each entry takes this form: array( [local var name], [command line description], [default value], [validation expression], [validation error message] )

public mixed $fixtureDir
#
Properties inherited from CConsoleCommand
$defaultAction
Magic properties inherited from CConsoleCommand
$commandRunner, $help, $name, $optionHelp
X2CRM Documentation API documentation generated by ApiGen 2.8.0