From: Alex B. <en...@tu...> - 2001-07-15 01:57:15
|
> Thank you John, for this answer. It clears up a lot of things, > and I feel that it is going to be useful. > > What seems satisfying is that, if I understand correctly, is > that if I need a data structure such as: > > $setup = array( > 'table' => array( > 'border' => "0", > 'align' => "left", > 'bgcolor' => "#CCCCFF", > 'cellspacing' => "2", > 'cellpadding' => "5", > 'width' => "400", > ), > 'header' => array( > 'bgcolor' => "#FFCCCC", > ), > 'row' => array( > 'bgcolor' => "#CCFFCC", > ), > 'column' => array( > 'bgcolor' => "#FCFFCC", > ), > 'other' => array( > 'freshmeat' => true, > ), > ); > > that I, somehow, write this out in XML, and somehow, give > it an identity/tag/handle/key I can somehow, declare it easily, > (and it gets dragged out of ./ent ??), can fill it easily, > use it arguments to other module method calls. It is > appreciated that a lot of this effort will be offloaded > at compile time and not run time. hi Justin, the above example isn't correct. here's a (simplified) example: entity: user username type => text size => '20' regex => 'regex_pattern' field_label => 'User Name' required => true email_address type => email size => '40' field_label => 'Email Address' required => true so, you'll have a users table in your database - and it's good to be able to do: EntityManager->Get(); with a primary key and entity, so you can get back a set of data, or, if you are posting data, Entitymanager will enforce the rules you defined: if you're Adding a user, the username and email_address fields must not be empty - username has to match the regex provided, and the email address has to match the standard email regex that's implicitly attached to the type. Entitymanager is _only_ for data access. > In any case, it sounds good. I will just have to wait, > now, for the Stradivarius. best, _alex |