Jump to content

ExampleNode

From NusaATK
Revision as of 23:22, 18 January 2006 by Stootles (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A typical example of a node file looks like this:

<?php

class employee extends atkNode
{
  function employee()
  {
    $this->atkNode("employee");
    $this->add(new atkAttribute("id", AF_AUTOKEY));
    $this->add(new atkAttribute("firstname"));
    $this->add(new atkAttribute("lastname", AF_SEARCHABLE|AF_OBLIGATORY));
    $this->add(new atkDateAttribute("hiredate"));

    $this->setTable("employee");
  }
}

?>

Original Poster: Ivo