Mercurial > hg > Members > shoshi > webvirt
comparison app/config/bootstrap.php @ 0:261e66bd5a0c
hg init
author | Shoshi TAMAKI <shoshi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 24 Jul 2011 21:08:31 +0900 |
parents | |
children | eb4fee3d9bb8 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:261e66bd5a0c |
---|---|
1 <?php | |
2 /** | |
3 * This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php | |
4 * | |
5 * This is an application wide file to load any function that is not used within a class | |
6 * define. You can also use this to include or require any files in your application. | |
7 * | |
8 * PHP versions 4 and 5 | |
9 * | |
10 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
11 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
12 * | |
13 * Licensed under The MIT License | |
14 * Redistributions of files must retain the above copyright notice. | |
15 * | |
16 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
17 * @link http://cakephp.org CakePHP(tm) Project | |
18 * @package cake | |
19 * @subpackage cake.app.config | |
20 * @since CakePHP(tm) v 0.10.8.2117 | |
21 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) | |
22 */ | |
23 | |
24 /** | |
25 * The settings below can be used to set additional paths to models, views and controllers. | |
26 * This is related to Ticket #470 (https://trac.cakephp.org/ticket/470) | |
27 * | |
28 * App::build(array( | |
29 * 'plugins' => array('/full/path/to/plugins/', '/next/full/path/to/plugins/'), | |
30 * 'models' => array('/full/path/to/models/', '/next/full/path/to/models/'), | |
31 * 'views' => array('/full/path/to/views/', '/next/full/path/to/views/'), | |
32 * 'controllers' => array('/full/path/to/controllers/', '/next/full/path/to/controllers/'), | |
33 * 'datasources' => array('/full/path/to/datasources/', '/next/full/path/to/datasources/'), | |
34 * 'behaviors' => array('/full/path/to/behaviors/', '/next/full/path/to/behaviors/'), | |
35 * 'components' => array('/full/path/to/components/', '/next/full/path/to/components/'), | |
36 * 'helpers' => array('/full/path/to/helpers/', '/next/full/path/to/helpers/'), | |
37 * 'vendors' => array('/full/path/to/vendors/', '/next/full/path/to/vendors/'), | |
38 * 'shells' => array('/full/path/to/shells/', '/next/full/path/to/shells/'), | |
39 * 'locales' => array('/full/path/to/locale/', '/next/full/path/to/locale/') | |
40 * )); | |
41 * | |
42 */ | |
43 | |
44 /** | |
45 * As of 1.3, additional rules for the inflector are added below | |
46 * | |
47 * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); | |
48 * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); | |
49 * | |
50 */ | |
51 | |
52 class WebVirtUtil | |
53 { | |
54 static $wvirt_config = array( | |
55 "APP_NAME" => "WebVirt", | |
56 "APP_VERSION" => "11.0722", | |
57 "APP_VIRTURI" => "qemu:///system" | |
58 ); | |
59 | |
60 static $node_actions = array( | |
61 "create","network","storage", | |
62 ); | |
63 | |
64 static $domain_actions = array( | |
65 "vncviewer","shutdown","start", | |
66 ); | |
67 | |
68 public static function GetConnection() | |
69 { | |
70 $url = self::$wvirt_config["APP_VIRTURI"]; | |
71 $ret = libvirt_connect($url,false); | |
72 return $ret; | |
73 } | |
74 } |