Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
2b7f3b34
Commit
2b7f3b34
authored
Jun 02, 2016
by
Dominik Hebeler
Browse files
Type Deklarationen für String entfernt, da dies in anderen php Versionen Fehler verursacht hat
parent
e060ccae
Changes
36
Show whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
2b7f3b34
...
...
@@ -599,7 +599,7 @@ class MetaGer
{
return
$this
->
stopWords
;
}
public
function
getHostCount
(
String
$host
)
public
function
getHostCount
(
$host
)
{
if
(
isset
(
$this
->
addedHosts
[
$host
]))
{
...
...
@@ -609,7 +609,7 @@ class MetaGer
return
0
;
}
}
public
function
addHostCount
(
String
$host
)
public
function
addHostCount
(
$host
)
{
$hash
=
md5
(
$host
);
if
(
isset
(
$this
->
addedHosts
[
$hash
]))
...
...
@@ -624,7 +624,7 @@ class MetaGer
{
return
$this
->
site
;
}
public
function
addLink
(
String
$link
)
public
function
addLink
(
$link
)
{
$hash
=
md5
(
$link
);
if
(
isset
(
$this
->
addedLinks
[
$hash
]))
...
...
@@ -638,7 +638,7 @@ class MetaGer
}
}
public
function
generateSearchLink
(
String
$fokus
)
public
function
generateSearchLink
(
$fokus
)
{
$requestData
=
$this
->
request
->
except
(
'page'
);
$requestData
[
'focus'
]
=
$fokus
;
...
...
@@ -654,7 +654,7 @@ class MetaGer
return
$link
;
}
public
function
generateSiteSearchLink
(
String
$host
)
public
function
generateSiteSearchLink
(
$host
)
{
$host
=
urlencode
(
$host
);
$requestData
=
$this
->
request
->
except
(
'page'
);
...
...
@@ -664,7 +664,7 @@ class MetaGer
return
$link
;
}
public
function
generateRemovedHostLink
(
String
$host
)
public
function
generateRemovedHostLink
(
$host
)
{
$host
=
urlencode
(
$host
);
$requestData
=
$this
->
request
->
except
(
'page'
);
...
...
@@ -673,7 +673,7 @@ class MetaGer
return
$link
;
}
public
function
generateRemovedDomainLink
(
String
$domain
)
public
function
generateRemovedDomainLink
(
$domain
)
{
$domain
=
urlencode
(
$domain
);
$requestData
=
$this
->
request
->
except
(
'page'
);
...
...
app/Models/Result.php
View file @
2b7f3b34
...
...
@@ -193,7 +193,7 @@ class Result
}
}
private
function
getStrippedHost
(
String
$link
)
private
function
getStrippedHost
(
$link
)
{
if
(
strpos
(
$link
,
"http"
)
!==
0
)
$link
=
"http://"
.
$link
;
...
...
@@ -201,7 +201,7 @@ class Result
$link
=
preg_replace
(
"/^www\./si"
,
""
,
$link
);
return
$link
;
}
private
function
getStrippedLink
(
String
$link
)
private
function
getStrippedLink
(
$link
)
{
if
(
strpos
(
$link
,
"http"
)
!==
0
)
$link
=
"http://"
.
$link
;
...
...
@@ -210,7 +210,7 @@ class Result
return
$host
.
$path
;
}
private
function
getStrippedDomain
(
String
$link
)
private
function
getStrippedDomain
(
$link
)
{
if
(
preg_match
(
"/([^\.]*\.[^\.]*)$/si"
,
$link
,
$match
))
{
...
...
@@ -221,7 +221,7 @@ class Result
}
}
private
function
generateProxyLink
(
String
$link
)
private
function
generateProxyLink
(
$link
)
{
if
(
!
$link
)
return
""
;
...
...
app/Models/Searchengine.php
View file @
2b7f3b34
...
...
@@ -73,7 +73,7 @@ abstract class Searchengine
}
public
abstract
function
loadResults
(
String
$result
);
public
abstract
function
loadResults
(
$result
);
private
function
writeRequest
()
{
...
...
@@ -168,7 +168,7 @@ abstract class Searchengine
return
$fp
;
}
private
function
setStatistic
(
String
$key
,
float
$val
)
private
function
setStatistic
(
$key
,
float
$val
)
{
$oldVal
=
floatval
(
Redis
::
hget
(
$this
->
name
,
$key
))
*
$this
->
uses
;
...
...
@@ -177,7 +177,7 @@ abstract class Searchengine
$this
->
$key
=
$newVal
;
}
public
function
disable
(
string
$sumaFile
,
string
$message
)
public
function
disable
(
$sumaFile
,
$message
)
{
Log
::
info
(
$message
);
$xml
=
simplexml_load_file
(
$sumaFile
);
...
...
@@ -185,7 +185,7 @@ abstract class Searchengine
$xml
->
saveXML
(
$sumaFile
);
}
public
function
enable
(
string
$sumaFile
,
string
$message
)
public
function
enable
(
$sumaFile
,
$message
)
{
Log
::
info
(
$message
);
$xml
=
simplexml_load_file
(
$sumaFile
);
...
...
app/Models/parserSkripte/Allesklar.php
View file @
2b7f3b34
...
...
@@ -13,7 +13,7 @@ class Allesklar extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$crawler
=
new
Crawler
(
utf8_decode
(
$result
));
$crawler
=
$crawler
...
...
app/Models/parserSkripte/BASE.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class BASE extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$title
=
""
;
...
...
app/Models/parserSkripte/Bing.php
View file @
2b7f3b34
...
...
@@ -13,7 +13,7 @@ class Bing extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$crawler
=
new
Crawler
(
$result
);
...
...
app/Models/parserSkripte/Dmoznebel.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Dmoznebel extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$title
=
""
;
...
...
app/Models/parserSkripte/Dmoznebel_int.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Dmoznebel_int extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$title
=
""
;
...
...
app/Models/parserSkripte/Ebay.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Ebay extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
try
{
$content
=
simplexml_load_string
(
$result
);
...
...
app/Models/parserSkripte/Exalead.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Exalead extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$title
=
""
;
...
...
app/Models/parserSkripte/Fastbot.php
View file @
2b7f3b34
...
...
@@ -17,7 +17,7 @@ class Fastbot extends Searchengine
}
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$result
=
utf8_encode
(
$result
);
$counter
=
0
;
...
...
app/Models/parserSkripte/Goyax.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Goyax extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
die
(
$result
);
$results
=
trim
(
$result
);
...
...
app/Models/parserSkripte/Mg_hochsch_de.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Mg_hochsch_de extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
die
(
$result
);
$results
=
trim
(
$result
);
...
...
app/Models/parserSkripte/Minisucher.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Minisucher extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$content
)
public
function
loadResults
(
$content
)
{
$content
=
simplexml_load_string
(
$content
);
if
(
!
$content
)
...
...
app/Models/parserSkripte/Mnogosearch.php
View file @
2b7f3b34
...
...
@@ -13,7 +13,7 @@ class Mnogosearch extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$counter
=
0
;
$crawler
=
new
Crawler
(
$result
);
...
...
app/Models/parserSkripte/Nebel.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Nebel extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$results
=
trim
(
$result
);
foreach
(
explode
(
"
\n
"
,
$results
)
as
$result
)
...
...
app/Models/parserSkripte/Onenewspage.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Onenewspage extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$results
=
trim
(
$result
);
...
...
app/Models/parserSkripte/Onenewspagegermany.php
View file @
2b7f3b34
...
...
@@ -13,7 +13,7 @@ class Onenewspagegermany extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$counter
=
0
;
foreach
(
explode
(
"
\n
"
,
$result
)
as
$line
)
...
...
app/Models/parserSkripte/Onenewspagevideo.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Onenewspagevideo extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
$results
=
trim
(
$result
);
foreach
(
explode
(
"
\n
"
,
$results
)
as
$result
)
...
...
app/Models/parserSkripte/Opencrawlastronomie.php
View file @
2b7f3b34
...
...
@@ -12,7 +12,7 @@ class Opencrawlastronomie extends Searchengine
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
String
$result
)
public
function
loadResults
(
$result
)
{
try
{
$content
=
simplexml_load_string
(
$result
);
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment