本文整理汇总了PHP中Page::analyse方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::analyse方法的具体用法?PHP Page::analyse怎么用?PHP Page::analyse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page
的用法示例。
在下文中一共展示了Page::analyse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: analyse
function analyse()
{
parent::analyse();
if (substr($this->url, 0, 30) == "http://www.worldcat.org/title/" && preg_match("@/oclc/([0-9]*)@", $this->url, $matches)) {
$this->switchTo = ['document' => ['class' => 'Book', 'params' => ['OCLC' => $matches[1]], 'method' => 'queryWorldCatFromOCLC'], 'template' => 'book'];
}
}
示例2: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
$this->skipAuthor = true;
$this->extractYYYYMMDDDateFromURL();
$this->site = "[[Anime News Network]]";
}
示例3: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
// Hardcoded known info
$this->site = "Footoféminin";
$this->parseDate();
}
示例4: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
$this->author = self::between('rel="author">', '</a>');
$this->extractYYYYMMDDDateFromURL();
$this->site = "[[AnimeLand]]";
}
示例5: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
$this->site = '[[Los Angeles Times]]';
$this->antiAdBlocker = true;
$this->author = self::between('<span itemprop="author">', '</span');
}
示例6: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
$this->site = "[[Le Huffington Post]]";
$this->author = self::between('<a class="author-card__details__name">', '</a>');
$this->extractYYYYMMDDDateFromURL();
}
示例7: analyse
function analyse()
{
parent::analyse();
$this->publisher = 'Taylor & Francis';
//DOI
$this->doi = self::between('meta name="dc.Identifier" scheme="doi" content="', '"');
//Gets the right dc.Identifier (coden scheme)
//Expected format: <Issue name>, Vol. <Issue volume>, No. <Issue number>, <Issue date>, pp. <article pages>
//e.g. Annals of Science, Vol. 68, No. 3, July 2011, pp. 325–350
$identifier = self::between('meta name="dc.Identifier" scheme="coden" content="', '"');
$identifier_data = explode(', ', $identifier);
$pos = strpos($identifier, ", Vol. ");
$this->journal = substr($identifier, 0, $pos);
$this->volume = self::grab($identifier, "Vol. ", ",");
$this->issue = self::grab($identifier, "No. ", ",");
$date = explode(' ', $identifier_data[3]);
$this->yyyy = array_pop($date);
$pos = strpos($identifier, "pp. ");
$this->pages = substr($identifier, $pos + 4);
//Author
//TODO: handle several authors
$author = trim(self::getMetaTag($this->meta_tags, 'dc.Creator'));
$names = explode(' ', $author);
if (count($names) == 2) {
$this->author = "{$names['1']}, {$names['0']}";
} else {
$this->author = $author;
}
}
示例8: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
$author = self::between('<span itemprop="author">', '</span>');
$this->author = name_case($author);
$this->extractDate();
$this->site = "[[L'Avenir (Belgique)|L'Avenir]]";
}
示例9: analyse
function analyse()
{
parent::analyse();
//Fixing citation_doi metatag bug
//<meta name="citation_doi" content=" 10.7202/012719ar" />
$doi = str_replace(' ', '', $this->meta_tags['citation_doi']);
$this->meta_tags['citation_doi'] = trim($doi);
}
示例10: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
$authorElement = self::between('<div class="byline">', '</div>');
$this->author = self::grab($authorElement, '">', '</a>');
$this->extractYYYYMMDDDateFromURL();
$this->site = "[[Crunchyroll]]";
}
示例11: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
$this->skipAuthor = true;
$this->title = $this->getTitle();
$this->yyyy = $this->getYear();
$this->skipMD = true;
$this->site = "Formula 1";
}
示例12: analyse
function analyse()
{
parent::analyse();
//Hardcoded known info
$this->site = "Les Chroniques Automatiques";
$this->author = "Dat’";
//Gets date
$this->dateFromDateParse(trim(self::between('This entry was posted on', 'and is filed under')));
}
示例13: analyse
function analyse()
{
parent::analyse();
$this->site = "[[Le Soir]]";
if ($this->isArchive()) {
$this->analyseForArchive();
} else {
$this->analyseForMainSite();
}
}
示例14: analyse
function analyse()
{
parent::analyse();
//Hardcoded known info
$this->site = "[[Le Monde]]";
$this->issn = '1950-6244';
//Gets date
// e.g. http://www.lemonde.fr/ameriques/article/2013/05/25/le-bresil-annule-la-dette-de-douze-pays-africains_3417518_3222.html
$pos = strpos($this->url, "/article/");
$this->yyyy = substr($this->url, $pos + 9, 4);
$this->mm = substr($this->url, $pos + 14, 2);
$this->dd = substr($this->url, $pos + 17, 2);
$this->author = $this->getAuthor();
}
示例15: analyse
/**
* Analyses the page and extracts metadata
*/
function analyse()
{
parent::analyse();
// Hardcoded known info
$this->site = "[[Le Parisien]]";
// From metadata
$this->dateFromDateParse($this->meta_tags['article:published_time']);
$author = $this->meta_tags['creator'];
if ($author === "Le Parisien") {
$this->skipAuthor = true;
} else {
$this->author = $author;
}
}