equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Tool |
16 * @package Zend_Tool |
17 * @subpackage Framework |
17 * @subpackage Framework |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: BootstrapFile.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: BootstrapFile.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * This class is the front most class for utilizing Zend_Tool_Project |
24 * This class is the front most class for utilizing Zend_Tool_Project |
25 * |
25 * |
26 * A profile is a hierarchical set of resources that keep track of |
26 * A profile is a hierarchical set of resources that keep track of |
27 * items within a specific project. |
27 * items within a specific project. |
28 * |
28 * |
29 * @category Zend |
29 * @category Zend |
30 * @package Zend_Tool |
30 * @package Zend_Tool |
31 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
31 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 */ |
33 */ |
34 class Zend_Tool_Project_Context_Zf_BootstrapFile extends Zend_Tool_Project_Context_Filesystem_File |
34 class Zend_Tool_Project_Context_Zf_BootstrapFile extends Zend_Tool_Project_Context_Filesystem_File |
35 { |
35 { |
36 |
36 |
41 |
41 |
42 /** |
42 /** |
43 * @var Zend_Tool_Project_Profile_Resource |
43 * @var Zend_Tool_Project_Profile_Resource |
44 */ |
44 */ |
45 protected $_applicationConfigFile = null; |
45 protected $_applicationConfigFile = null; |
46 |
46 |
47 /** |
47 /** |
48 * @var Zend_Tool_Project_Profile_Resource |
48 * @var Zend_Tool_Project_Profile_Resource |
49 */ |
49 */ |
50 protected $_applicationDirectory = null; |
50 protected $_applicationDirectory = null; |
51 |
51 |
52 /** |
52 /** |
53 * @var Zend_Application |
53 * @var Zend_Application |
54 */ |
54 */ |
55 protected $_applicationInstance = null; |
55 protected $_applicationInstance = null; |
56 |
56 |
96 ) |
96 ) |
97 )); |
97 )); |
98 |
98 |
99 return $codeGenFile->generate(); |
99 return $codeGenFile->generate(); |
100 } |
100 } |
101 |
101 |
102 public function getApplicationInstance() |
102 public function getApplicationInstance() |
103 { |
103 { |
104 if ($this->_applicationInstance == null) { |
104 if ($this->_applicationInstance == null) { |
105 if ($this->_applicationConfigFile->getContext()->exists()) { |
105 if ($this->_applicationConfigFile->getContext()->exists()) { |
106 define('APPLICATION_PATH', $this->_applicationDirectory->getPath()); |
106 define('APPLICATION_PATH', $this->_applicationDirectory->getPath()); |
107 $applicationOptions = array(); |
107 $applicationOptions = array(); |
108 $applicationOptions['config'] = $this->_applicationConfigFile->getPath(); |
108 $applicationOptions['config'] = $this->_applicationConfigFile->getPath(); |
109 |
109 |
110 $this->_applicationInstance = new Zend_Application( |
110 $this->_applicationInstance = new Zend_Application( |
111 'development', |
111 'development', |
112 $applicationOptions |
112 $applicationOptions |
113 ); |
113 ); |
114 } |
114 } |
115 } |
115 } |
116 |
116 |
117 return $this->_applicationInstance; |
117 return $this->_applicationInstance; |
118 } |
118 } |
119 } |
119 } |