expectsLongNames() публичный Метод

public expectsLongNames ( ) : boolean
Результат boolean
Пример #1
0
 /**
  * @param IdentifiableInterface $subject
  * @param string $form
  * @param bool $preposition
  * @return string
  * @throws MisconfigurationException
  */
 public function translate(IdentifiableInterface $subject, $form = 'default', $preposition = true)
 {
     if ($form != 'default' and !isset($this->defaultPrepositions[$form])) {
         throw new MisconfigurationException('Language ' . $this->code . ' doesn\'t inflict to ' . $form);
     }
     $result = $subject->expectsLongNames() ? $this->getLongName($subject->getMeta()) : $this->getShortName($subject->getMeta());
     if ($preposition && $form != 'default') {
         $result = $this->defaultPrepositions[$form] . ' ' . $result;
     }
     return $result;
 }