Question: I'm trying to learn OO PHP and I'm working on a contents manager project, I want to construct an object starting from an html form.

For example, if I have a form with ten textbox (or other types of input), I sent the form in POST mode, then I want to construct my object starting from POST data.

Do I have to pass them as constructor's parameters, or as an array? How?

Just an example:

My little form: Name, Surname, Description (but there might be over ten inputs)

My $\_POST array: ('name'=>'Mario', 'surname'=>'Rossi', 'description'=>'Just a description here.')

My class:

```
class Person {
    private $name;
    private $surname;
    private $description;

    public function __contruct(/*arguments or array here*/) {
    }
}

```

Answer: 
```
private SwingController controller;
controller = new SwingController();
SwingViewBuilder viewBuilder = new SwingViewBuilder(controller, properties);
JPanel panel = viewBuilder.buildViewerPanel();
controller.setToolBarVisible(false);

```

You have to set the toolbar invisible because icePdf looks in the PDF-document for the property and overwrites your setting with default when there is no document opened!
There are two ways to this.

1) Follow this example to set all the toolbars to false.
<http://www.icesoft.org/JForum/posts/list/17673.page#sthash.48ICrL2A.dpbs>

2) You can modify or remove the toolbar by editing the source code for `SwingViewBuilder`.

Here is a link to the code: <http://sventon.icesoft.org/svn/repos/repo/show//icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java?revision=34004>

You probably want to comment out lines 481 - 483.

```
481 JToolBar toolBar = buildCompleteToolBar(embeddableComponent);
482             if (toolBar != null)
483                 cp.add(toolBar, BorderLayout.NORTH)

```

Remove your import for `SwingViewBuilder` and create your own class with those lines commented out.