API-CHANGE: refactoring getDMSinstance() to inst()
This commit is contained in:
parent
c571d5bc8d
commit
6fa0cc5a32
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue