Closed maximejobin closed 5 years ago
I was looking at how it works to create a PO file from scratch and saw this function:
https://github.com/oscarotero/Gettext/blob/901c9d9c85d3f1fb9415c7ebcc314bd3ad2a4fc1/src/Translations.php#L206
What is the purpose of the $index parameter as it's not used in the function.
$index
Am I missing something ?
This parameter is only to comply with the ArrayAccess interface (https://www.php.net/manual/en/arrayaccess.offsetset.php) used by this class to allow to get/set translations using the array syntax.
I was looking at how it works to create a PO file from scratch and saw this function:
https://github.com/oscarotero/Gettext/blob/901c9d9c85d3f1fb9415c7ebcc314bd3ad2a4fc1/src/Translations.php#L206
What is the purpose of the
$index
parameter as it's not used in the function.Am I missing something ?