Skip to content

Commit

Permalink
Version 2.0
Browse files Browse the repository at this point in the history
Version 2.0
  • Loading branch information
Musa ATALAY committed Nov 21, 2014
1 parent 62459a2 commit 0d89403
Show file tree
Hide file tree
Showing 7 changed files with 516 additions and 60 deletions.
7 changes: 4 additions & 3 deletions Engines/FireWall.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Created by PhpStorm.
* User: musaatalay
* E-Mail: musa.atalay@icloud.com
* Date: 25.10.2014
* Time: 14:22
*/
Expand Down Expand Up @@ -36,10 +37,10 @@ public function isLogged(){

if(
//$this->Session->get("/session/login/set") == TRUE &&
Libraries\Session::get("/session/login/set") &&
Libraries\Session::get("/login/set") &&
$this->Database->table("/users")->in([
"/username" => Libraries\Session::get("/session/login/username"),
"password" => Libraries\Session::get("/session/login/password")
"/username" => Libraries\Session::get("/login/username"),
"password" => Libraries\Session::get("/login/password")
])
){

Expand Down
57 changes: 43 additions & 14 deletions Engines/MySQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,18 @@ public function connect(Array $Config = null){

}

public function query($QueryStatement){
/**
* @param $CharSet: MySQL Connection´s OutPut Character Coding ex: utf8
*/
public function character($CharSet){

$this->Conn->exec("set names {$CharSet}");

}

public function query($QueryStatement, $FETCH = \PDO::FETCH_ASSOC){

return $this->Conn->query($QueryStatement);
return $this->Conn->query($QueryStatement, $FETCH);

}

Expand Down Expand Up @@ -107,14 +116,6 @@ public function switcher($Path){

}

/**
* @param $CharSet: MySQL Connection´s OutPut Character Coding ex: utf8
*/
public function character($CharSet){

$this->Conn->exec("set names {$CharSet}");
}

/*private function ErrorHandler(\PDOException $Error){
$this->Status = false;
Expand Down Expand Up @@ -493,11 +494,13 @@ private function StringSet($Path = null, $Set = false){

$Path[1] = implode("/", $Path);

$Packages = explode(";;", ltrim($Path[1], ";;"));
#$Packages = explode(";;", ltrim($Path[1], ";;"));
$Packages = preg_split("/\;\;/", ltrim($Path[1], ";;"));

foreach ($Packages as $Package) {

$Set = explode("::", $Package);
#$Set = explode("::", $Package);
$Set = preg_split("/\:\:/", $Package);

$VarKey = substr(md5(date("Y-m-d-H-i-s-").microtime().":".rand(9, 99999)), 3, 9);

Expand Down Expand Up @@ -646,13 +649,13 @@ private function StringSet($Path = null, $Set = false){

private function ArraySet($Path = null, $Set = true){

if($this->QueryType==MySQL::SELECT){ # String Type
if($this->QueryType==1){ # Array Type



}

if($this->QueryType==MySQL::INSERT){
if($this->QueryType==2){ # Insert Query



Expand Down Expand Up @@ -1075,6 +1078,32 @@ public function row($Index){

}

public function merge($Data1, $Data2 = null){

if((($Data1=="this"||$Data1===true)&&is_array($Data2))){

$this->Source = array_merge($this->Source, $Data2);

}else if((($Data2===null||$Data2===false)&&is_array($Data1))){

$this->Source = array_merge($this->Source, $Data1);

}else if((($Data2==="this"||$Data2===true)&&is_array($Data1))){

$this->Source = array_merge($Data1, $this->Source);

}

return $this;

}

public function add($Data1, $Data2 = null){

return $this->merge($Data1, $Data2);

}

public function get(){

return $this->Source;
Expand Down
Loading

0 comments on commit 0d89403

Please sign in to comment.