Ip\View::checkData PHP Method

checkData() private static method

private static checkData ( $data )
    private static function checkData($data)
    {
        foreach ($data as $key => $value) {
            if (!preg_match('/^[a-zA-Z0-9_-]+$/', $key) || $key == '') {
                $source = '';
                if (isset($backtrace[0]['file']) && $backtrace[0]['line']) {
                    $source = "(Error source: " . $backtrace[0]['file'] . " line: " . $backtrace[0]['line'] . " ) ";
                }
                throw new \Ip\Exception\View("Incorrect view variable name '" . esc($key) . "' " . esc($source));
            }
        }
    }