Answer the question
In order to leave comments, you need to log in
How to call one method from class to class?
Two classes are named. One is called from the other. Generated method from another class. How to make classes so that class methods can be used in other classes.
Example:
class OLI_LU_HOLDSTAT_TC {
/*
* Class vyzova zchetchika trans type
*/
public $tcout = 2;
function __construct(){
return $this->tcount;
}
}
class OLI_LU_HOLDTYPE {
/*
* Pri vuzove zavazan na drugoj class
*/
public $HoldingTypeCode = 'Policy'; // string
public $tc; // OLI_LU_HOLDTYPE_TC
}
Answer the question
In order to leave comments, you need to log in
Are you talking about this?
class OLI_LU_HOLDSTAT_TC {
/*
* Class vyzova zchetchika trans type
*/
public $tcout = 2;
function __construct(){
return $this->tcount;
}
}
class OLI_LU_HOLDTYPE {
/*
* Pri vuzove zavazan na drugoj class
*/
public $HoldingTypeCode = 'Policy'; // string
public $tc; // OLI_LU_HOLDTYPE_TC
function __construct(){
$tc = new OLI_LU_HOLDSTAT_TC();
// теперь $tc->tcount будет содержать 2
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question