Add parse_str() action
This commit is contained in:
parent
4f7f6ff702
commit
03aa7169de
16
classes.php
16
classes.php
@ -202,6 +202,22 @@ class ActionDateC extends AbstractAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ActionParseStr extends AbstractAction
|
||||||
|
{
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
$this->setContainer( new DivContainer );
|
||||||
|
$this->setFormatter( new DbugFormatter );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function decode()
|
||||||
|
{
|
||||||
|
parse_str($this->value, $results);
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interface ContainerInterface
|
interface ContainerInterface
|
||||||
{
|
{
|
||||||
public function wrap( $contents );
|
public function wrap( $contents );
|
||||||
|
@ -46,6 +46,7 @@ if( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
|||||||
<option value="JsonDecode" <?php echo selected($action_str, 'JsonDecode'); ?>>json_decode()</option>
|
<option value="JsonDecode" <?php echo selected($action_str, 'JsonDecode'); ?>>json_decode()</option>
|
||||||
<option value="JsonEncode" <?php echo selected($action_str, 'JsonEncode'); ?>>json_encode()</option>
|
<option value="JsonEncode" <?php echo selected($action_str, 'JsonEncode'); ?>>json_encode()</option>
|
||||||
<option value="DateC" <?php echo selected($action_str, 'DateC'); ?>>date('c', $timestamp)</option>
|
<option value="DateC" <?php echo selected($action_str, 'DateC'); ?>>date('c', $timestamp)</option>
|
||||||
|
<option value="ParseStr" <?php echo selected($action_str, 'ParseStr'); ?>>parse_str()</option>
|
||||||
<select>
|
<select>
|
||||||
<input type="submit">
|
<input type="submit">
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user