Am I able to use an indexer from PHP?

Discussion about the open-source Phalanger [?] project.

Am I able to use an indexer from PHP?

Postby bseddon@codeplex » May 19th, 2007, 1:10 pm

The IDataReader interface allows an implementer to create an indexer for the implementation that is able to return a field value for a named field. In C# this might be:

string value = (string)reader"fieldname";

If a similar syntax is used in PHP Phalanger rightly warns that $reader is being used as an array and fails to return any value.

Of course in this example, the workaround is to use the GetOrdinal("field") and GetString($pos) methods of the reader class. This is a fairly cumbersome way to retrieve resultset values and the indexer will be much more elegant. What syntax should I use? Are indexers supported? I've looked through the PDF files and have been unable to see anything relating to indexers.

Edit: I've just see message 1617 which indicates indexers are TDB. Is this feature still to be done?

Bill Seddon
bseddon@codeplex
 
Posts: 13
Joined: January 7th, 2012, 8:52 pm

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 16 guests

cron

User Control Panel

Login

Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 16 guests