|
@@ 42-53 (lines=12) @@
|
| 39 |
|
*
|
| 40 |
|
* @return array
|
| 41 |
|
*/
|
| 42 |
|
public function getVariantsByCriteria(CDbCriteria $criteria, $refresh = false, $indexBy = null)
|
| 43 |
|
{
|
| 44 |
|
$key = serialize($criteria);
|
| 45 |
|
|
| 46 |
|
if( !isset($this->variants[$key]) || $refresh )
|
| 47 |
|
{
|
| 48 |
|
$command = $this->builder->createFindCommand(self::VARIANT_TABLE, $criteria);
|
| 49 |
|
$this->variants[$key] = $this->indexData($command->queryAll(), $indexBy);
|
| 50 |
|
}
|
| 51 |
|
|
| 52 |
|
return $this->variants[$key];
|
| 53 |
|
}
|
| 54 |
|
|
| 55 |
|
/**
|
| 56 |
|
* @param string $condition
|
|
@@ 79-90 (lines=12) @@
|
| 76 |
|
*
|
| 77 |
|
* @return array
|
| 78 |
|
*/
|
| 79 |
|
public function getParametersNameByCriteria(CDbCriteria $criteria, $refresh = false, $indexBy = null)
|
| 80 |
|
{
|
| 81 |
|
$key = serialize($criteria);
|
| 82 |
|
|
| 83 |
|
if( !isset($this->parametersName[$key]) || $refresh )
|
| 84 |
|
{
|
| 85 |
|
$command = $this->builder->createFindCommand(self::PARAMETER_NAME_TABLE, $criteria);
|
| 86 |
|
$this->parametersName[$key] = $this->indexData($command->queryAll(), $indexBy);
|
| 87 |
|
}
|
| 88 |
|
|
| 89 |
|
return $this->parametersName[$key];
|
| 90 |
|
}
|
| 91 |
|
|
| 92 |
|
/**
|
| 93 |
|
* @param CDbCriteria $criteria
|
|
@@ 99-110 (lines=12) @@
|
| 96 |
|
*
|
| 97 |
|
* @return array
|
| 98 |
|
*/
|
| 99 |
|
public function getParametersByCriteria(CDbCriteria $criteria, $refresh = false, $indexBy = 'id')
|
| 100 |
|
{
|
| 101 |
|
$key = serialize($criteria);
|
| 102 |
|
|
| 103 |
|
if( !isset($this->parameters[$key]) || $refresh )
|
| 104 |
|
{
|
| 105 |
|
$command = $this->builder->createFindCommand(self::PARAMETER_TABLE, $criteria);
|
| 106 |
|
$this->parameters[$key] = $this->indexData($command->queryAll(), $indexBy);
|
| 107 |
|
}
|
| 108 |
|
|
| 109 |
|
return $this->parameters[$key];
|
| 110 |
|
}
|
| 111 |
|
|
| 112 |
|
/**
|
| 113 |
|
* @param string $condition
|