| @@ 517-536 (lines=20) @@ | ||
| 514 | * |
|
| 515 | * @return string |
|
| 516 | */ |
|
| 517 | public function getLocalFolder() |
|
| 518 | { |
|
| 519 | // what are we doing? |
|
| 520 | $log = Log::usingLog()->startAction("get local folder for host '{$this->args[0]}'"); |
|
| 521 | ||
| 522 | // make sure we have valid host details |
|
| 523 | $hostDetails = $this->getHostDetails(); |
|
| 524 | ||
| 525 | // does it have a folder defined? |
|
| 526 | if (isset($hostDetails->dir)) { |
|
| 527 | $retval = $hostDetails->dir; |
|
| 528 | } |
|
| 529 | else { |
|
| 530 | $retval = getcwd(); |
|
| 531 | } |
|
| 532 | ||
| 533 | // all done |
|
| 534 | $log->endAction($retval); |
|
| 535 | return $retval; |
|
| 536 | } |
|
| 537 | } |
|
| 538 | ||
| @@ 61-80 (lines=20) @@ | ||
| 58 | * |
|
| 59 | * @return object The table from the config |
|
| 60 | */ |
|
| 61 | public function getTable() |
|
| 62 | { |
|
| 63 | // get our table name from the constructor |
|
| 64 | $tableName = $this->args[0]; |
|
| 65 | ||
| 66 | // what are we doing? |
|
| 67 | $log = Log::usingLog()->startAction("get '{$tableName}' table from runtime config"); |
|
| 68 | ||
| 69 | // get the table config |
|
| 70 | $tables = $this->getAllTables(); |
|
| 71 | ||
| 72 | // make sure we have a table |
|
| 73 | if (!isset($tables->$tableName)){ |
|
| 74 | $tables->$tableName = new BaseObject(); |
|
| 75 | } |
|
| 76 | ||
| 77 | // all done |
|
| 78 | $log->endAction(); |
|
| 79 | return $tables->$tableName; |
|
| 80 | } |
|
| 81 | ||
| 82 | public function getGroupFromTable($group) |
|
| 83 | { |
|