Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
842d1217
Commit
842d1217
authored
Aug 06, 2012
by
katbailey
Browse files
Various coding standards fixes, cleanup and documentation fixes
parent
8ffe09ee
Changes
7
Hide whitespace changes
Inline
Side-by-side
core/includes/bootstrap.inc
View file @
842d1217
...
...
@@ -2632,6 +2632,10 @@ function drupal_language_initialize() {
* directly.
*
* @see Drupal\Core\Language\LanguageManager
*
* @param $type
* The type of language object needed, e.g. LANGUAGE_TYPE_INTERFACE. Passing
* NULL invokes a reset of the statically stored language type objects.
*/
function
language_manager
(
$type
=
NULL
)
{
// Keep track of whether we are in a multilingual environment.
...
...
core/includes/install.core.inc
View file @
842d1217
...
...
@@ -1412,7 +1412,10 @@ function install_bootstrap_full(&$install_state) {
// Clear the module list that was overriden earlier in the process.
// This will allow all freshly installed modules to be loaded.
module_list_reset
();
// @todo Figure out how best to handle the Kernel constructor parameters.
// @todo The constructor parameters for the Kernel class are for environment,
// e.g. 'prod', 'dev', and a boolean indicating whether it is in debug mode.
// Drupal does not currently make use of either of these, though that may
// change with http://drupal.org/node/1537198.
$kernel
=
new
DrupalKernel
(
'prod'
,
FALSE
);
$kernel
->
boot
();
drupal_bootstrap
(
DRUPAL_BOOTSTRAP_FULL
);
...
...
core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterKernelListenersPass.php
View file @
842d1217
...
...
@@ -12,10 +12,8 @@
use
Symfony\Component\DependencyInjection\ContainerBuilder
;
use
Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
;
class
RegisterKernelListenersPass
implements
CompilerPassInterface
{
public
function
process
(
ContainerBuilder
$container
)
{
class
RegisterKernelListenersPass
implements
CompilerPassInterface
{
public
function
process
(
ContainerBuilder
$container
)
{
if
(
!
$container
->
hasDefinition
(
'dispatcher'
))
{
return
;
}
...
...
core/lib/Drupal/Core/DrupalKernel.php
View file @
842d1217
...
...
@@ -15,20 +15,30 @@
/**
* The DrupalKernel class is the core of Drupal itself.
*
* This class is responsible for building the Dependency Injection Container and
* also deals with the registration of bundles. It allows registered bundles to
* add their services to the container. Core provides the CoreBundle, which adds
* the services required for all core subsystems. Each module can then add its
* own bundle, i.e. a subclass of Symfony\Component\HttpKernel\Bundle, to
* register services to the container.
*/
class
DrupalKernel
extends
Kernel
{
/**
* Returns an array of available bundles.
*/
public
function
registerBundles
()
{
$bundles
=
array
(
new
CoreBundle
(),
);
//
TODO:
Remove the necessity of calling system_list() to find out which
//
@todo
Remove the necessity of calling system_list() to find out which
// bundles exist. See http://drupal.org/node/1331486
$modules
=
array_keys
(
system_list
(
'module_enabled'
));
foreach
(
$modules
as
$module
)
{
$camelized
=
ContainerBuilder
::
camelize
(
$module
);
$class
=
"
\
Drupal
\\
{
$module
}
\\
{
$camelized
}
Bundle"
;
$class
=
"Drupal
\\
{
$module
}
\\
{
$camelized
}
Bundle"
;
if
(
class_exists
(
$class
))
{
$bundles
[]
=
new
$class
();
}
...
...
@@ -42,8 +52,8 @@ public function registerBundles() {
*/
protected
function
initializeContainer
()
{
// @todo We should be compiling the container and dumping to php so we don't
// have to recompile every time. There is a separate issue for this, see
// http://drupal.org/node/1668892.
//
have to recompile every time. There is a separate issue for this, see
//
http://drupal.org/node/1668892.
$this
->
container
=
$this
->
buildContainer
();
$this
->
container
->
set
(
'kernel'
,
$this
);
drupal_container
(
$this
->
container
);
...
...
core/lib/Drupal/Core/ExceptionController.php
View file @
842d1217
...
...
@@ -36,8 +36,8 @@ class ExceptionController extends ContainerAware {
* and the name of the method to call, we can't just register it to the DIC
* the regular way.
*
* @todo
:
This probably doesn't belong here, but I'm not sure where would be a
better
* place to put it... in a class of its own?
* @todo This probably doesn't belong here, but I'm not sure where would be a
*
better
place to put it... in a class of its own?
*/
public
static
function
getExceptionListener
(
Container
$container
)
{
$negotiation
=
$container
->
get
(
'content_negotiation'
);
...
...
core/modules/system/tests/http.php
View file @
842d1217
...
...
@@ -37,6 +37,5 @@
drupal_bootstrap
(
DRUPAL_BOOTSTRAP_CODE
);
$kernel
=
new
DrupalKernel
(
'prod'
,
FALSE
);
$kernel
->
boot
();
$response
=
$kernel
->
handle
(
$request
)
->
prepare
(
$request
)
->
send
();
$kernel
->
terminate
(
$request
,
$response
);
core/modules/system/tests/https.php
View file @
842d1217
...
...
@@ -36,6 +36,5 @@
drupal_bootstrap
(
DRUPAL_BOOTSTRAP_CODE
);
$kernel
=
new
DrupalKernel
(
'prod'
,
FALSE
);
$kernel
->
boot
();
$response
=
$kernel
->
handle
(
$request
)
->
prepare
(
$request
)
->
send
();
$kernel
->
terminate
(
$request
,
$response
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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