| 1 | <?php |
||
| 17 | abstract class AdminPageFramework_Utility_HTMLAttribute extends AdminPageFramework_Utility_SystemInformation { |
||
|
1 ignored issue
–
show
|
|||
| 18 | |||
| 19 | /** |
||
| 20 | * Generates inline CSS rules from the given array. |
||
| 21 | * |
||
| 22 | * For example, |
||
| 23 | * <code> |
||
| 24 | * array( |
||
| 25 | * 'width' => '32px', |
||
| 26 | * 'height' => '32px', |
||
| 27 | * ) |
||
| 28 | * </code> |
||
| 29 | * will be |
||
| 30 | * <code> |
||
| 31 | * 'width: 32px; height: 32px;' |
||
| 32 | * </code> |
||
| 33 | * |
||
| 34 | * @since 3.6.0 |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | static public function getInlineCSS( array $aCSSRules ) { |
||
| 44 | /** |
||
| 45 | * @since 3.2.0 |
||
| 46 | * @deprecated 3.6.0 Use `getInlineCSS()` instead. |
||
| 47 | */ |
||
| 48 | static public function generateInlineCSS( array $aCSSRules ) { |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Generates a string of inline styles for the style attribute value from multiple arguments. |
||
| 54 | * |
||
| 55 | * Duplicated items will be merged. |
||
| 56 | * |
||
| 57 | * For example, |
||
| 58 | * ` |
||
| 59 | * getStyleAttribute( array( 'margin-top' => '10px', 'display: inline-block' ), 'float:right; display: none;' ) |
||
| 60 | * ` |
||
| 61 | * will generate |
||
| 62 | * ` |
||
| 63 | * margin-top: 10px; display: inline-block; float:right; |
||
| 64 | * ` |
||
| 65 | * @since 3.6.0 |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | static public function getStyleAttribute( $asInlineCSSes ) { |
||
| 93 | /** |
||
| 94 | * @since 3.3.1 |
||
| 95 | * @deprecated 3.6.0 Use `getStyleAttribute()` instead. |
||
| 96 | */ |
||
| 97 | static public function generateStyleAttribute( $asInlineCSSes ) { |
||
| 100 | |||
| 101 | /** |
||
| 102 | * Generates a string of class selectors from multiple arguments. |
||
| 103 | * |
||
| 104 | * For example, |
||
| 105 | * <code> |
||
| 106 | * $sClasses = getClassAttribute( array( 'button, button-primary' ), 'remove_button button' ); |
||
| 107 | * </code> |
||
| 108 | * Will generates |
||
| 109 | * <code> |
||
| 110 | * button button-primary remove_button |
||
| 111 | * </code> |
||
| 112 | * |
||
| 113 | * @remark Duplicated items will be merged. |
||
| 114 | * @since 3.6.0 |
||
| 115 | * @todo Fix an issue that when a multidimensional array is passed, it causes a warning: Notice: Array to string conversion. |
||
| 116 | * @return string |
||
| 117 | */ |
||
| 118 | static public function getClassAttribute( /* $asClassSelectors1, $asClassSelectors12, ... */ ) { |
||
| 138 | /** |
||
| 139 | * Generates a string of class selectors from multiple arguments. |
||
| 140 | * |
||
| 141 | * @since 3.2.0 |
||
| 142 | * @return string |
||
| 143 | * @deprecated 3.6.0 |
||
| 144 | */ |
||
| 145 | static public function generateClassAttribute( /* $asClassSelectors1, $asClassSelectors12 ... */ ) { |
||
| 152 | |||
| 153 | /** |
||
| 154 | * Returns an array for generating a data attribute from the given associative array. |
||
| 155 | * |
||
| 156 | * @since 3.4.0 |
||
| 157 | * @return array |
||
| 158 | */ |
||
| 159 | static public function getDataAttributeArray( array $aArray ) { |
||
| 171 | |||
| 172 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.