API-CHANGE: refactoring getDMSinstance() to inst()

This commit is contained in:
Julian Seidenberg 2012-08-07 11:07:34 +12:00
parent c571d5bc8d
commit 6fa0cc5a32
4 changed files with 7 additions and 7 deletions

View File

@ -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();

View File

@ -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) {

View File

@ -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.

View File

@ -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);