Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0b292218
Commit
0b292218
authored
Jul 28, 2012
by
Katherine Bailey
Browse files
Addressing some documentation and code style issues
parent
5d8b06a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/includes/path.inc
View file @
0b292218
...
...
@@ -218,8 +218,11 @@ function drupal_cache_system_paths() {
// after we have left the scope of the Request, the call to current_path()
// here does not return the system path, and instead calls out to
// _current_path(), which returns the alias. So the alias gets used as the
// key instead. There is a separate issue for fixing up the path alias logic
// here: http://drupal.org/node/1269742
// key instead. At lookup time, whether the alias or the source is used as
// the key depends on when the first call to url() is made for that path.
// If this is within the request scope, it uses the system_path and so will
// be a cache miss. There is a separate issue for fixing up the path alias
// logic here: http://drupal.org/node/1269742
// Generate a cache ID (cid) specifically for this page.
$cid
=
current_path
();
...
...
@@ -369,6 +372,8 @@ function current_path() {
if
(
drupal_container
()
->
has
(
'request'
))
{
return
drupal_container
()
->
get
(
'request'
)
->
attributes
->
get
(
'system_path'
);
}
// If we are outside the request scope, e.g. during $kernel->terminate, fall
// back to using the path stored in _current_path().
return
_current_path
();
}
...
...
core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterKernelListenersPass.php
View file @
0b292218
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\Core\DependencyInjection\Compiler
;
use
InvalidArgumentException
;
use
ReflectionClass
;
use
Symfony\Component\DependencyInjection\ContainerBuilder
;
use
Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
;
...
...
@@ -29,7 +30,7 @@ public function process(ContainerBuilder $container)
$refClass
=
new
ReflectionClass
(
$class
);
$interface
=
'Symfony\Component\EventDispatcher\EventSubscriberInterface'
;
if
(
!
$refClass
->
implementsInterface
(
$interface
))
{
throw
new
\
InvalidArgumentException
(
sprintf
(
'Service "%s" must implement interface "%s".'
,
$id
,
$interface
));
throw
new
InvalidArgumentException
(
sprintf
(
'Service "%s" must implement interface "%s".'
,
$id
,
$interface
));
}
$definition
->
addMethodCall
(
'addSubscriberService'
,
array
(
$id
,
$class
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment