Overview

Namespaces

  • cli_db
    • propel
      • map
      • om
  • cli_import
  • LoggedPDO
  • None
  • PHP
  • webservices
    • cart
    • combisearch
    • details
      • annotations
        • feature
    • graphs
      • barplot
      • genome
    • listing
    • queue

Classes

  • AbstractTable
  • Acquisition
  • Analysis
  • Assay
  • Biomaterial
  • Contact
  • Feature
  • Organism
  • Protocol
  • Publication
  • Quantification

Interfaces

  • Table
  • Overview
  • Namespace
  • Class
  • Tree

Class AbstractTable

abstract class as parent for tbro-db commands. implements standard behavior for insert, update, delete, list and display subcommands

cli_db\AbstractTable implements CLI_Command, cli_db\Table

Direct known subclasses

cli_db\Acquisition, cli_db\Analysis, cli_db\Assay, cli_db\Biomaterial, cli_db\Contact, cli_db\Feature, cli_db\Organism, cli_db\Protocol, cli_db\Publication, cli_db\Quantification
Abstract
Namespace: cli_db
Located at src/cli/db/classes/AbstractTable.php
Methods summary
public static Console_CommandLine_Command
# CLI_getCommand( Console_CommandLine $parser )

adds a command representing this class to $parser

adds a command representing this class to $parser

Parameters

$parser
Console_CommandLine
$parser

Returns

Console_CommandLine_Command

Implementation of

CLI_Command::CLI_getCommand()
public static nothing
# CLI_checkRequiredOpts( Console_CommandLine_Result $command )

check if all required options have been set by the user

check if all required options have been set by the user

Parameters

$command
Console_CommandLine_Result
$command

Returns

nothing

Throws

Exception
if an option is missing

Implementation of

CLI_Command::CLI_checkRequiredOpts()
public static false
# CLI_execute( Console_CommandLine_Result $command, Console_CommandLine $parser )

execute this command

execute this command

Parameters

$command
Console_CommandLine_Result
$command the command as created by self::CLI_getCommand
$parser
Console_CommandLine
$parser

Returns

false
if subcommand is unknown

Implementation of

CLI_Command::CLI_execute()
public static type
# prepareQueryResult( type $res )

prepare a propel result for displaying with printTable

prepare a propel result for displaying with printTable

Parameters

$res
type
$res PropelObjectCollection|Array[propel\BaseObject]

Returns

type
Array[Array[String]]
public static
# printTable( Array[String] $headers, Array[Array[String]] $data )

print a table

print a table

Parameters

$headers
Array[String]
$headers
$data
Array[Array[String]]
$data
protected static
# command_insert_set_defaults( BaseObject $item )

can be overwritten. is called after filling Propel item, before calling $item->save can be used to satisfy non-null-constraints by setting default values

can be overwritten. is called after filling Propel item, before calling $item->save can be used to satisfy non-null-constraints by setting default values

Parameters

$item
BaseObject
$item
protected static
# setKeys( Array $options, String $keys, BaseObject $cmdname, BaseObject $propelitem )

parsing $keys for paramters, set values from $options in $propelitem.

  • @param Array $options user-specified command line parameters

parsing $keys for paramters, set values from $options in $propelitem.

  • @param Array $options user-specified command line parameters

Parameters

$options
Array
$keys result from self::getKeys()
$keys
String
$cmdname command name to scan keys for
$cmdname
BaseObject
$propelitem propel item to set values
$propelitem
protected static
# command_insert( Array $options, Array $keys )

default insert row command

default insert row command

Parameters

$options
Array
$options user-specified command line parameters
$keys
Array
$keys result from self::getKeys()
protected static
# command_update( Array $options, Array $keys )

default update row command

default update row command

Parameters

$options
Array
$options user-specified command line parameters
$keys
Array
$keys result from self::getKeys()
public static boolean
# command_delete_confirm( Array $options, type $message = "This will delete a row from the database.\n" )

prompts the user to confirm deletion of a row if $option['noconfirm'] is not set

prompts the user to confirm deletion of a row if $option['noconfirm'] is not set

Parameters

$options
Array
$options user-specified command line parameters
$message
type
$message message to promt the user

Returns

boolean
delete or not
protected static
# command_delete( Array $options, Array $keys )

default delete row command

default delete row command

Parameters

$options
Array
$options user-specified command line parameters
$keys
Array
$keys result from self::getKeys()
protected static
# command_details( Array $options, Array $keys )

default show details for row command

default show details for row command

Parameters

$options
Array
$options user-specified command line parameters
$keys
Array
$keys result from self::getKeys()
protected static
# command_list( Array $options, Array $keys )

default list rows command

default list rows command

Parameters

$options
Array
$options user-specified command line parameters
$keys
Array
$keys result from self::getKeys()
Methods inherited from CLI_Command
CLI_commandDescription(), CLI_commandName(), CLI_longHelp()
Methods inherited from cli_db\Table
getKeys(), getPropelClass(), getSubCommands()
tbro API documentation generated by ApiGen 2.8.0