@@ -32,7 +32,7 @@ class Invoker {
3232 *
3333 * @var array<class-string,array<string,string>>>
3434 */
35- private array $ hooks = array ();
35+ private array $ callbacks = array ();
3636
3737 /**
3838 * Uncached handlers.
@@ -99,7 +99,7 @@ public function __construct( protected Factory $factory, Container $container )
9999 $ this ->cache = $ container ->get ( 'app.cache ' );
100100 $ this ->env = $ container ->get ( 'app.env ' );
101101 $ this ->app_id = $ container ->get ( 'app.id ' );
102- $ this ->logger = $ container ->make ( ' app. logger' , array ( ' ctx ' => ' Invoker ' ) );
102+ $ this ->logger = $ container ->logger ( self ::class );
103103
104104 if ( ! $ this ->can_debug () ) {
105105 return ;
@@ -141,7 +141,7 @@ public function debug_output(): void {
141141 }
142142
143143 $ this ->logger ->debug ( 'Handlers ' , $ this ->handlers );
144- $ this ->logger ->debug ( 'Hooks ' , $ this ->hooks );
144+ $ this ->logger ->debug ( 'Hooks ' , $ this ->callbacks );
145145
146146 $ this ->logger ->debug ( 'Application shutdown complete ' );
147147 }
@@ -162,7 +162,7 @@ public function get_handlers(): array {
162162 * @return ($handler is null ? array<class-string,array<string,string>> : array<string,string>)
163163 */
164164 public function get_actions ( ?string $ handler = null ): array {
165- return $ handler ? $ this ->hooks [ $ handler ] ?? array () : $ this ->hooks ;
165+ return $ handler ? $ this ->callbacks [ $ handler ] ?? array () : $ this ->callbacks ;
166166 }
167167
168168 /**
@@ -221,7 +221,7 @@ public function add_handler( Can_Handle $handler, bool $clear = true ): static {
221221 }
222222
223223 if ( $ clear ) {
224- $ this ->hooks [ $ cname ] = array ();
224+ $ this ->callbacks [ $ cname ] = array ();
225225 }
226226
227227 $ this ->handlers [ $ cname ] = $ handler ->is_loaded () ? $ handler ->get_init_hook () : false ;
@@ -413,7 +413,7 @@ private function add_callback( Can_Invoke $cb ): void {
413413 $ id = "{$ cb ->get_method ()}: {$ cb ->get_tag ()}" ;
414414 $ cn = $ cb ->get_classname ();
415415
416- $ this ->hooks [ $ cn ][ $ id ] = $ cb ->is_loaded () ? $ cb ->get_init_hook () : false ;
416+ $ this ->callbacks [ $ cn ][ $ id ] = $ cb ->is_loaded () ? $ cb ->get_init_hook () : false ;
417417 }
418418
419419 /**
0 commit comments