|
Revision 23310, 1.2 kB
(checked in by Kris.Wallsmith, 4 years ago)
|
[1.3] added copyright notices to propel behaviors, remove some unneeded generated methods
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
require_once 'propel/engine/database/model/Behavior.php'; |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
abstract class SfPropelBehaviorBase extends Behavior |
|---|
| 22 |
{ |
|---|
| 23 |
protected |
|---|
| 24 |
$buildProperties = null; |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
* Returns a build property from propel.ini. |
|---|
| 28 |
* |
|---|
| 29 |
* @param string $name |
|---|
| 30 |
* |
|---|
| 31 |
* @return mixed |
|---|
| 32 |
*/ |
|---|
| 33 |
protected function getBuildProperty($name) |
|---|
| 34 |
{ |
|---|
| 35 |
if (null === $this->buildProperties) |
|---|
| 36 |
{ |
|---|
| 37 |
$this->buildProperties = new Properties(); |
|---|
| 38 |
$this->buildProperties->load(new PhingFile(sfConfig::get('sf_config_dir').'/propel.ini')); |
|---|
| 39 |
} |
|---|
| 40 |
|
|---|
| 41 |
return $this->buildProperties->getProperty($name); |
|---|
| 42 |
} |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
* Returns true if the current behavior has been disabled. |
|---|
| 46 |
* |
|---|
| 47 |
* @return boolean |
|---|
| 48 |
*/ |
|---|
| 49 |
protected function isDisabled() |
|---|
| 50 |
{ |
|---|
| 51 |
return 'true' == $this->getParameter('disabled'); |
|---|
| 52 |
} |
|---|
| 53 |
} |
|---|
| 54 |
|
|---|