Extends FuelPHP config class and provides new functionalities.
Parameters: |
|
---|---|
Returns: | The configuration merged. |
Merge configuration with the one saved in user in the key $key.
Parameters: |
|
---|---|
Returns: | Valid user configuration key. |
Parameters: |
|
---|---|
Returns: | Returns a two element array: first element is the class’s application, and the second element is the relative path of the configuration file. |
Parameters: |
|
---|---|
Returns: | The metadata configuration. |
Parameters: |
|
---|---|
Returns: | The global configuration. |
Parameters: |
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Returns: | The filtered actions. |
Parameters: |
|
---|---|
Returns: | The processed disabled value. |
Parameters: |
|
---|---|
Returns: | The first value which is different of $positive_value, otherwise $positive_value. |
For instance:
<?php
// ----- With a simple value
getActionDisabledState(true, true); // returns true
getActionDisabledState(true, false); // returns true
// ----- With a callback
$value = function() {
return true;
}
getActionDisabledState($value, true); // returns true
getActionDisabledState($value, false); // returns true
// ----- With a list of callbacks
$value = array(
function() {
return true;
},
function() {
return false;
}
);
getActionDisabledState($value, true); // returns false, since second callback is different from positive_value
getActionDisabledState($value, false); // returns true, since first callback is different from positive_value
// ----- With a list of mixed values
$value = array(
true,
function() {
return false;
}
);
// the first value is equivalent to a callback returning true, so there is no difference with previous example
getActionDisabledState($value, true); // returns false, since second value is different from positive_value
getActionDisabledState($value, false); // returns true, since first callback is different from positive_value
// ----- With additionnal parameters
$value = array(
function($param1, $param2) {
return $param1 == $param2;
},
function ($param1, $param2) {
return $param1 != $param2;
}
);
getActionDisabledState($value, true, 1, 1); // returns false, since second value is different from positive_value
getActionDisabledState($value, true, 1, 2); // returns false, since first value is different from positive_value
getActionDisabledState($value, false, 1, 1); // returns false, since first value is different from positive_value
getActionDisabledState($value, false, 1, 2); // returns false, since second value is different from positive_value
Parameters: |
|
---|---|
Returns: | The replaced value. |