use __construct for constructor

This commit is contained in:
Uwe Steinmann 2016-03-22 15:08:36 +01:00
parent 2e8c9cb690
commit 826c9fca72
13 changed files with 25 additions and 25 deletions

View File

@ -27,7 +27,7 @@ class SeedDMS_Core_UserAccess { /* {{{ */
var $_user;
var $_mode;
function SeedDMS_Core_UserAccess($user, $mode) {
function __construct($user, $mode) {
$this->_user = $user;
$this->_mode = $mode;
}
@ -60,7 +60,7 @@ class SeedDMS_Core_GroupAccess { /* {{{ */
var $_group;
var $_mode;
function SeedDMS_Core_GroupAccess($group, $mode) {
function __construct($group, $mode) {
$this->_group = $group;
$this->_mode = $mode;
}

View File

@ -72,7 +72,7 @@ class SeedDMS_Core_Attribute { /* {{{ */
* @param SeedDMS_Core_AttributeDefinition $attrdef reference to the attribute definition
* @param string $value value of the attribute
*/
function SeedDMS_Core_Attribute($id, $obj, $attrdef, $value) { /* {{{ */
function __construct($id, $obj, $attrdef, $value) { /* {{{ */
$this->_id = $id;
$this->_obj = $obj;
$this->_attrdef = $attrdef;
@ -354,7 +354,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
* @param string $valueset separated list of allowed values, the first char
* is taken as the separator
*/
function SeedDMS_Core_AttributeDefinition($id, $name, $objtype, $type, $multiple, $minvalues, $maxvalues, $valueset, $regex) { /* {{{ */
function __construct($id, $name, $objtype, $type, $multiple, $minvalues, $maxvalues, $valueset, $regex) { /* {{{ */
$this->_id = $id;
$this->_name = $name;
$this->_type = $type;

View File

@ -150,7 +150,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
*/
protected $_sequence;
function SeedDMS_Core_Document($id, $name, $comment, $date, $expires, $ownerID, $folderID, $inheritAccess, $defaultAccess, $locked, $keywords, $sequence) { /* {{{ */
function __construct($id, $name, $comment, $date, $expires, $ownerID, $folderID, $inheritAccess, $defaultAccess, $locked, $keywords, $sequence) { /* {{{ */
parent::__construct($id);
$this->_name = $name;
$this->_comment = $comment;
@ -2231,7 +2231,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
else $this->setStatus(S_RELEASED,$msg,$user);
} /* }}} */
function SeedDMS_Core_DocumentContent($id, $document, $version, $comment, $date, $userID, $dir, $orgFileName, $fileType, $mimeType, $fileSize=0, $checksum='') { /* {{{ */
function __construct($id, $document, $version, $comment, $date, $userID, $dir, $orgFileName, $fileType, $mimeType, $fileSize=0, $checksum='') { /* {{{ */
parent::__construct($id);
$this->_document = $document;
$this->_version = (int) $version;
@ -4199,7 +4199,7 @@ class SeedDMS_Core_DocumentLink { /* {{{ */
*/
protected $_public;
function SeedDMS_Core_DocumentLink($id, $document, $target, $userID, $public) {
function __construct($id, $document, $target, $userID, $public) {
$this->_id = $id;
$this->_document = $document;
$this->_target = $target;
@ -4298,7 +4298,7 @@ class SeedDMS_Core_DocumentFile { /* {{{ */
*/
protected $_name;
function SeedDMS_Core_DocumentFile($id, $document, $userID, $comment, $date, $dir, $fileType, $mimeType, $orgFileName,$name) {
function __construct($id, $document, $userID, $comment, $date, $dir, $fileType, $mimeType, $orgFileName,$name) {
$this->_id = $id;
$this->_document = $document;
$this->_userID = $userID;
@ -4361,7 +4361,7 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */
protected $_content;
protected $_status;
function SeedDMS_Core_AddContentResultSet($content) { /* {{{ */
function __construct($content) { /* {{{ */
$this->_content = $content;
$this->_indReviewers = null;
$this->_grpReviewers = null;

View File

@ -39,7 +39,7 @@ class SeedDMS_Core_DocumentCategory {
*/
protected $_dms;
function SeedDMS_Core_DocumentCategory($id, $name) { /* {{{ */
function __construct($id, $name) { /* {{{ */
$this->_id = $id;
$this->_name = $name;
$this->_dms = null;

View File

@ -73,7 +73,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
*/
protected $_sequence;
function SeedDMS_Core_Folder($id, $name, $parentID, $comment, $date, $ownerID, $inheritAccess, $defaultAccess, $sequence) { /* {{{ */
function __construct($id, $name, $parentID, $comment, $date, $ownerID, $inheritAccess, $defaultAccess, $sequence) { /* {{{ */
parent::__construct($id);
$this->_id = $id;
$this->_name = $name;

View File

@ -43,7 +43,7 @@ class SeedDMS_Core_Group {
*/
protected $_dms;
function SeedDMS_Core_Group($id, $name, $comment) { /* {{{ */
function __construct($id, $name, $comment) { /* {{{ */
$this->_id = $id;
$this->_name = $name;
$this->_comment = $comment;

View File

@ -47,7 +47,7 @@ class SeedDMS_Core_KeywordCategory {
*/
protected $_dms;
function SeedDMS_Core_KeywordCategory($id, $ownerID, $name) {
function __construct($id, $ownerID, $name) {
$this->_id = $id;
$this->_name = $name;
$this->_ownerID = $ownerID;

View File

@ -67,7 +67,7 @@ class SeedDMS_Core_Notification { /* {{{ */
* @param integer $groupid id of group. The id is -1 if the notification is
* for a user.
*/
function SeedDMS_Core_Notification($target, $targettype, $userid, $groupid) { /* {{{ */
function __construct($target, $targettype, $userid, $groupid) { /* {{{ */
$this->_target = $target;
$this->_targettype = $targettype;
$this->_userid = $userid;

View File

@ -38,7 +38,7 @@ class SeedDMS_Core_Object { /* {{{ */
*/
public $_dms;
function SeedDMS_Core_Object($id) { /* {{{ */
function __construct($id) { /* {{{ */
$this->_id = $id;
$this->_dms = null;
} /* }}} */

View File

@ -129,7 +129,7 @@ class SeedDMS_Core_User {
const role_admin = '1';
const role_guest = '2';
function SeedDMS_Core_User($id, $login, $pwd, $fullName, $email, $language, $theme, $comment, $role, $isHidden=0, $isDisabled=0, $pwdExpiration='0000-00-00 00:00:00', $loginFailures=0, $quota=0) {
function __construct($id, $login, $pwd, $fullName, $email, $language, $theme, $comment, $role, $isHidden=0, $isDisabled=0, $pwdExpiration='0000-00-00 00:00:00', $loginFailures=0, $quota=0) {
$this->_id = $id;
$this->_login = $login;
$this->_pwd = $pwd;

View File

@ -56,7 +56,7 @@ class SeedDMS_Core_Workflow { /* {{{ */
*/
var $_dms;
function SeedDMS_Core_Workflow($id, $name, $initstate) { /* {{{ */
function __construct($id, $name, $initstate) { /* {{{ */
$this->_id = $id;
$this->_name = $name;
$this->_initstate = $initstate;
@ -390,7 +390,7 @@ class SeedDMS_Core_Workflow_State { /* {{{ */
*/
var $_dms;
function SeedDMS_Core_Workflow_State($id, $name, $maxtime, $precondfunc, $documentstatus) {
function __construct($id, $name, $maxtime, $precondfunc, $documentstatus) {
$this->_id = $id;
$this->_name = $name;
$this->_maxtime = $maxtime;
@ -543,7 +543,7 @@ class SeedDMS_Core_Workflow_Action { /* {{{ */
*/
var $_dms;
function SeedDMS_Core_Workflow_Action($id, $name) {
function __construct($id, $name) {
$this->_id = $id;
$this->_name = $name;
$this->_dms = null;
@ -685,7 +685,7 @@ class SeedDMS_Core_Workflow_Transition { /* {{{ */
*/
var $_dms;
function SeedDMS_Core_Workflow_Transition($id, $workflow, $state, $action, $nextstate, $maxtime) {
function __construct($id, $workflow, $state, $action, $nextstate, $maxtime) {
$this->_id = $id;
$this->_workflow = $workflow;
$this->_state = $state;
@ -890,7 +890,7 @@ class SeedDMS_Core_Workflow_Transition_User { /* {{{ */
*/
var $_dms;
function SeedDMS_Core_Workflow_Transition_User($id, $transition, $user) {
function __construct($id, $transition, $user) {
$this->_id = $id;
$this->_transition = $transition;
$this->_user = $user;
@ -964,7 +964,7 @@ class SeedDMS_Core_Workflow_Transition_Group { /* {{{ */
*/
var $_dms;
function SeedDMS_Core_Workflow_Transition_Group($id, $transition, $group, $numOfUsers) { /* {{{ */
function __construct($id, $transition, $group, $numOfUsers) { /* {{{ */
$this->_id = $id;
$this->_transition = $transition;
$this->_group = $group;
@ -1077,7 +1077,7 @@ class SeedDMS_Core_Workflow_Log { /* {{{ */
*/
var $_dms;
function SeedDMS_Core_Workflow_Log($id, $document, $version, $workflow, $user, $transition, $date, $comment) {
function __construct($id, $document, $version, $workflow, $user, $transition, $date, $comment) {
$this->_id = $id;
$this->_document = $document;
$this->_version = $version;

View File

@ -67,7 +67,7 @@ class SeedDMS_Core_DatabaseAccess {
* @param string $passw password of user
* @param string $database name of database
*/
function SeedDMS_Core_DatabaseAccess($driver, $hostname, $user, $passw, $database = false) {
function __construct($driver, $hostname, $user, $passw, $database = false) {
$this->_driver = $driver;
$this->_hostname = $hostname;
$this->_database = $database;

View File

@ -128,7 +128,7 @@ class SeedDMS_Core_DatabaseAccess {
* @param string $passw password of user
* @param string $database name of database
*/
function SeedDMS_Core_DatabaseAccess($driver, $hostname, $user, $passw, $database = false) { /* {{{ */
function __construct($driver, $hostname, $user, $passw, $database = false) { /* {{{ */
$this->_driver = $driver;
$tmp = explode(":", $hostname);
$this->_hostname = $tmp[0];