Skip to content
Snippets Groups Projects
Commit 5ebdfdc4 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

use own constructor interface for StandardFile, fixes #1280

Closes #1280

Merge request studip/studip!784
parent 3759c324
No related branches found
No related tags found
No related merge requests found
...@@ -2,14 +2,6 @@ ...@@ -2,14 +2,6 @@
interface FileType interface FileType
{ {
/**
* StandardFile constructor.
* @param $fileref
* @param null $file : (optional) Is set if fileref and file are both new and not connected with
* each other in the database.
*/
public function __construct($fileref, $file = null);
/** /**
* Returns the name of the icon shape that shall be used with the FileType implementation. * Returns the name of the icon shape that shall be used with the FileType implementation.
* *
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
* @category Stud.IP * @category Stud.IP
*/ */
class StandardFile implements FileType, ArrayAccess class StandardFile implements FileType, ArrayAccess, StandardFileInterface
{ {
/** /**
......
<?php
interface StandardFileInterface
{
/**
* StandardFile constructor.
* @param $fileref
* @param null $file : (optional) Is set if fileref and file are both new and not connected with
* each other in the database.
*/
public function __construct($fileref, $file = null);
}
...@@ -20,7 +20,7 @@ class UnknownFileType implements FileType, ArrayAccess ...@@ -20,7 +20,7 @@ class UnknownFileType implements FileType, ArrayAccess
*/ */
protected $fileref = null; protected $fileref = null;
public function __construct($fileref = null, $file = null) public function __construct($fileref = null)
{ {
$this->fileref = $fileref; $this->fileref = $fileref;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment