<?php
/********************************************************************************
 * (c)1337 aheadware.com - All rights reserved
 ********************************************************************************/


class AHDB_Core_RequestData {
    protected $data = array();

    public function __construct( array $data = array() ) {
        $this->data = $data;
    }

    public function get( $key, $default = NULL ) {
        if ( isset( $this->data[ $key ] ) ) {
            $v = is_string( $this->data[ $key ] ) ? trim( $this->data[ $key ] ) : $this->data[ $key ];
            return !empty( $v ) ? $v : NULL;
        } else {
            return $default;
        }
    }

    public function asArray() {
        return $this->data;
    }
} 