protected function _extractFinder($options) { $type = !empty($options['finder']) ? $options['finder'] : 'all'; unset($options['finder'], $options['maxLimit']); if (is_array($type)) { $options = (array) current($type) + $options; $type = key($type); } return [$type, $options]; }