/**
  * @param phpMorphy_Dict_Lemma $lemma
  * @return string
  */
 function formatLemma(phpMorphy_Dict_Lemma $lemma)
 {
     return $this->formatSimpleModel('Lemma', array('id' => $lemma->getId(), 'base' => $lemma->getBase(), 'flexia_id' => $lemma->getFlexiaId(), 'common_ancode_id' => $lemma->hasAncodeId() ? $lemma->getAncodeId() : null, 'common_prefix_id' => $lemma->hasPrefixId() ? $lemma->getPrefixId() : null, 'accent_id' => $lemma->getAccentId()));
 }
 public function hasPrefixId()
 {
     $result = $this->object->hasPrefixId();
     return $result === $this->object ? $this : $result;
 }
Beispiel #3
0
 private function checkConsistencyForLemma(phpMorphy_Dict_Lemma $lemma)
 {
     if ($lemma->hasAncodeId()) {
         if (!$this->ancodes->hasId($lemma->getAncodeId())) {
             return false;
         }
     }
     if ($lemma->hasPrefixId()) {
         if (!$this->prefixes->hasId($lemma->getPrefixId())) {
             return false;
         }
     }
     if (!$this->flexias->hasId($lemma->getFlexiaId())) {
         return false;
     }
     return true;
 }