Answer the question
In order to leave comments, you need to log in
Classes, objects, templates - how right!?
So I came to the study of OOP, swam a little ...
For example, I have an array that can consist of a number, a string, or contain array attachments.
(он больше, но структура такая...)
$cfg = array (
'sett' => array (
'agent' => 11,
'search' => 90,
'check' => 3,
'crypt' => array (
'key' => 'XXXXXXXXXXXXXXXXXXX',
'secret' => 'XXXXXXXXXXXXXXXXXXX'
)
),
'cargo' => array (
'JDE' => array (
'name' => 'XXXXXXXXXXXXXXXXXXX',
'user' => 'XXXXXXXXXXXXXXXXXXX',
'token' => 'XXXXXXXXXXXXXXXXXXX',
'login' => 'XXXXXXXXXXXXXXXXXXX',
'pass' => 'XXXXXXXXXXXXXXXXXXX'
),
'DL' => array (
'name' => 'XXXXXXXXXXXXXXXXXXX',
'user' => 'XXXXXXXXXXXXXXXXXXX',
'token' => 'XXXXXXXXXXXXXXXXXXX',
'login' => 'XXXXXXXXXXXXXXXXXXX',
'pass' => 'XXXXXXXXXXXXXXXXXXX'
)
)
);
int(90)
["check"] =>
int(3)
["crypt"] =>
array(2) {
["key"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["secret"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
}
}
["cargo"] =>
array(2) {
["JDE"] =>
array(5) {
["name"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["user"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["token"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["login"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["pass"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
}
["DL"] =>
array(5) {
["name"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["user"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["token"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["login"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
["pass"] =>
string(19) "XXXXXXXXXXXXXXXXXXX"
}
}
}
Answer the question
In order to leave comments, you need to log in
How exactly should I store the config data?!
return [
//тут конфиг
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question