public function run($data = '', $load = 'string', $type = 'html')
    {
        if (!empty($data)) {
            $this->$type = $type;

            // Check if data is a path to a valid file then load into buffer.
            if (file_exists($data)) {
                $pathHash = md5($data);
                $this->views[$pathHash] = $data;
            }

            switch ($load . '.' . $type) {
                default:
                    return false;
                    
                // load string html
                case 'string.html':
                    if (@$this->loadHTML($data)) {
                        $objectName = 'Fabrication\\Html';
                        $this->pattern = new $objectName($this);
                        
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }
                    
                // load file html 
                case 'file.html':
                    if (@$this->loadHTMLFile($data)) {
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }

                // load string xml
                case 'string.xml':
                    if ($this->loadXML($data)) {
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }
                    
                // load file xml
                case 'file.xml':
                    $contents = file_get_contents($data);
                    if (@$this->loadXML($contents)) {
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }
            }
        }

        return;
    }