Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F32063927
footofeminin.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
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
Mon, Jun 8, 08:57 (1 d, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3770400
Default Alt Text
footofeminin.php (1006 B)
Attached To
Mode
rSTG Source templates generator
Attached
Detach File
Event Timeline
Log In to Comment