1 | <?php |
||
23 | abstract class AdminPageFramework extends AdminPageFramework_Controller { |
||
24 | |||
25 | /** |
||
26 | * Defines the class object structure type. |
||
27 | * |
||
28 | * This is used to create a property object as well as to define the form element structure. |
||
29 | * |
||
30 | * @since 3.0.0 |
||
31 | * @since 3.7.0 Changed the name from `$_sFieldsType`. |
||
32 | * @since 3.7.12 Moved from `AdminPageFrmework_Model_Form`. Removed the static scope. |
||
33 | * @internal |
||
34 | */ |
||
35 | protected $_sStructureType = 'admin_page'; |
||
36 | |||
37 | /** |
||
38 | * Registers necessary callbacks and sets up internal components including properties. |
||
39 | * |
||
40 | * <h4>Example</h4> |
||
41 | * <code> |
||
42 | * new MyAdminPageClass( 'my_custom_option_key', __FILE__ ); |
||
43 | * </code> |
||
44 | * |
||
45 | * @access public |
||
46 | * @since 2.0.0 |
||
47 | * @see http://codex.wordpress.org/Roles_and_Capabilities |
||
48 | * @see http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains |
||
49 | * @param array|integer|string $aisOptionKey (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. |
||
|
|||
50 | * [3.5.9+] If an integer is given, a transient will be used. If an array of option key arguments is given, the argument values will be set to the framework properties. |
||
51 | * - type - either `options_table` or `transient`. |
||
52 | * - key - the option key or the transient key |
||
53 | * - duration - when the option type is transient, this value will be used for the time span to store the value in the database. |
||
54 | * ` |
||
55 | * array( |
||
56 | * 'type' => 'options_table', |
||
57 | * 'key' => 'my_admin_options', |
||
58 | * ) |
||
59 | * ` |
||
60 | * ` |
||
61 | * array( |
||
62 | * 'type' => 'transient', |
||
63 | * 'key' => $sTransientKeyDefinedSomewhereInYourProgram, |
||
64 | * 'duration' => 60*60*24*2 // two days |
||
65 | * ) |
||
66 | * ` |
||
67 | * @param string $sCallerPath (optional) used to retrieve the plugin/theme details to auto-insert the information into the page footer. |
||
68 | * @param string $sCapability (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options` |
||
69 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework. |
||
70 | */ |
||
71 | public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){ |
||
85 | /** |
||
86 | * Returns the script caller path. |
||
87 | * @remark It is important to find the caller script path here when separating the library into multiple files. |
||
88 | * @return null|string |
||
89 | * @since 3.8.2 |
||
90 | */ |
||
91 | private function _getCallerPath( $sCallerPath ) { |
||
112 | |||
113 | } |
||
114 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.