@@ -6,97 +6,97 @@ |
||
6 | 6 | interface EEI_Base |
7 | 7 | { |
8 | 8 | |
9 | - /** |
|
10 | - * gets the unique ID of the model object. If it hasn't been saved yet |
|
11 | - * to the database, this should be 0 or NULL |
|
12 | - */ |
|
13 | - public function ID(); |
|
14 | - |
|
15 | - |
|
16 | - |
|
17 | - /** |
|
18 | - * Returns an array where keys are field names and values are their values |
|
19 | - * |
|
20 | - * @return array |
|
21 | - */ |
|
22 | - public function model_field_array(); |
|
23 | - |
|
24 | - |
|
25 | - |
|
26 | - /** |
|
27 | - * Saves the thing to the database and returns success (or an ID) |
|
28 | - * |
|
29 | - * @return boolean success on insert; or int on update (ID of newly inserted thing) |
|
30 | - */ |
|
31 | - public function save(); |
|
32 | - |
|
33 | - |
|
34 | - |
|
35 | - /** |
|
36 | - * Similar to insert_post_meta, adds a record in the Extra_Meta model's table with the given key and value. |
|
37 | - * A $previous_value can be specified in case there are many meta rows with the same key |
|
38 | - * |
|
39 | - * @param string $meta_key |
|
40 | - * @param string $meta_value |
|
41 | - * @param string $previous_value |
|
42 | - * @return int records updated (or BOOLEAN if we actually ended up inserting the extra meta row) |
|
43 | - * NOTE: if the values haven't changed, returns 0 |
|
44 | - */ |
|
45 | - public function update_extra_meta($meta_key, $meta_value, $previous_value = null); |
|
46 | - |
|
47 | - |
|
48 | - |
|
49 | - /** |
|
50 | - * Adds a new extra meta record. If $unique is set to TRUE, we'll first double-check |
|
51 | - * no other extra meta for this model object have the same key. Returns TRUE if the |
|
52 | - * extra meta row was entered, false if not |
|
53 | - * |
|
54 | - * @param string $meta_key |
|
55 | - * @param string $meta_value |
|
56 | - * @param boolean $unique |
|
57 | - * @return boolean |
|
58 | - */ |
|
59 | - public function add_extra_meta($meta_key, $meta_value, $unique = false); |
|
60 | - |
|
61 | - |
|
62 | - |
|
63 | - /** |
|
64 | - * Deletes all the extra meta rows for this record as specified by key. If $meta_value |
|
65 | - * is specified, only deletes extra meta records with that value. |
|
66 | - * |
|
67 | - * @param string $meta_key |
|
68 | - * @param string $meta_value |
|
69 | - * @return int number of extra meta rows deleted |
|
70 | - */ |
|
71 | - public function delete_extra_meta($meta_key, $meta_value = null); |
|
72 | - |
|
73 | - |
|
74 | - |
|
75 | - /** |
|
76 | - * Gets the extra meta with the given meta key. If you specify "single" we just return 1, otherwise |
|
77 | - * an array of everything found. Requires that this model actually have a relation of type EE_Has_Many_Any_Relation. |
|
78 | - * You can specify $default is case you haven't found the extra meta |
|
79 | - * |
|
80 | - * @param string $meta_key |
|
81 | - * @param boolean $single |
|
82 | - * @param mixed $default if we don't find anything, what should we return? |
|
83 | - * @return mixed single value if $single; array if ! $single |
|
84 | - */ |
|
85 | - public function get_extra_meta($meta_key, $single = false, $default = null); |
|
86 | - |
|
87 | - |
|
88 | - |
|
89 | - /** |
|
90 | - * Gets a pretty view of the field's value. $extra_cache_ref can specify different formats for this. |
|
91 | - * The $extra_cache_ref will be passed to the model field's prepare_for_pretty_echoing, so consult the field's class |
|
92 | - * to see what options are available. |
|
93 | - * |
|
94 | - * @param string $field_name |
|
95 | - * @param string $extra_cache_ref This allows the user to specify an extra cache ref for the given property |
|
96 | - * (in cases where the same property may be used for different outputs |
|
97 | - * - i.e. datetime, money etc.) |
|
98 | - * @return mixed |
|
99 | - * @throws \EE_Error |
|
100 | - */ |
|
101 | - public function get_pretty($field_name, $extra_cache_ref); |
|
9 | + /** |
|
10 | + * gets the unique ID of the model object. If it hasn't been saved yet |
|
11 | + * to the database, this should be 0 or NULL |
|
12 | + */ |
|
13 | + public function ID(); |
|
14 | + |
|
15 | + |
|
16 | + |
|
17 | + /** |
|
18 | + * Returns an array where keys are field names and values are their values |
|
19 | + * |
|
20 | + * @return array |
|
21 | + */ |
|
22 | + public function model_field_array(); |
|
23 | + |
|
24 | + |
|
25 | + |
|
26 | + /** |
|
27 | + * Saves the thing to the database and returns success (or an ID) |
|
28 | + * |
|
29 | + * @return boolean success on insert; or int on update (ID of newly inserted thing) |
|
30 | + */ |
|
31 | + public function save(); |
|
32 | + |
|
33 | + |
|
34 | + |
|
35 | + /** |
|
36 | + * Similar to insert_post_meta, adds a record in the Extra_Meta model's table with the given key and value. |
|
37 | + * A $previous_value can be specified in case there are many meta rows with the same key |
|
38 | + * |
|
39 | + * @param string $meta_key |
|
40 | + * @param string $meta_value |
|
41 | + * @param string $previous_value |
|
42 | + * @return int records updated (or BOOLEAN if we actually ended up inserting the extra meta row) |
|
43 | + * NOTE: if the values haven't changed, returns 0 |
|
44 | + */ |
|
45 | + public function update_extra_meta($meta_key, $meta_value, $previous_value = null); |
|
46 | + |
|
47 | + |
|
48 | + |
|
49 | + /** |
|
50 | + * Adds a new extra meta record. If $unique is set to TRUE, we'll first double-check |
|
51 | + * no other extra meta for this model object have the same key. Returns TRUE if the |
|
52 | + * extra meta row was entered, false if not |
|
53 | + * |
|
54 | + * @param string $meta_key |
|
55 | + * @param string $meta_value |
|
56 | + * @param boolean $unique |
|
57 | + * @return boolean |
|
58 | + */ |
|
59 | + public function add_extra_meta($meta_key, $meta_value, $unique = false); |
|
60 | + |
|
61 | + |
|
62 | + |
|
63 | + /** |
|
64 | + * Deletes all the extra meta rows for this record as specified by key. If $meta_value |
|
65 | + * is specified, only deletes extra meta records with that value. |
|
66 | + * |
|
67 | + * @param string $meta_key |
|
68 | + * @param string $meta_value |
|
69 | + * @return int number of extra meta rows deleted |
|
70 | + */ |
|
71 | + public function delete_extra_meta($meta_key, $meta_value = null); |
|
72 | + |
|
73 | + |
|
74 | + |
|
75 | + /** |
|
76 | + * Gets the extra meta with the given meta key. If you specify "single" we just return 1, otherwise |
|
77 | + * an array of everything found. Requires that this model actually have a relation of type EE_Has_Many_Any_Relation. |
|
78 | + * You can specify $default is case you haven't found the extra meta |
|
79 | + * |
|
80 | + * @param string $meta_key |
|
81 | + * @param boolean $single |
|
82 | + * @param mixed $default if we don't find anything, what should we return? |
|
83 | + * @return mixed single value if $single; array if ! $single |
|
84 | + */ |
|
85 | + public function get_extra_meta($meta_key, $single = false, $default = null); |
|
86 | + |
|
87 | + |
|
88 | + |
|
89 | + /** |
|
90 | + * Gets a pretty view of the field's value. $extra_cache_ref can specify different formats for this. |
|
91 | + * The $extra_cache_ref will be passed to the model field's prepare_for_pretty_echoing, so consult the field's class |
|
92 | + * to see what options are available. |
|
93 | + * |
|
94 | + * @param string $field_name |
|
95 | + * @param string $extra_cache_ref This allows the user to specify an extra cache ref for the given property |
|
96 | + * (in cases where the same property may be used for different outputs |
|
97 | + * - i.e. datetime, money etc.) |
|
98 | + * @return mixed |
|
99 | + * @throws \EE_Error |
|
100 | + */ |
|
101 | + public function get_pretty($field_name, $extra_cache_ref); |
|
102 | 102 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | interface ProgressStepsConfigInterface |
11 | 11 | { |
12 | 12 | |
13 | - public function get(); |
|
13 | + public function get(); |
|
14 | 14 | |
15 | - public function update(); |
|
15 | + public function update(); |
|
16 | 16 | } |
@@ -11,23 +11,23 @@ |
||
11 | 11 | interface ProgressStepsDisplayInterface |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * used for setting up css and js required for the display strategy |
|
16 | - * ** IMPORTANT ** |
|
17 | - * This needs to be called BEFORE the wp_enqueue_scripts hook point for the frontend |
|
18 | - * or the admin_enqueue_scripts in the admin. |
|
19 | - * If setting up steps for the admin, this can be done via the |
|
20 | - * 'FHEE__EE_Admin_Page___load_page_dependencies__after_load' ACTION |
|
21 | - * in \EE_Admin_Page::_load_page_dependencies() or the targeted hook that comes after it |
|
22 | - * |
|
23 | - * @return void |
|
24 | - */ |
|
25 | - public function enqueueStylesAndScripts(); |
|
14 | + /** |
|
15 | + * used for setting up css and js required for the display strategy |
|
16 | + * ** IMPORTANT ** |
|
17 | + * This needs to be called BEFORE the wp_enqueue_scripts hook point for the frontend |
|
18 | + * or the admin_enqueue_scripts in the admin. |
|
19 | + * If setting up steps for the admin, this can be done via the |
|
20 | + * 'FHEE__EE_Admin_Page___load_page_dependencies__after_load' ACTION |
|
21 | + * in \EE_Admin_Page::_load_page_dependencies() or the targeted hook that comes after it |
|
22 | + * |
|
23 | + * @return void |
|
24 | + */ |
|
25 | + public function enqueueStylesAndScripts(); |
|
26 | 26 | |
27 | - /** |
|
28 | - * loads and returns a full server path to the template used for the display strategy |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function getTemplate(); |
|
27 | + /** |
|
28 | + * loads and returns a full server path to the template used for the display strategy |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function getTemplate(); |
|
33 | 33 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | if (! defined('EVENT_ESPRESSO_VERSION')) { |
3 | - exit('No direct script access allowed'); |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * This is the template for the "Number Bubbles" Progress Steps |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if (! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | 3 | exit('No direct script access allowed'); |
4 | 4 | } |
5 | 5 | /** |
@@ -17,18 +17,18 @@ |
||
17 | 17 | { |
18 | 18 | |
19 | 19 | |
20 | - /** |
|
21 | - * Uses CollectionFilterCallbackIterator on a provided collection with provided Closure for filtering each object |
|
22 | - * in the collection. |
|
23 | - * The closure receives an instance of the object and should return false if it is not "valid" and true if it is. |
|
24 | - * |
|
25 | - * @param Collection $collection |
|
26 | - * @param Closure $acceptance_callback |
|
27 | - * @return array |
|
28 | - */ |
|
29 | - public static function getFilteredObjectsFromCollection(Collection $collection, Closure $acceptance_callback) |
|
30 | - { |
|
31 | - $collection_filter_iterator = new CollectionFilterCallbackIterator($collection, $acceptance_callback); |
|
32 | - return $collection_filter_iterator->getFiltered(); |
|
33 | - } |
|
20 | + /** |
|
21 | + * Uses CollectionFilterCallbackIterator on a provided collection with provided Closure for filtering each object |
|
22 | + * in the collection. |
|
23 | + * The closure receives an instance of the object and should return false if it is not "valid" and true if it is. |
|
24 | + * |
|
25 | + * @param Collection $collection |
|
26 | + * @param Closure $acceptance_callback |
|
27 | + * @return array |
|
28 | + */ |
|
29 | + public static function getFilteredObjectsFromCollection(Collection $collection, Closure $acceptance_callback) |
|
30 | + { |
|
31 | + $collection_filter_iterator = new CollectionFilterCallbackIterator($collection, $acceptance_callback); |
|
32 | + return $collection_filter_iterator->getFiltered(); |
|
33 | + } |
|
34 | 34 | } |
@@ -11,45 +11,45 @@ |
||
11 | 11 | interface CollectionDetailsInterface |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * @access public |
|
16 | - * @return string |
|
17 | - */ |
|
18 | - public function getCollectionInterface(); |
|
19 | - |
|
20 | - /** |
|
21 | - * @access public |
|
22 | - * @return string |
|
23 | - */ |
|
24 | - public function collectionName(); |
|
25 | - |
|
26 | - /** |
|
27 | - * @access public |
|
28 | - * @return string |
|
29 | - */ |
|
30 | - public function identifierType(); |
|
31 | - |
|
32 | - /** |
|
33 | - * @access public |
|
34 | - * @return string |
|
35 | - */ |
|
36 | - public function identifierCallback(); |
|
37 | - |
|
38 | - /** |
|
39 | - * @access public |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getFileMask(); |
|
43 | - |
|
44 | - /** |
|
45 | - * @access public |
|
46 | - * @return array |
|
47 | - */ |
|
48 | - public function getCollectionFQCNs(); |
|
49 | - |
|
50 | - /** |
|
51 | - * @access public |
|
52 | - * @return array |
|
53 | - */ |
|
54 | - public function getCollectionPaths(); |
|
14 | + /** |
|
15 | + * @access public |
|
16 | + * @return string |
|
17 | + */ |
|
18 | + public function getCollectionInterface(); |
|
19 | + |
|
20 | + /** |
|
21 | + * @access public |
|
22 | + * @return string |
|
23 | + */ |
|
24 | + public function collectionName(); |
|
25 | + |
|
26 | + /** |
|
27 | + * @access public |
|
28 | + * @return string |
|
29 | + */ |
|
30 | + public function identifierType(); |
|
31 | + |
|
32 | + /** |
|
33 | + * @access public |
|
34 | + * @return string |
|
35 | + */ |
|
36 | + public function identifierCallback(); |
|
37 | + |
|
38 | + /** |
|
39 | + * @access public |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getFileMask(); |
|
43 | + |
|
44 | + /** |
|
45 | + * @access public |
|
46 | + * @return array |
|
47 | + */ |
|
48 | + public function getCollectionFQCNs(); |
|
49 | + |
|
50 | + /** |
|
51 | + * @access public |
|
52 | + * @return array |
|
53 | + */ |
|
54 | + public function getCollectionPaths(); |
|
55 | 55 | } |
@@ -12,11 +12,11 @@ |
||
12 | 12 | interface RequestStackCoreAppInterface |
13 | 13 | { |
14 | 14 | |
15 | - /** |
|
16 | - * gives the core app a chance to handle the response after the request stack has fully processed |
|
17 | - * |
|
18 | - * @param RequestInterface $request |
|
19 | - * @param ResponseInterface $response |
|
20 | - */ |
|
21 | - public function handleResponse(RequestInterface $request, ResponseInterface $response); |
|
15 | + /** |
|
16 | + * gives the core app a chance to handle the response after the request stack has fully processed |
|
17 | + * |
|
18 | + * @param RequestInterface $request |
|
19 | + * @param ResponseInterface $response |
|
20 | + */ |
|
21 | + public function handleResponse(RequestInterface $request, ResponseInterface $response); |
|
22 | 22 | } |
@@ -12,21 +12,21 @@ |
||
12 | 12 | interface RequestDecoratorInterface |
13 | 13 | { |
14 | 14 | |
15 | - /** |
|
16 | - * converts a Request to a Response |
|
17 | - * can perform their logic either before or after the core application has run like so: |
|
18 | - * public function handle_request( EE_Request $request, EE_Response $response ) { |
|
19 | - * $this->request = $request; |
|
20 | - * $this->response = $response; |
|
21 | - * // logic performed BEFORE core app has run |
|
22 | - * $this->process_request_stack( $this->request, $this->response ); |
|
23 | - * // logic performed AFTER core app has run |
|
24 | - * return $response; |
|
25 | - * } |
|
26 | - * |
|
27 | - * @param RequestInterface $request |
|
28 | - * @param ResponseInterface $response |
|
29 | - * @return ResponseInterface |
|
30 | - */ |
|
31 | - public function handleRequest(RequestInterface $request, ResponseInterface $response); |
|
15 | + /** |
|
16 | + * converts a Request to a Response |
|
17 | + * can perform their logic either before or after the core application has run like so: |
|
18 | + * public function handle_request( EE_Request $request, EE_Response $response ) { |
|
19 | + * $this->request = $request; |
|
20 | + * $this->response = $response; |
|
21 | + * // logic performed BEFORE core app has run |
|
22 | + * $this->process_request_stack( $this->request, $this->response ); |
|
23 | + * // logic performed AFTER core app has run |
|
24 | + * return $response; |
|
25 | + * } |
|
26 | + * |
|
27 | + * @param RequestInterface $request |
|
28 | + * @param ResponseInterface $response |
|
29 | + * @return ResponseInterface |
|
30 | + */ |
|
31 | + public function handleRequest(RequestInterface $request, ResponseInterface $response); |
|
32 | 32 | } |
@@ -11,8 +11,8 @@ |
||
11 | 11 | interface CommandRequiresCapCheckInterface |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * @return \EventEspresso\core\domain\services\capabilities\CapCheck |
|
16 | - */ |
|
17 | - public function getCapCheck(); |
|
14 | + /** |
|
15 | + * @return \EventEspresso\core\domain\services\capabilities\CapCheck |
|
16 | + */ |
|
17 | + public function getCapCheck(); |
|
18 | 18 | } |