Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f1c5a82

Browse files
committed
Merge branch '4.0'
2 parents 6d5f8d2 + a31c164 commit f1c5a82

3 files changed

Lines changed: 26 additions & 6 deletions

File tree

src/Illuminate/Cache/CacheManager.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CacheManager extends Manager {
1111
*/
1212
protected function createApcDriver()
1313
{
14-
return $this->repository(new ApcStore(new ApcWrapper));
14+
return $this->repository(new ApcStore(new ApcWrapper, $this->getPrefix()));
1515
}
1616

1717
/**
@@ -47,7 +47,7 @@ protected function createMemcachedDriver()
4747

4848
$memcached = $this->app['memcached.connector']->connect($servers);
4949

50-
return $this->repository(new MemcachedStore($memcached, $this->app['config']['cache.prefix']));
50+
return $this->repository(new MemcachedStore($memcached, $this->getPrefix()));
5151
}
5252

5353
/**
@@ -57,7 +57,7 @@ protected function createMemcachedDriver()
5757
*/
5858
protected function createWincacheDriver()
5959
{
60-
return $this->repository(new WinCacheStore($this->app['config']['cache.prefix']));
60+
return $this->repository(new WinCacheStore($this->getPrefix()));
6161
}
6262

6363
/**
@@ -69,7 +69,7 @@ protected function createRedisDriver()
6969
{
7070
$redis = $this->app['redis'];
7171

72-
return $this->repository(new RedisStore($redis, $this->app['config']['cache.prefix']));
72+
return $this->repository(new RedisStore($redis, $this->getPrefix()));
7373
}
7474

7575
/**
@@ -88,7 +88,7 @@ protected function createDatabaseDriver()
8888
// is being used by multiple applications although this is very unlikely.
8989
$table = $this->app['config']['cache.table'];
9090

91-
$prefix = $this->app['config']['cache.prefix'];
91+
$prefix = $this->getPrefix();
9292

9393
return $this->repository(new DatabaseStore($connection, $encrypter, $table, $prefix));
9494
}
@@ -105,6 +105,16 @@ protected function getDatabaseConnection()
105105
return $this->app['db']->connection($connection);
106106
}
107107

108+
/**
109+
* Get the cache "prefix" value.
110+
*
111+
* @return string
112+
*/
113+
public function getPrefix()
114+
{
115+
return $this->app['config']['cache.prefix'];
116+
}
117+
108118
/**
109119
* Create a new cache repository with the given implementation.
110120
*

src/Illuminate/Routing/UrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ protected function getRootUrl($scheme)
286286
*/
287287
public function isValidUrl($path)
288288
{
289-
if (starts_with($path, array('#', '//'))) return true;
289+
if (starts_with($path, array('#', '//', 'mailto:', 'tel:'))) return true;
290290

291291
return filter_var($path, FILTER_VALIDATE_URL) !== false;
292292
}

src/Illuminate/Support/MessageBag.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,16 @@ public function setFormat($format = ':message')
222222
$this->format = $format;
223223
}
224224

225+
/**
226+
* Determine if the message bag has any messages.
227+
*
228+
* @return bool
229+
*/
230+
public function isEmpty()
231+
{
232+
return $this->any();
233+
}
234+
225235
/**
226236
* Determine if the message bag has any messages.
227237
*

0 commit comments

Comments
 (0)