Horde_Config::_configSQLSplitRead PHP Метод

_configSQLSplitRead() защищенный Метод

Returns the configuration items for split-read database setups.
protected _configSQLSplitRead ( string $ctx, DomNode $node, string $phptype ) : array
$ctx string The context of the tag.
$node DomNode The DomNode representation of the tag.
$phptype string The SQL backend name.
Результат array An associative array with the split-read SQL configuration tree.
    protected function _configSQLSplitRead($ctx, $node, $phptype)
    {
        if (preg_match('/\\|read$/', $ctx)) {
            return null;
        }
        if ($node) {
            $xpath = new DOMXPath($node->ownerDocument);
        }
        $splitread_fields = $this->configSQL($ctx . '|read');
        $splitread_fields = $splitread_fields['switch']['custom']['fields']['phptype']['switch'][$phptype]['fields'];
        return array('_type' => 'boolean', 'required' => false, 'desc' => 'Split reads to a different server?', 'default' => $this->_default($ctx . '|splitread', $node ? $xpath->evaluate('normalize-space(configswitch[@name="splitread"]/text())', $node) ?: 'false' : 'false'), 'switch' => array('false' => array('desc' => 'Disabled', 'fields' => array()), 'true' => array('desc' => 'Enabled', 'fields' => array('read' => $splitread_fields))));
    }