[svn:PHP-Sandwich] r1435 - PHP-Sandwich/trunk/lib/PHP

[email protected] 31 Jul 2005 04:11:52 -0000
Newsgroups perl.php.sandwich.dev
Message-ID <[email protected]>
Author: gschlossnagle
Date: Sat Jul 30 21:11:52 2005
New Revision: 1435

Modified:
   PHP-Sandwich/trunk/lib/PHP/Interpreter.pm
Log:
more docs



Modified: PHP-Sandwich/trunk/lib/PHP/Interpreter.pm
==============================================================================
--- PHP-Sandwich/trunk/lib/PHP/Interpreter.pm	(original)
+++ PHP-Sandwich/trunk/lib/PHP/Interpreter.pm	Sat Jul 30 21:11:52 2005
@@ -179,6 +179,32 @@ without using call(). Internally, this i
 The C<AUTOLOAD>-generated method will be cached for future calls to the
 same PHP method.
 
+=head1 TYPE HANDLING
+
+In general, the PHP::Interpreter module attempts to make type conversion between Perl and PHP completely transparent.  
+For non-tied, non-magical, and non-objects, this works well.  However, when passing these special types, some
+considerations must be taken into account.
+
+=head2 Perl variables passed into PHP
+
+In PHP, magical/blessed values will appear as being of the class PerlSV::$CLASSNAME, as detailed below.
+
+=head2 PHP variables passed into Perl
+
+PHP has two types of 'special' variables which do not translate transparently to basic Perl types.
+
+=over
+
+=item * Resources
+
+Resources in PHP will appear in Perl as of the type PHP::Interpreter::Resource.  PHP resources have no attributes or bound methods, so this class is just an opaque container.
+
+=item * Objects
+
+Object in PHP will appear in Perl as of the type PHP::Interpreter::Class::$CLASSNAME.  These objects will proxy all method calls and attribute accesses through to the internal PHP object.
+
+=back
+
 =head1 USING PHP
 
 The PHP interpeter that is instantiated with PHP::Interpreter has some special classes it defines to allow PHP to interface back with it's calling PHP Interpreter.