Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Database\Concerns;
4
 
5
trait ParsesSearchPath
6
{
7
    /**
8
     * Parse the Postgres "search_path" configuration value into an array.
9
     *
10
     * @param  string|array|null  $searchPath
11
     * @return array
12
     */
13
    protected function parseSearchPath($searchPath)
14
    {
15
        if (is_string($searchPath)) {
16
            preg_match_all('/[^\s,"\']+/', $searchPath, $matches);
17
 
18
            $searchPath = $matches[0];
19
        }
20
 
21
        return array_map(function ($schema) {
22
            return trim($schema, '\'"');
23
        }, $searchPath ?? []);
24
    }
25
}