Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
APNSFramework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zandor Smith
APNSFramework
Commits
3ecf446c
Commit
3ecf446c
authored
4 years ago
by
Zandor Smith
Browse files
Options
Downloads
Patches
Plain Diff
Rename authKeyUrl to authKeyPath and deprecate the old getter.
parent
4421da02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#15349
passed
4 years ago
Stage: lint
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apnsframework/APNS.php
+12
-5
12 additions, 5 deletions
apnsframework/APNS.php
with
12 additions
and
5 deletions
apnsframework/APNS.php
+
12
−
5
View file @
3ecf446c
...
...
@@ -30,10 +30,10 @@ class APNS {
*/
private
$authKeyId
;
public
function
__construct
(
$teamId
,
$bundleId
,
$authKey
Url
,
$authKeyId
)
{
public
function
__construct
(
$teamId
,
$bundleId
,
$authKey
Path
,
$authKeyId
)
{
$this
->
teamId
=
$teamId
;
$this
->
bundleId
=
$bundleId
;
$this
->
authKey
Url
=
$authKey
Url
;
$this
->
authKey
Path
=
$authKey
Path
;
$this
->
authKeyId
=
$authKeyId
;
}
...
...
@@ -53,11 +53,19 @@ class APNS {
/**
* @return string
* @deprecated Use getAuthKeyPath() instead.
*/
public
function
getAuthKeyUrl
():
string
{
return
$this
->
a
uthKey
Url
;
return
$this
->
getA
uthKey
Path
()
;
}
/**
* @return string
*/
public
function
getAuthKeyPath
():
string
{
return
$this
->
authKeyPath
;
}
/**
* @return string
*/
...
...
@@ -72,7 +80,7 @@ class APNS {
* @throws APNSException
*/
public
function
sendNotification
(
APNSNotification
$notification
,
APNSToken
$token
):
void
{
$authKey
=
file_get_contents
(
$this
->
authKey
Url
);
$authKey
=
file_get_contents
(
$this
->
authKey
Path
);
if
(
$authKey
==
false
)
{
throw
new
APNSException
(
"Can't read auth key. Failed to read file."
);
}
...
...
@@ -105,5 +113,4 @@ class APNS {
curl_close
(
$ch
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment