forked from leftypol/leftypol
CacheDriver: moved to subdirectory
This commit is contained in:
parent
8ee471c868
commit
311a5477f8
8 changed files with 8 additions and 8 deletions
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
namespace Vichan\Data\Driver;
|
||||
|
||||
|
||||
trait CacheDriverTrait {
|
||||
/**
|
||||
* Tries to interpret the uri as a path to a unix socket.
|
||||
*
|
||||
* @param string $uri
|
||||
* @return ?string The path to the socket, null if it cannot be interpreted as such.
|
||||
*/
|
||||
private static function asUnixSocketPath(string $uri): ?string {
|
||||
if (str_starts_with($uri, 'unix:')) {
|
||||
return \substr($uri, 5);
|
||||
} elseif (str_starts_with($uri, ':')) {
|
||||
return \substr($uri, 1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue