public static function getNumerator($name) { $template = NumeratorTemplate::findByName($name); if (!isset($template)) { throw new InvalidArgumentException("Invalid numerator name - \"{$name}\""); } $masker = new NumeratorMasker(['mask' => $template->mask]); return new self(compact('template', 'masker')); }
public function getNumerators() { return $this->hasMany(NumeratorTemplate::className(), ['FK_type' => 'id']); }