Files
roi-theme/wp-content/plugins/sociallocker-next-premium/bizpanda/includes/gates/context/RequestService.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

31 lines
802 B
PHP
Executable File

<?php
namespace bizpanda\includes\gates\context;
/**
* Returns values from the current request.
*/
class RequestService implements IContextReader
{
/**
* @inheritDoc
*/
public function init($id = null)
{
// no init needed
}
/**
* Returns a param from the $_REQUEST array.
* @param $name string A key of the param to return.
* @param $default mixed A value to return if the param doesn't exist.
* @return mixed A value to return.
*/
public function get( $name, $default = null ) {
$prefixedName = 'opanda' . ucfirst( $name );
if ( isset( $_REQUEST[$prefixedName] ) ) return $_REQUEST[$prefixedName];
return ( isset( $_REQUEST[$name] ) ) ? $_REQUEST[$name] : $default;
}
}