Nette\PhpGenerator\ClassType::addComment PHP Метод

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

public addComment ( $val ) : self
Результат self
    public function addComment($val)
    {
        $this->comment .= $this->comment ? "\n{$val}" : $val;
        return $this;
    }

Usage Example

Пример #1
0
 private function createModel()
 {
     $class = new ClassType('Orm', $this->namespace);
     $class->setExtends('\\Nextras\\Orm\\Model\\Model');
     foreach ($this->parsedSql as $block) {
         if (isset($block['CREATE'], $block['TABLE'])) {
             $table = $this->normalizeSqlName($block['TABLE']['name']);
             $type = $this->getCamelCase($table) . "Repository";
             $property = '$' . $this->getCamelCase($table, true) . 's';
             $class->addComment("@property-read {$type} {$property}");
         }
     }
     $this->createClass($class);
 }
All Usage Examples Of Nette\PhpGenerator\ClassType::addComment