/**
  * @return \AGmakonts\STL\String\String
  */
 public function name() : string
 {
     if (1 === count($this->names)) {
         return $this->names()[0]->name();
     } else {
         $scalarNames = [];
         /** @var Name $name */
         foreach ($this->names() as $name) {
             $scalarNames[] = $name->name()->value();
         }
         return String::get(implode($this->glue()->value(), $scalarNames));
     }
 }
示例#2
0
 /**
  * @param \AGmakonts\STL\String\String $name
  *
  * @return \AGmakonts\STL\String\String
  */
 private static function filterName(string $name) : string
 {
     $nameValue = $name->value();
     $filterChain = new FilterChain();
     $filterChain->attach(new StripNewlines());
     $filterChain->attach(new StripTags());
     $filterChain->attach(new StringTrim());
     $filterChain->attach(new StringToLower());
     $filterChain->attach(new Callback(function ($value) {
         return ucwords($value);
     }));
     $filteredValue = $filterChain->filter($nameValue);
     return String::get($filteredValue);
 }
 /**
  * @return \AGmakonts\STL\String\String
  */
 public function outgoing() : string
 {
     return String::get('Effect');
 }
示例#4
0
 /**
  * @return mixed
  */
 public function type() : string
 {
     return String::get('Death');
 }