A super easy PHP Framework for web development!
				https://github.com/exacti/phacil-framework
			
			
		
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					86 lines
				
				1.6 KiB
			
		
		
			
		
	
	
					86 lines
				
				1.6 KiB
			| 
								 
											7 years ago
										 
									 | 
							
								<?php
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								/*
							 | 
						||
| 
								 | 
							
								 * Copyright © 2021 ExacTI Technology Solutions. All rights reserved.
							 | 
						||
| 
								 | 
							
								 * GPLv3 General License.
							 | 
						||
| 
								 | 
							
								 * https://exacti.com.br
							 | 
						||
| 
								 | 
							
								 * Phacil PHP Framework - https://github.com/exacti/phacil-framework
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace Phacil\Framework\Databases;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								use Phacil\Framework\Databases\Api\DriverInterface;
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Nullable fake simulated DB connection.
							 | 
						||
| 
								 | 
							
								 * 
							 | 
						||
| 
								 | 
							
								 * @package Phacil\Framework\Databases
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								final class nullStatement implements DriverInterface {
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								    //private $connection;
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    const DB_TYPE = NULL;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    const DB_TYPE_ID = 0;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    /**
							 | 
						||
| 
								 | 
							
									 * 
							 | 
						||
| 
								 | 
							
									 * {@inheritdoc}
							 | 
						||
| 
								 | 
							
									 */
							 | 
						||
| 
								 | 
							
									public function getDBType() { 
							 | 
						||
| 
								 | 
							
										return self::DB_TYPE;
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									/**
							 | 
						||
| 
								 | 
							
									 * 
							 | 
						||
| 
								 | 
							
									 * {@inheritdoc}
							 | 
						||
| 
								 | 
							
									 */
							 | 
						||
| 
								 | 
							
									public function getDBTypeId() {
							 | 
						||
| 
								 | 
							
										return self::DB_TYPE_ID;
							 | 
						||
| 
								 | 
							
									 }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    /** {@inheritdoc} */
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    public function __construct($hostname, $username, $password, $database, $charset = 'utf8mb4') {
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								        //$this->connection = NULL;
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    /** {@inheritdoc} */
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								    public function isConnected() { 
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        return false;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											3 years ago
										 
									 | 
							
								    /**
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								     * {@inheritdoc}
							 | 
						||
| 
								 
											3 years ago
										 
									 | 
							
								     */
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    public function query($sql) {
							 | 
						||
| 
								 
											3 years ago
										 
									 | 
							
								        $result = new \Phacil\Framework\Databases\Object\Result();
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								        $result->num_rows = NULL;
							 | 
						||
| 
								 | 
							
								        $result->row = NULL;
							 | 
						||
| 
								 | 
							
								        $result->rows = NULL;
							 | 
						||
| 
								 | 
							
								        return $result;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    /** {@inheritdoc} */
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    public function escape($value) {
							 | 
						||
| 
								 | 
							
								        return NULL;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    /** {@inheritdoc} */
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    public function countAffected() {
							 | 
						||
| 
								 | 
							
								        return NULL;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    /** {@inheritdoc} */
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    public function getLastId() {
							 | 
						||
| 
								 | 
							
								        return NULL;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    /**
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								     * {@inheritdoc}
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								     */
							 | 
						||
| 
								 | 
							
								    public function execute($sql, array $params = [])
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return [null];
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								}
							 |