[nycphp-talk] Parsing <php: possible?
Jon Baer
jonbaer at jonbaer.net
Mon Jul 19 08:27:42 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I read a document @ Sun the other day explaining that you need to be a
programmer to really use PHP and the claim was w/ JSTL and JSP its
more component based .. so I was thinking how difficult it would be to
make a php tag function the same way ... an example:
<php:include file="mytaglib.php"/>*
<html>
<body>
<php:declare name="test" value="one,two,three" type="array"/>
<php:foreach>
<param name="input" value="test"/>
<oparam value="output">
Value: <valueof param="element.value"></valueof>
</oparam>
</php:foreach>
</body>
</html>
Well, maybe bad example, but basic idea ... (this is actually from an
ongoing peer conversation about java vs. php) ... but I think goes
back to a question I asked a long time ago in regards to <script
language="php" src="myfile.php"></script> not working (in PHP5 either).
The idea of tags kills me, however calling a single function in an
include would be nice - cleaner version of: <?php
include("myfile.php"); myfunction(); ?>
Another example:
<php:valueof name="param:id"></php:valueof> == <?php
echo($_GET['id']); ?> == <?= $_GET['id'] ?>
These example are a bite off ATG Dynamo JHTML/droplet stuff but what
Im really after is the including files w/ params stuff from a tag
based structure. Im sure this either a) exists in some form somewhere
b) can be done or c) no worth it. Any thoughts?
* - Disclaimer: Please don't try this and email me that it doesn't
work. I know it doesn't. It's a POC.
- -
pgp key: http://www.jonbaer.net/jonbaer.asc
fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFA+74+Qdvbi5oMr0cRAggcAKDsAtMWFjHNZf78alwiH3nN4HhFYgCeJAg+
Aw1VJMfIeLQV5mIKBW+sgck=
=p1cR
-----END PGP SIGNATURE-----
More information about the talk
mailing list