private function getArrayIndexByKeyValue($array, $value, $key = 'id')
    {
        foreach ($array as $index => $result) {
            if ($result[$key] === $value) {
                return $index;
            }
        }

        return false;
    }