~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-includes/Requests/Hooker.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Event dispatcher
 
4
 *
 
5
 * @package Requests
 
6
 * @subpackage Utilities
 
7
 */
 
8
 
 
9
/**
 
10
 * Event dispatcher
 
11
 *
 
12
 * @package Requests
 
13
 * @subpackage Utilities
 
14
 */
 
15
interface Requests_Hooker {
 
16
        /**
 
17
         * Register a callback for a hook
 
18
         *
 
19
         * @param string $hook Hook name
 
20
         * @param callback $callback Function/method to call on event
 
21
         * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
 
22
         */
 
23
        public function register($hook, $callback, $priority = 0);
 
24
 
 
25
        /**
 
26
         * Dispatch a message
 
27
         *
 
28
         * @param string $hook Hook name
 
29
         * @param array $parameters Parameters to pass to callbacks
 
30
         * @return boolean Successfulness
 
31
         */
 
32
        public function dispatch($hook, $parameters = array());
 
33
}
 
 
b'\\ No newline at end of file'