github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/app/php/meta.go (about)

     1  package phpapp
     2  
     3  import (
     4  	"github.com/hashicorp/otto/app"
     5  	"github.com/hashicorp/otto/appfile/detect"
     6  )
     7  
     8  // AppFactory is the factory for this app
     9  func AppFactory() app.App {
    10  	return &App{}
    11  }
    12  
    13  // Meta is the metadata for this app type
    14  var Meta = &app.Meta{
    15  	Tuples:    Tuples,
    16  	Detectors: Detectors,
    17  }
    18  
    19  // Tuples is the list of tuples that this built-in app implementation knows
    20  // that it can support.
    21  var Tuples = app.TupleSlice([]app.Tuple{
    22  	{"php", "*", "*"},
    23  	{"wordpress", "*", "*"},
    24  })
    25  
    26  // Detectors is the list of detectors that trigger this app to be used.
    27  var Detectors = []*detect.Detector{
    28  	&detect.Detector{
    29  		Type: "wordpress",
    30  		File: []string{"wp-config.php", "wp-config-sample.php"},
    31  	},
    32  	&detect.Detector{
    33  		Type: "php",
    34  		File: []string{"*.php", "composer.json"},
    35  	},
    36  }