mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
Fix class loading issues
This commit is contained in:
parent
2b6a70e529
commit
76fb2b29dc
@ -1,7 +1,7 @@
|
||||
---
|
||||
name: mssqlconnectors
|
||||
---
|
||||
Injector:
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
# Connect using PDO
|
||||
MSSQLPDODatabase:
|
||||
class: 'SilverStripe\MSSQL\MSSQLDatabase'
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
namespace SilverStripe\MSSQL;
|
||||
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Config\Configurable;
|
||||
use SilverStripe\Core\Injector\Injectable;
|
||||
use SilverStripe\Core\ClassInfo;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\ORM\Connect\Database;
|
||||
@ -51,6 +52,8 @@ use SilverStripe\ORM\Queries\SQLSelect;
|
||||
*/
|
||||
class MSSQLDatabase extends Database
|
||||
{
|
||||
use Configurable;
|
||||
use Injectable;
|
||||
|
||||
/**
|
||||
* Words that will trigger an error if passed to a SQL Server fulltext search
|
||||
@ -83,7 +86,7 @@ class MSSQLDatabase extends Database
|
||||
*/
|
||||
public static function set_collation($collation)
|
||||
{
|
||||
Config::inst()->update('SilverStripe\\MSSQL\\MSSQLDatabase', 'collation', $collation);
|
||||
static::config()->set('collation', $collation);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -95,7 +98,7 @@ class MSSQLDatabase extends Database
|
||||
*/
|
||||
public static function get_collation()
|
||||
{
|
||||
return Config::inst()->get('SilverStripe\\MSSQL\\MSSQLDatabase', 'collation');
|
||||
return static::config()->get('collation');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "silverstripe/mssql",
|
||||
"description": "Adds MSSQL support to SilverStripe",
|
||||
"type": "silverstripe-module",
|
||||
"type": "silverstripe-vendormodule",
|
||||
"keywords": ["silverstripe", "mssql", "database"],
|
||||
"authors": [
|
||||
{
|
||||
@ -16,6 +16,10 @@
|
||||
"require": {
|
||||
"silverstripe/framework": "^4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-sqlsrv": "Required to support MSSQLDatabase as the server type",
|
||||
"ext-pdo_sqlsrv": "Required to support MSSQLPDODatabase as the server type"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
|
Loading…
Reference in New Issue
Block a user