ixRad for PHP Help


Installation

Post-installation setup


Try a Demo Application

  1. Create a root directory for your app, in a directory, where your webserver can serve it.
  2. Copy here the following directories with content, preserving the tree structure:
  3. Start IXRadPhp.exe
  4. Click Load button, and select '010 Hello World.prp'
  5. Click right in the Object Tree: Web Application, then click Properties button (with check icon)
  6. To re-launch application, you need to close and re-start the browser.
  7. Examine the other Demo Applications in increasing order.

Create new Application

  1. Close and restart IXRadPhp.exe.
  2. Repeat the steps as by the Demo App except Load. Make sure Web Application settings are correct. Save your new project under Menu-File-Save project as.
  3. Select Web Application in the Object Tree.
  4. Click Add Form button.
  5. Click the New form in the Object Tree.
  6. Click Add Control Button.
  7. In the ToolBox double-click Button. Repeat with TextBox; they sould appear as children of NewForm.
  8. Click Button in the Tree and click Properties button. Rename it to Button1 in PHP Name. Text will be Hello. Click Done.
  9. Click TextBox in the Tree and click Properties button. Rename it to TextBox1 in PHP Name. Text will be empty. Click Done.
  10. Select NewForm, click Properties button. Rename it to Form1. Note the layout is grid.
  11. Select Form1, click Designer button. Drag & Resize the controls you like. No other operations supported here currently. If you overwrite the captions or make other things they doesn't take effect in the app. Click OK.
  12. Select Form1, click View Code button.
  13. Type in, (pay attention to case):
    function Button1Click() {
        $this->TextBox1->Text = 'Hello!';
     }
  14. This is an event handler. Simply the function's name binds it to the event.
  15. Click Save, Build, Run. Try it.
  16. Close the browser every time before new start, it creates a new session.
  17. Now you can experiment with the app. Appearance of controls is controlled through CSS. E.g. set Button1 Inline Style to: background-color:red; font-weight:bold;

Structure of the generated application

In the application there is only one instance $App object instance of  MyApplication class (inherited from Application base class).

It holds all forms that you created as class member variables and in the $Forms array too.

All IDE created controls are member variables of the corresponding form.

Container type objects like Form and Panel have the Controls array holding references to paint children. The IDE fills it according the object tree. It can be manipulated runtime too, see Menu example project.

Controls are accessed from the same form so: $this->MyControl
From other forms: $this->AppRef->OtherForm->OtherControl (note that every form holds an AppRef reference to the one $App object).

Variables, that you declare in the Form Code are form class members. Never forget to acces these from inside form's functions so: $this->MyVariable. Variables inside Web Application Code, are Application class members.

Forms member variables and Application member variables automatically retain values througout the session. This is one essence of ixRAD. $_SESSION array usage and other forms of session variables provided by PHP are possible, short, but not elegant; you can create an Application or Form member variable array instead.

You create your own class definitions in modules. Its instance variables should be somewhere in the $App tree structure( e.g. member variable of $App or a $Form ), to preserve it through the session. See UserClass example project.

External classes should be included  on the Web App Property Page. Then threat them as classes in a module.

Any class can be instantiated runtime too.

Any class instance's property that was set by the designer, can be later manipulated runtime.

The IDE stores all form's code and design and web app settings in one project file.

The IDE generates only one output php file -it contains the whole web app. Look at the Web App Property Page. The lib subdirectory with the runtime and the cortrols sould be placed beneath.


Form Layouts

All forms have a layout either:

Grid layout

Controls are absolutely positioned

Template layout


Panel Layouts

All containers - like Panel - have layouts too.

Grid-Layout

Flow-Layout


Pluggin in User-Created controls

Create the control's PHP code.

Create Design info the simple way

Create Design info the advanced way


A more comprehensive documentation is coming soon.

Go to the support forum to discuss usage, faq, programming. 
http://prog.hbnet.hu/dev/php/IXRAD

Submit your created components or your webpage where you provide components for ixRAD.


Look at the component reference too.