当前位置: 首页>>代码示例>>PHP>>正文


PHP Page::analyse方法代码示例

本文整理汇总了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'];
     }
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:7,代码来源:worldcat.php

示例2: analyse

 /**
  * Analyses the page and extracts metadata
  */
 function analyse()
 {
     parent::analyse();
     $this->skipAuthor = true;
     $this->extractYYYYMMDDDateFromURL();
     $this->site = "[[Anime News Network]]";
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:10,代码来源:animenewsnetwork.php

示例3: analyse

 /**
  * Analyses the page and extracts metadata
  */
 function analyse()
 {
     parent::analyse();
     // Hardcoded known info
     $this->site = "Footoféminin";
     $this->parseDate();
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:10,代码来源:footofeminin.php

示例4: analyse

 /**
  * Analyses the page and extracts metadata
  */
 function analyse()
 {
     parent::analyse();
     $this->author = self::between('rel="author">', '</a>');
     $this->extractYYYYMMDDDateFromURL();
     $this->site = "[[AnimeLand]]";
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:10,代码来源:animeland.php

示例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');
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:10,代码来源:losangelestimes.php

示例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();
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:10,代码来源:huffingtonpostfrance.php

示例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;
     }
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:29,代码来源:taylorandfrancis.php

示例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]]";
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:11,代码来源:lavenir.php

示例9: analyse

 function analyse()
 {
     parent::analyse();
     //Fixing citation_doi metatag bug
     //<meta name="citation_doi" content="&#10;                    10.7202/012719ar" />
     $doi = str_replace('&#10;', '', $this->meta_tags['citation_doi']);
     $this->meta_tags['citation_doi'] = trim($doi);
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:8,代码来源:erudit.php

示例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]]";
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:11,代码来源:crunchyroll.php

示例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";
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:12,代码来源:formula1.php

示例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')));
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:9,代码来源:leschroniquesautomatiques.php

示例13: analyse

 function analyse()
 {
     parent::analyse();
     $this->site = "[[Le Soir]]";
     if ($this->isArchive()) {
         $this->analyseForArchive();
     } else {
         $this->analyseForMainSite();
     }
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:10,代码来源:lesoir.php

示例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();
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:14,代码来源:lemonde.php

示例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;
     }
 }
开发者ID:dereckson,项目名称:source-templates-generator,代码行数:17,代码来源:leparisien.php


注:本文中的Page::analyse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。