Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
7281342d
Unverified
Commit
7281342d
authored
7 years ago
by
Tim van Dijen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
statistics: remove unused methods + phpdoc
parent
f64df4af
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/statistics/lib/LogParser.php
+28
-19
28 additions, 19 deletions
modules/statistics/lib/LogParser.php
with
28 additions
and
19 deletions
modules/statistics/lib/LogParser.php
+
28
−
19
View file @
7281342d
...
...
@@ -5,16 +5,27 @@
*/
class
sspmod_statistics_LogParser
{
/**
* @var integer
*/
private
$datestart
;
/**
* @var integer
*/
private
$datelength
;
/**
* @var integer
*/
private
$offset
;
/**
* Constructor
*
* @param $datestart At which char is the date starting
* @param $datelength How many characters is the date (on the b
* @param $offset At which char is the rest of the entries starting
* @param
integer
$datestart At which char is the date starting
* @param
integer
$datelength How many characters is the date (on the b
* @param
integer
$offset At which char is the rest of the entries starting
*/
public
function
__construct
(
$datestart
,
$datelength
,
$offset
)
{
...
...
@@ -23,6 +34,12 @@ class sspmod_statistics_LogParser
$this
->
offset
=
$offset
;
}
/**
* @param string $line
*
* @return integer
*/
public
function
parseEpoch
(
$line
)
{
$epoch
=
strtotime
(
substr
(
$line
,
0
,
$this
->
datelength
));
...
...
@@ -43,24 +60,16 @@ class sspmod_statistics_LogParser
return
$epoch
;
}
public
function
parseContent
(
$line
)
{
/**
* @param string $line
*
* @return array
*/
public
function
parseContent
(
$line
)
{
$contentstr
=
substr
(
$line
,
$this
->
offset
);
$content
=
explode
(
' '
,
$contentstr
);
return
$content
;
}
// Aug 27 12:54:25 ssp 5 STAT [5416262207] saml20-sp-SSO urn:mace:feide.no:services:no.uninett.wiki-feide sam.feide.no NA
//
// Oct 30 11:07:14 www1 simplesamlphp-foodle[12677]: 5 STAT [200b4679af] saml20-sp-SLO spinit urn:mace:feide.no:services:no.feide.foodle sam.feide.no
function
parse15
(
$str
)
{
$di
=
date_parse
(
$str
);
$datestamp
=
mktime
(
$di
[
'hour'
],
$di
[
'minute'
],
$di
[
'second'
],
$di
[
'month'
],
$di
[
'day'
]);
return
$datestamp
;
}
function
parse23
(
$str
)
{
$timestamp
=
strtotime
(
$str
);
return
$timestamp
;
}
}
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