Overview

Namespaces

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

Classes

  • Console_CommandLine_Action_ExtendedHelp
  • LightOpenID
  • Log_firebugJSON
  • WebService

Interfaces

  • CLI_Command

Functions

  • acquire_database
  • cli_error_handler
  • connect_queue_db
  • create_job
  • display_feature
  • display_feature_by_id
  • display_isoform_by_id
  • display_unigene_by_id
  • download
  • execute_command
  • execute_job
  • execute_query_dir
  • get_db_connection
  • get_job_results
  • get_program_databases
  • myErrorHandler
  • pdo_connect
  • report_results_cleanup
  • requestVal
  • smarty_function_call_webservice
  • smarty_function_dbxreflink
  • smarty_function_interprolink
  • smarty_function_publink
  • smarty_modifier_clean_id
  • split_fasta
  • unzip
  • Overview
  • Namespace
  • Function
  • Tree
 1: #!/usr/bin/php
 2: <?php
 3: require_once '${config_dir}/config.php';
 4: require_once '${config_dir}/cvterms.php';
 5: 
 6: require_once __DIR__.'/db.php';
 7: 
 8: if (in_array('--tables', $argv))
 9:     execute_query_dir('tables');
10: if (in_array('--functions', $argv))
11:     execute_query_dir('functions');
12: if (in_array('--mat_views', $argv))
13:     execute_query_dir('materialized_views');
14: 
15: function execute_query_dir($subdirname) {
16:     global $db;
17:     $dirname = __DIR__ . DIRECTORY_SEPARATOR . $subdirname . DIRECTORY_SEPARATOR;
18:     foreach (new DirectoryIterator($dirname) as $file) {
19:         if (!is_file($dirname . $file))
20:             continue;
21:         $unprepared = file_get_contents($dirname . $file);
22:         $prepared = preg_replace_callback("/\{PHPCONST\('(.*)'\)\}/", function($c) {
23:                     return constant($c[1]);
24:                 }, $unprepared);
25: 
26:         $queries = explode('--NEWCMD--', $prepared);
27: 
28:         foreach ($queries as $query) {
29:             echo $query . "\n\n";
30:             $db->query($query);
31:         }
32:     }
33: }
34: ?>
35: 
tbro API documentation generated by ApiGen 2.8.0