src/EntityManagerFactory.php
private function hasValidMasterSlaveConfig(array $driverConfig)
    {
        if (!isset($driverConfig['read'])) {
            throw new \InvalidArgumentException("Parameter 'read' must be set for read/write config.");
        }

        $slaves = $driverConfig['read'];

        if (!is_array($slaves) || in_array(false, array_map('is_array', $slaves))) {
            throw new \InvalidArgumentException("Parameter 'read' must be an array containing multiple arrays.");
        }

        if (($key = array_search(0, array_map('count', $slaves))) !== false) {
            throw new \InvalidArgumentException("Parameter 'read' config no. {$key} is empty.");
        }
    }
private function hasValidMasterSlaveConfig(array $driverConfig)
    {
        if (!isset($driverConfig['read'])) {
            throw new \InvalidArgumentException("Parameter 'read' must be set for read/write config.");
        }

        $slaves = $driverConfig['read'];

        if (!is_array($slaves) || in_array(false, array_map('is_array', $slaves))) {
            throw new \InvalidArgumentException("Parameter 'read' must be an array containing multiple arrays.");
        }

        if (($key = array_search(0, array_map('count', $slaves))) !== false) {
            throw new \InvalidArgumentException("Parameter 'read' config no. {$key} is empty.");
        }
    }
private function hasValidMasterSlaveConfig ( array $ driverConfig ) { if ( ! isset ( $ driverConfig [ 'read' ] ) ) { throw new \ InvalidArgumentException ( "Parameter 'read' must be set for read/write config." ) ; } $ slaves = $ driverConfig [ 'read' ] ; if ( ! is_array ( $ slaves ) || in_array ( false , array_map ( 'is_array' , $ slaves ) ) ) { throw new \ InvalidArgumentException ( "Parameter 'read' must be an array containing multiple arrays." ) ; } if ( ( $ key = array_search ( 0 , array_map ( 'count' , $ slaves ) ) ) !== false ) { throw new \ InvalidArgumentException ( "Parameter 'read' config no. {$key} is empty." ) ; } }
Check if slave configuration is valid.

@param array $driverConfig
Check if slave configuration is valid .