setGetter() public method

Set Getter
public setGetter ( string $getter )
$getter string
 /**
  * Parse a ColumnAnnotation and return a Column object
  *
  * @param ColumnAnnotation $column_annotation
  * @param string           $name
  * @return Column
  */
 private function parseColumnAnnotation(ColumnAnnotation $column_annotation, $name)
 {
     $column = new Column($name);
     /** @noinspection PhpParamsInspection */
     $column->setType(FieldType::memberByValue($column_annotation->type));
     $column->setName($column_annotation->name);
     $column->setGetter($column_annotation->getter);
     $column->setSetter($column_annotation->setter);
     $column->setClassName($column_annotation->class_name);
     return $column;
 }
Beispiel #2
0
 /**
  * Create a column from schema
  *
  * @param string $property
  * @param array  $column_schema
  * @return Column
  */
 private function createColumn($property, array $column_schema)
 {
     $column = new Column($property);
     $column->setId($this->getNode($column_schema, Schema::COLUMN_ID, false, false));
     $column->setGetter($this->getNode($column_schema, Schema::GETTER, false));
     $column->setSetter($this->getNode($column_schema, Schema::SETTER, false));
     $column->setClassName($this->getNode($column_schema, Schema::COLUMN_CLASS, false));
     $column->setProperty($property);
     /** @var FieldType $type */
     $type = FieldType::memberByValue($this->getNode($column_schema, Schema::COLUMN_TYPE, false, 'string'));
     $column->setType($type);
     return $column;
 }