Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PHP5 style constructor #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GLExchange/GLExchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class GLExchange {
* $connectionConfig
* PDConfig - Project Director Connection Configuration
*/
function GLExchange($connectionConfig) {
function __construct($connectionConfig) {
$this->_setConnectionConfig ( $connectionConfig );
}

Expand Down
4 changes: 2 additions & 2 deletions GLExchange/model/CustomAttribute.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PDCustomAttribute {
* Attribute value
*/
public $values;
function PDCustomAttribute($customAttribute = NULL) {
function __construct($customAttribute = NULL) {
if (isset ( $customAttribute )) {
$this->mandatory = $customAttribute->mandatory;
$this->name = $customAttribute->name;
Expand All @@ -25,4 +25,4 @@ function PDCustomAttribute($customAttribute = NULL) {
}
}
}
?>
?>
2 changes: 1 addition & 1 deletion GLExchange/model/Document.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ public function getResourceInfo() {
}
}

?>
?>
4 changes: 2 additions & 2 deletions GLExchange/model/LanguageDirection.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class PDLanguageDirection {
public $sourceLanguageName;
public $targetLanguage;
public $targetLanguageName;
function PDLanguageDirection($externalLanguageDirection){
function __construct($externalLanguageDirection){
$this->sourceLanguage = $externalLanguageDirection->sourceLanguage->locale;
$this->sourceLanguageName = $externalLanguageDirection->sourceLanguage->value;
$this->targetLanguage = $externalLanguageDirection->targetLanguage->locale;
Expand All @@ -14,4 +14,4 @@ function PDLanguageDirection($externalLanguageDirection){

}

?>
?>
4 changes: 2 additions & 2 deletions GLExchange/model/Project.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PDProject {
* List of custom attributes configured for this project. Array of PDCustomAttribute
*/
public $customAttributes = array ();
function PDProject($externalProject) {
function __construct($externalProject) {
$this->name = $externalProject->projectInfo->name;
$this->shortcode = $externalProject->projectInfo->shortCode;
$this->ticket = $externalProject->ticket;
Expand Down Expand Up @@ -77,4 +77,4 @@ function PDProject($externalProject) {
}
}

?>
?>
4 changes: 2 additions & 2 deletions GLExchange/model/Target.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PDTarget {
* PDWordCount of target
*/
public $wordCount;
function PDTarget($externalTarget) {
function __construct($externalTarget) {
$this->documentName = $externalTarget->document->documentInfo->name;
$this->sourceLocale = $externalTarget->sourceLanguage->locale;
$this->targetLocale = $externalTarget->targetLanguage->locale;
Expand All @@ -54,4 +54,4 @@ function PDTarget($externalTarget) {
}
}

?>
?>
4 changes: 2 additions & 2 deletions GLExchange/model/WordCount.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ class WordCount {
public $repetitions; // int
public $nomatch; // int
public $total; // int
function WordCount($_golden, $_exact_100, $_repetitions, $_nomatch, $_total) {
function __construct($_golden, $_exact_100, $_repetitions, $_nomatch, $_total) {
$this->golden = $_golden;
$this->exact_100 = $_exact_100;
$this->fuzzy = $_total - $_golden - $_exact_100 - $_repetitions - $_nomatch;
$this->repetitions = $_repetitions;
$this->nomatch = $_nomatch;
$this->total = $_total;
}
}
}
4 changes: 2 additions & 2 deletions GLExchange/model/Workflow.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class PDWorkflow {
* Workflow ticket
*/
public $ticket;
function PDWorkflow($externalWorkflow) {
function __construct($externalWorkflow) {
$this->name = $externalWorkflow->name;
$this->ticket = $externalWorkflow->ticket;
}
}
}