public function __construct(Request $request = null) { if (null === $request) { $request = Request::createAuto(); } $this->requestRef = DependencyRepository::add($request); $undefined = Undefined::get(); foreach (static::optionsArray() as $option) { $this->{$option->name} = $undefined; } $this->layout = new Layout(); }
public function __construct() { foreach (static::table()->getColumns(true) as $column) { if (null === $this->{$column->propertyName}) { $this->{$column->propertyName} = Undefined::get(); } } }