DataSift\Storyplayer\Cli\RuntimeConfigManager::getTable PHP Method

getTable() public method

if the table does not exist, this will create an empty table before returning it to the caller
public getTable ( DataSift\Stone\ObjectLib\BaseObject $runtimeConfig, string $tableName ) : DataSift\Stone\ObjectLib\BaseObject
$runtimeConfig DataSift\Stone\ObjectLib\BaseObject our persistent config
$tableName string the name of the table we want
return DataSift\Stone\ObjectLib\BaseObject
    public function getTable($runtimeConfig, $tableName)
    {
        // normalise!
        $tableName = lcfirst($tableName);
        // find it
        $tables = $this->getAllTables($runtimeConfig);
        if (!isset($tables->{$tableName})) {
            // make sure the caller gets a table
            $tables->{$tableName} = new BaseObject();
        }
        // all done
        return $tables->{$tableName};
    }