1153N/A/*
1153N/A * CDDL HEADER START
1153N/A *
1153N/A * The contents of this file are subject to the terms of the
1153N/A * Common Development and Distribution License (the "License").
1153N/A * You may not use this file except in compliance with the License.
1153N/A *
1153N/A * See LICENSE.txt included in this distribution for the specific
1153N/A * language governing permissions and limitations under the License.
1153N/A *
1153N/A * When distributing Covered Code, include this CDDL HEADER in each
1153N/A * file and include the License file at LICENSE.txt.
1153N/A * If applicable, add the following below this CDDL HEADER, with the
1153N/A * fields enclosed by brackets "[]" replaced with your own identifying
1153N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1153N/A *
1153N/A * CDDL HEADER END
1153N/A */
1153N/A
1153N/Apackage org.opensolaris.opengrok.analysis.php;
1153N/A
1153N/Aimport java.io.IOException;
1153N/Aimport java.io.Reader;
1384N/A
1153N/Aimport org.opensolaris.opengrok.analysis.Definitions;
1153N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzer;
1153N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzer.Genre;
1153N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzerFactory;
1384N/Aimport org.opensolaris.opengrok.analysis.XrefWriter;
1153N/Aimport org.opensolaris.opengrok.configuration.Project;
1153N/Aimport org.opensolaris.opengrok.history.Annotation;
1153N/A
1153N/Apublic class PhpAnalyzerFactory extends FileAnalyzerFactory {
1153N/A
1153N/A private static final String[] SUFFIXES = {
1153N/A "PHP",
1153N/A "PHP3",
1153N/A "PHP4",
1153N/A "PHPS",
1153N/A "PHTML"
1153N/A };
1153N/A private static final String[] MAGICS = {
1153N/A "#!/usr/bin/env php",
1153N/A "#!/usr/bin/php",
1153N/A "#!/bin/php"
1153N/A };
1153N/A
1153N/A public PhpAnalyzerFactory() {
1153N/A super(null, SUFFIXES, MAGICS, null, "text/plain", Genre.PLAIN);
1153N/A }
1153N/A
1153N/A @Override
1153N/A protected FileAnalyzer newAnalyzer() {
1153N/A return new PhpAnalyzer(this);
1153N/A }
1153N/A
1153N/A @Override
1384N/A public void writeXref(Reader in, XrefWriter out, Definitions defs, Annotation annotation, Project project)
1153N/A throws IOException {
1153N/A PhpAnalyzer.writeXref(in, out, defs, annotation, project);
1153N/A }
1153N/A}