diff --git a/code/DMS.php b/code/DMS.php index d6d0497..afa3de0 100644 --- a/code/DMS.php +++ b/code/DMS.php @@ -18,7 +18,7 @@ class DMS implements DMSInterface { * @static * @return DMSInterface An instance of the Document Management System */ - static function getDMSInstance() { + static function inst() { $dmsPath = self::get_DMS_path(); $dms = new DMS(); diff --git a/code/cms/DMSUploadField.php b/code/cms/DMSUploadField.php index 40d843d..8f4776e 100644 --- a/code/cms/DMSUploadField.php +++ b/code/cms/DMSUploadField.php @@ -22,7 +22,7 @@ class DMSUploadField extends UploadField { * @param File */ protected function attachFile($file) { - $dms = DMS::getDMSInstance(); + $dms = DMS::inst(); $record = $this->getRecord(); if($record instanceof DMSDocument) { diff --git a/code/interface/DMSInterface.php b/code/interface/DMSInterface.php index e7df727..8583655 100644 --- a/code/interface/DMSInterface.php +++ b/code/interface/DMSInterface.php @@ -16,7 +16,7 @@ interface DMSInterface { * @abstract * @return DMSInterface An instance of the Document Management System */ - static function getDMSInstance(); + static function inst(); /** * Takes a File object or a String (path to a file) and copies it into the DMS. The original file remains unchanged. diff --git a/tests/DMSTest.php b/tests/DMSTest.php index 5a616bf..ec2ee19 100644 --- a/tests/DMSTest.php +++ b/tests/DMSTest.php @@ -62,7 +62,7 @@ class DMSTest extends FunctionalTest { function testDMSStorage() { - $dms = DMS::getDMSInstance(); + $dms = DMS::inst(); $file = self::$testFile; $document = $dms->storeDocument($file); @@ -75,7 +75,7 @@ class DMSTest extends FunctionalTest { function testDMSFolderSpanning() { DMS::$dmsFolderSize = 5; - $dms = DMS::getDMSInstance(); + $dms = DMS::inst(); $file = self::$testFile; @@ -102,7 +102,7 @@ class DMSTest extends FunctionalTest { } function testReplaceDocument() { - $dms = DMS::getDMSInstance(); + $dms = DMS::inst(); //store the first document $document = $dms->storeDocument(self::$testFile); @@ -121,7 +121,7 @@ class DMSTest extends FunctionalTest { } function testDownloadDocument() { -// $dms = DMS::getDMSInstance(); +// $dms = DMS::inst(); // // //store the first document // $document = $dms->storeDocument(self::$testFile);