public static function driver(string $name){

            //Get the name.
            $name = explode(':', $name);
            //Get the classname.
            $class = "\\NonDB\\Drivers\\" . $name[0];
            //Get the parameter.
            $param = $name[1];

            //See if the driver exists.
            if(!class_exists($class) || !( \NonDB\Components\Tool::checkImplement($class, "NonDB\\Interfaces\\Driver") )){
                throw new \NonDB\Exceptions\CoreException("Driver $class wasn't exists.", "0011");
                return false;
            }

            //Get driver.
            $driver = eval("return new $class(urldecode(\$param));");

            return $driver;

        }
public static function driver(string $name){

            //Get the name.
            $name = explode(':', $name);
            //Get the classname.
            $class = "\\NonDB\\Drivers\\" . $name[0];
            //Get the parameter.
            $param = $name[1];

            //See if the driver exists.
            if(!class_exists($class) || !( \NonDB\Components\Tool::checkImplement($class, "NonDB\\Interfaces\\Driver") )){
                throw new \NonDB\Exceptions\CoreException("Driver $class wasn't exists.", "0011");
                return false;
            }

            //Get driver.
            $driver = eval("return new $class(urldecode(\$param));");

            return $driver;

        }
public static function driver ( string $ name ) { //Get the name. $ name = explode ( ':' , $ name ) ; //Get the classname. $ class = "\\NonDB\\Drivers\\" . $ name [ 0 ] ; //Get the parameter. $ param = $ name [ 1 ] ; //See if the driver exists. if ( ! class_exists ( $ class ) || ! ( \ NonDB \ Components \ Tool :: checkImplement ( $ class , "NonDB\\Interfaces\\Driver" ) ) ) { throw new \ NonDB \ Exceptions \ CoreException ( "Driver $class wasn't exists." , "0011" ) ; return false ; } //Get driver. $ driver = eval ( "return new $class(urldecode(\$param));" ) ; return $ driver ; }
Create a driver

@static
@param string $name Example: "Json:./data/"
@throws \NonDB\Exceptions\CoreException
@return \NonDB\Interfaces\Driver
Create a driver