示例#1
0
 function __construct($authors)
 {
     // Each element of this array is alternative match
     $this->filters = array();
     if (!isset($authors) || empty($authors)) {
     } else {
         if (!is_string($authors)) {
             echo "Warning: cannot parse option \"authors\", this is specified by string!<br>";
             // probably useless..
             // string contains both: & and | => this is not supported
         } else {
             require_once dirname(__FILE__) . "/lib/bibtex_common.php";
             foreach (preg_split("-\\|-", $authors) as $conjonction) {
                 $this->filters[] = PaperciteBibtexCreators::parse($conjonction);
             }
         }
     }
 }
 /**
  * Extracting the authors
  *
  * @access private
  * @param string $entry The entry with the authors
  * @return array the extracted authors
  */
 static function _extractAuthors($authors)
 {
     return PaperciteBibtexCreators::parse($authors);
 }