Rev 1447 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1447 | Rev 1450 | ||
---|---|---|---|
Line 43... | Line 43... | ||
43 | * @var bool |
43 | * @var bool |
44 | */ |
44 | */ |
45 | protected /*bool*/ $slangDetectionDone = false; |
45 | protected /*bool*/ $slangDetectionDone = false; |
46 | 46 | ||
47 | /** |
47 | /** |
- | 48 | * @var OIDplusSqlSlangPlugin |
|
- | 49 | */ |
|
- | 50 | private $slangCache = null; |
|
- | 51 | ||
- | 52 | /** |
|
48 | * @param string $sql |
53 | * @param string $sql |
49 | * @param array|null $prepared_args |
54 | * @param array|null $prepared_args |
50 | * @return OIDplusQueryResult |
55 | * @return OIDplusQueryResult |
51 | * @throws OIDplusException |
56 | * @throws OIDplusException |
52 | */ |
57 | */ |
Line 399... | Line 404... | ||
399 | * @return OIDplusSqlSlangPlugin|null |
404 | * @return OIDplusSqlSlangPlugin|null |
400 | * @throws OIDplusConfigInitializationException |
405 | * @throws OIDplusConfigInitializationException |
401 | * @throws OIDplusException |
406 | * @throws OIDplusException |
402 | */ |
407 | */ |
403 | public final function getSlang(bool $mustExist=true)/*: ?OIDplusSqlSlangPlugin*/ { |
408 | public final function getSlang(bool $mustExist=true)/*: ?OIDplusSqlSlangPlugin*/ { |
404 | static /*?OIDplusSqlSlangPlugin*/ $slangCache = null; |
- | |
405 | - | ||
406 | if ($this->slangDetectionDone) { |
409 | if ($this->slangDetectionDone) { |
407 | return $slangCache; |
410 | return $this->slangCache; |
408 | } |
411 | } |
409 | 412 | ||
410 | $slangCache = $this->doGetSlang(); |
413 | $this->slangCache = $this->doGetSlang(); |
411 | $this->slangDetectionDone = true; |
414 | $this->slangDetectionDone = true; |
412 | return $slangCache; |
415 | return $this->slangCache; |
413 | } |
416 | } |
414 | 417 | ||
415 | /** |
418 | /** |
416 | * @return array |
419 | * @return array |
417 | */ |
420 | */ |