-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create interface for processor data #3463
- Loading branch information
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
/** | ||
* Interface Caldera_Forms_Processor_Data | ||
* | ||
* Contract for Caldera_Forms_Processor_Get_Data | ||
*/ | ||
interface Caldera_Forms_Processor_Data{ | ||
/** | ||
* Add an error message to the errors property | ||
* | ||
* @param string $message Message for error | ||
* @since 1.8.10 | ||
* | ||
*/ | ||
public function add_error($message); | ||
|
||
/** | ||
* Get the errors | ||
* | ||
* @return array|null | ||
* @since 1.8.10 | ||
* | ||
*/ | ||
public function get_errors(); | ||
|
||
/** | ||
* Get the values | ||
* | ||
* @return array|null | ||
* @since 1.8.10 | ||
* | ||
*/ | ||
public function get_values(); | ||
|
||
/** | ||
* Get prepared fields | ||
* | ||
* @return array|null | ||
* @since 1.8.10 | ||
* | ||
*/ | ||
public function get_fields(); | ||
|
||
/** | ||
* Get one value from the processor | ||
* | ||
* @param string $field Name of field | ||
* @param mixed $default Optional. Default value to return if none set. | ||
* | ||
* @return mixed | ||
* @since 1.8.10 | ||
* | ||
*/ | ||
public function get_value($field, $default = null); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters