@@ -717,12 +717,13 @@ public function renderHead()
717
717
718
718
/**
719
719
* Register shutdown to display the debug bar
720
- *
720
+ *
721
721
* @param boolean $here Set position of HTML. True if is to current position or false for end file
722
722
* @param boolean $initialize Whether to render the de bug bar initialization code
723
723
* @return string Return "{--DEBUGBAR_OB_START_REPLACE_ME--}" or return an empty string if $here == false
724
724
*/
725
- public function renderOnShutdown ($ here = true , $ initialize = true , $ renderStackedData = true , $ head = false ) {
725
+ public function renderOnShutdown ($ here = true , $ initialize = true , $ renderStackedData = true , $ head = false )
726
+ {
726
727
register_shutdown_function (array ($ this , "replaceTagInBuffer " ), $ here , $ initialize , $ renderStackedData , $ head );
727
728
728
729
if (ob_get_level () === 0 ) {
@@ -732,18 +733,29 @@ public function renderOnShutdown($here = true, $initialize = true, $renderStacke
732
733
return ($ here ) ? self ::REPLACEABLE_TAG : "" ;
733
734
}
734
735
735
- public function renderOnShutdownWithHead ($ here = true , $ initialize = true , $ renderStackedData = true ) {
736
+ /**
737
+ * Same as renderOnShutdown() with $head = true
738
+ *
739
+ * @param boolean $here
740
+ * @param boolean $initialize
741
+ * @param boolean $renderStackedData
742
+ * @return string
743
+ */
744
+ public function renderOnShutdownWithHead ($ here = true , $ initialize = true , $ renderStackedData = true )
745
+ {
736
746
return $ this ->renderOnShutdown ($ here , $ initialize , $ renderStackedData , true );
737
747
}
738
748
739
749
/**
740
750
* Is callback function for register_shutdown_function(...)
741
- *
751
+ *
742
752
* @param boolean $here Set position of HTML. True if is to current position or false for end file
743
753
* @param boolean $initialize Whether to render the de bug bar initialization code
744
754
*/
745
- public function replaceTagInBuffer ($ here = true , $ initialize = true , $ renderStackedData = true , $ head = false ) {
746
- $ render = (($ head )?$ this ->renderHead ():"" ).$ this ->render ($ initialize , $ renderStackedData );
755
+ public function replaceTagInBuffer ($ here = true , $ initialize = true , $ renderStackedData = true , $ head = false )
756
+ {
757
+ $ render = ($ head ? $ this ->renderHead () : "" )
758
+ . $ this ->render ($ initialize , $ renderStackedData );
747
759
748
760
$ current = ($ here && ob_get_level () > 0 ) ? ob_get_clean () : self ::REPLACEABLE_TAG ;
749
761
0 commit comments