Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56961118
footofeminin.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1006 B
Referenced Files
None
Subscribers
None
footofeminin.php
View Options
<?php
/**
* Represents a page from the http://www.footofeminin.fr/ site.
*/
class
FootOFemininPage
extends
Page
{
/**
* Analyses the page and extracts metadata
*/
function
analyse
()
{
parent
::
analyse
();
// Hardcoded known info
$this
->
site
=
"Footoféminin"
;
$this
->
parseDate
();
}
/**
* @return string The date published in the article
*/
function
extractDate
()
{
// Date is stored in HTML code as:
// <div id="date" class="date">
// <div class="access">Mardi 15 Nomvebre 2016</div>
// </div>
$dateId
=
self
::
between
(
'<div id="date" class="date">'
,
'</div>'
);
return
self
::
grab
(
$dateId
,
'<div class="access">'
);
}
/**
* Parses a date and fill dd, mm, yyyy properties.
*/
function
parseDate
()
{
$date
=
explode
(
' '
,
$this
->
extractDate
());
$this
->
dd
=
$date
[
1
];
$this
->
mm
=
strtolower
(
$date
[
2
]);
$this
->
yyyy
=
$date
[
3
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 13, 20:03 (2 d, 3 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4249720
Default Alt Text
footofeminin.php (1006 B)
Attached To
Mode
rSTG Source templates generator
Attached
Detach File
Event Timeline
Log In to Comment