PHP Class BuildTreeCommand

(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2012 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes ([email protected])
Inheritance: extends CConsoleCommand
Show file Open project: openeyes/openeyes

Public Methods

Method Description
getHelp ( )
getName ( )
run ( $args ) Parse csv files from Google Docs, process them into the right format for MySQL import, and import them.

Protected Methods

Method Description
buildTree ( $snomed, $index ) * recursive function to calculate nested set values
initialiseSnomed ( $snomed ) * checks valid snomed, gets tree data and manages the insert
insertBlock ( string $table, array $columns, array $records ) Insert a block of records into a table.

Method Details

buildTree() protected method

* recursive function to calculate nested set values
protected buildTree ( $snomed, $index )

getHelp() public method

public getHelp ( )

getName() public method

public getName ( )

initialiseSnomed() protected method

* checks valid snomed, gets tree data and manages the insert
protected initialiseSnomed ( $snomed )

insertBlock() protected method

Insert a block of records into a table.
protected insertBlock ( string $table, array $columns, array $records )
$table string
$columns array
$records array

run() public method

Parse csv files from Google Docs, process them into the right format for MySQL import, and import them.
public run ( $args )