示例#1
0
 function __construct($CoreDAOCodePath, $sqlCodePath, $phpCodePath, $tplCodePath, $smartyPluginDirs, $argCms, $argVersion, $schemaPath, $digestPath)
 {
     $this->CoreDAOCodePath = $CoreDAOCodePath;
     $this->sqlCodePath = $sqlCodePath;
     $this->phpCodePath = $phpCodePath;
     $this->tplCodePath = $tplCodePath;
     $this->digestPath = $digestPath;
     $this->digest = NULL;
     // default cms is 'drupal', if not specified
     $this->cms = isset($argCms) ? strtolower($argCms) : 'drupal';
     CRM_Core_CodeGen_Util_Template::$smartyPluginDirs = $smartyPluginDirs;
     $versionFile = "version.xml";
     $versionXML = CRM_Core_CodeGen_Util_Xml::parse($versionFile);
     $this->db_version = $versionXML->version_no;
     $this->buildVersion = preg_replace('/^(\\d{1,2}\\.\\d{1,2})\\.(\\d{1,2}|\\w{4,7})$/i', '$1', $this->db_version);
     if (isset($argVersion)) {
         // change the version to that explicitly passed, if any
         $this->db_version = $argVersion;
     }
     $this->schemaPath = $schemaPath;
 }