RE: [PHP] class PHP

2002-04-28 Thread Miguel Cruz

Best I can figure, it's a very verbose description of a process analogous
to using mod_rewrite to parse requests ending in .class and pass them off 
to a wrapper that instantiates the eponymous class (i.e., about 2 minutes 
of programming).

But it was a little hard to get through, so I may have misread it.

miguel

On Sun, 28 Apr 2002, John Holmes wrote:
 Can someone translate this to English?
 
  -Original Message-
  From: Peter [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, April 27, 2002 7:21 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] class PHP
  
  The text of this proposal, test code, and updates live at
  petermoulding.com/class. I place it here for discussion of the best
  approach before people build code.
  
  Class PHP
  
  An invention for a classier PHP.
  
  This invention uses PHP classes as Web pages. The invention can be
  implemented as a wrapper around PHP or as an enhancement to PHP. In
  Apache 2, the invention can be implemented as a filter to precede PHP.
 I
  will give a quick outline of the requirement, then sketches of
  implementations, then detailed examples prototyped using PHP.
  
  The invention is named class. An Apache implementation could be a
 module
  named class. If you write code to implement this invention, suffix the
  project name with your name as in class_John.
  
  To prevent a rapacious company copyrighting this invention using the
  excuse that it is a business process or anything else they can
  copyright, I declare my copyright on everything in this invention and
  any processes derivable from this. Please make your code
 implementations
  GPL, www.gnu.org/copyleft/gpl.html, and mention my page at
  petermoulding.com/class.
  
  Invention Requirement
  The main requirement is to replace PHP's page input with invented
 input.
  
  Here is a file named any_class.class that containing a PHP class named
  any_class:
  ?php
  class any_class
  {
  function any_class()
  {
  /* code to build a Web page. */
  }
  }
  ?
  
  Here is a Web page containing a PHP script to build the entire page
  using the PHP class any_class:
  ?php
  include_once(any_class.class);
  $any_class = new any_class();
  ?
  
  The invention makes PHP initiate any_class.class as if any_class were
  included and instantiated by the example Web page.
  
  PHP Wrapper
  
  The invention could be implemented as a module for Apache or another
 Web
  server by writing a wrapper for PHP. The wrapper would accept a call
  from Apache then pass the call on to PHP so PHP could perform 100%
  unaltered as if PHP were called direct from Apache.
  
  The module would look for class requests with a page of the form
 *.class
  then intercept the URL and prepare to pass invented input to PHP. The
  Apache configuration parameters can ensure all requests for class go
 to
  class and only requests for class to class. In a mixed class/PHP
  environment, the requested class can go to class and the PHP requests
  can go direct to PHP. There could also be a check in class for a class
  file so that all requests are directed to class and class processes
 just
  those with a matching class file.
  
  When class finds a valid class request, class builds a PHP Web page
 that
  includes the class file and initiates the class. To make PHP read the
  invented Web page, you could trap PHP's Web page read and substitute
 the
  invented page. As PHP has to access files within the constraints of a
  Web server, the access technique could vary from release to release
 and
  across Web servers. I will describe two quick implementation
  possibilities.
  
  If PHP reads files via Apache's file read functions (or an equivalent
 on
  other web servers), class gets to view all file requests from PHP to
  Apache and monitor all replies. Class can then pass the invented page
  back to PHP without the request reaching Apache. PHP remains untouched
  by class.
  
  Where a Web server does not provide file access functions or PHP
 chooses
  to not use those functions, class would need a modification to PHP to
  intercept file reads. The interception depends on the exact
 compilation
  of PHP and would be in the form of a wrapper around a file access
  routine in PHP. The wrapper (or interception layer) needs to be at a
  level where the code can see file names and subvert the whole file
 read
  process. Interception at this level requires PHP release dependent
  coding and is a step toward the PHP enhancement described next.
  PHP Enhancement
  A PHP enhancement would be an implementation of the invention direct
  within PHP's code so that PHP can react to class requests in
 conjunction
  with an external process or without an external process. The ultimate
  enhancement would be to incorporate the whole invention within PHP so
  there are no additional installation steps required.
  
  A PHP enhancement could use a wrapper as described in PHP Wrapper or
 the
  Apache 2 filter described 

RE: [PHP] class PHP

2002-04-27 Thread John Holmes

Can someone translate this to English?

 -Original Message-
 From: Peter [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, April 27, 2002 7:21 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] class PHP
 
 The text of this proposal, test code, and updates live at
 petermoulding.com/class. I place it here for discussion of the best
 approach before people build code.
 
 Class PHP
 
 An invention for a classier PHP.
 
 This invention uses PHP classes as Web pages. The invention can be
 implemented as a wrapper around PHP or as an enhancement to PHP. In
 Apache 2, the invention can be implemented as a filter to precede PHP.
I
 will give a quick outline of the requirement, then sketches of
 implementations, then detailed examples prototyped using PHP.
 
 The invention is named class. An Apache implementation could be a
module
 named class. If you write code to implement this invention, suffix the
 project name with your name as in class_John.
 
 To prevent a rapacious company copyrighting this invention using the
 excuse that it is a business process or anything else they can
 copyright, I declare my copyright on everything in this invention and
 any processes derivable from this. Please make your code
implementations
 GPL, www.gnu.org/copyleft/gpl.html, and mention my page at
 petermoulding.com/class.
 
 Invention Requirement
 The main requirement is to replace PHP's page input with invented
input.
 
 Here is a file named any_class.class that containing a PHP class named
 any_class:
 ?php
 class any_class
 {
 function any_class()
 {
 /* code to build a Web page. */
 }
 }
 ?
 
 Here is a Web page containing a PHP script to build the entire page
 using the PHP class any_class:
 ?php
 include_once(any_class.class);
 $any_class = new any_class();
 ?
 
 The invention makes PHP initiate any_class.class as if any_class were
 included and instantiated by the example Web page.
 
 PHP Wrapper
 
 The invention could be implemented as a module for Apache or another
Web
 server by writing a wrapper for PHP. The wrapper would accept a call
 from Apache then pass the call on to PHP so PHP could perform 100%
 unaltered as if PHP were called direct from Apache.
 
 The module would look for class requests with a page of the form
*.class
 then intercept the URL and prepare to pass invented input to PHP. The
 Apache configuration parameters can ensure all requests for class go
to
 class and only requests for class to class. In a mixed class/PHP
 environment, the requested class can go to class and the PHP requests
 can go direct to PHP. There could also be a check in class for a class
 file so that all requests are directed to class and class processes
just
 those with a matching class file.
 
 When class finds a valid class request, class builds a PHP Web page
that
 includes the class file and initiates the class. To make PHP read the
 invented Web page, you could trap PHP's Web page read and substitute
the
 invented page. As PHP has to access files within the constraints of a
 Web server, the access technique could vary from release to release
and
 across Web servers. I will describe two quick implementation
 possibilities.
 
 If PHP reads files via Apache's file read functions (or an equivalent
on
 other web servers), class gets to view all file requests from PHP to
 Apache and monitor all replies. Class can then pass the invented page
 back to PHP without the request reaching Apache. PHP remains untouched
 by class.
 
 Where a Web server does not provide file access functions or PHP
chooses
 to not use those functions, class would need a modification to PHP to
 intercept file reads. The interception depends on the exact
compilation
 of PHP and would be in the form of a wrapper around a file access
 routine in PHP. The wrapper (or interception layer) needs to be at a
 level where the code can see file names and subvert the whole file
read
 process. Interception at this level requires PHP release dependent
 coding and is a step toward the PHP enhancement described next.
 PHP Enhancement
 A PHP enhancement would be an implementation of the invention direct
 within PHP's code so that PHP can react to class requests in
conjunction
 with an external process or without an external process. The ultimate
 enhancement would be to incorporate the whole invention within PHP so
 there are no additional installation steps required.
 
 A PHP enhancement could use a wrapper as described in PHP Wrapper or
the
 Apache 2 filter described next but use those devices just to trigger
 class processing then perform the whole processing within PHP. This
 approach has the advantage that the processing is independent of the
 trigger method and the trigger method is free from processing code.
 
 The PHP enhancement could discover the need for class processing by
 whatever method suits the web server environment. The enhancement
would
 then verify the action is valid within constrains specified in
php.ini,
 verify a class 

RE: [PHP] class PHP

2002-04-27 Thread SP

Whatever it says the guy took a lot of time to write it out lol

-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: April 28, 2002 3:46 AM
To: 'Peter'; [EMAIL PROTECTED]
Subject: RE: [PHP] class PHP


Can someone translate this to English?

 -Original Message-
 From: Peter [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, April 27, 2002 7:21 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] class PHP
 
 The text of this proposal, test code, and updates live at
 petermoulding.com/class. I place it here for discussion of the best
 approach before people build code.
 
 Class PHP
 
 An invention for a classier PHP.
 
 This invention uses PHP classes as Web pages. The invention can be
 implemented as a wrapper around PHP or as an enhancement to PHP. In
 Apache 2, the invention can be implemented as a filter to precede PHP.
I
 will give a quick outline of the requirement, then sketches of
 implementations, then detailed examples prototyped using PHP.
 
 The invention is named class. An Apache implementation could be a
module
 named class. If you write code to implement this invention, suffix the
 project name with your name as in class_John.
 
 To prevent a rapacious company copyrighting this invention using the
 excuse that it is a business process or anything else they can
 copyright, I declare my copyright on everything in this invention and
 any processes derivable from this. Please make your code
implementations
 GPL, www.gnu.org/copyleft/gpl.html, and mention my page at
 petermoulding.com/class.
 
 Invention Requirement
 The main requirement is to replace PHP's page input with invented
input.
 
 Here is a file named any_class.class that containing a PHP class named
 any_class:
 ?php
 class any_class
 {
 function any_class()
 {
 /* code to build a Web page. */
 }
 }
 ?
 
 Here is a Web page containing a PHP script to build the entire page
 using the PHP class any_class:
 ?php
 include_once(any_class.class);
 $any_class = new any_class();
 ?
 
 The invention makes PHP initiate any_class.class as if any_class were
 included and instantiated by the example Web page.
 
 PHP Wrapper
 
 The invention could be implemented as a module for Apache or another
Web
 server by writing a wrapper for PHP. The wrapper would accept a call
 from Apache then pass the call on to PHP so PHP could perform 100%
 unaltered as if PHP were called direct from Apache.
 
 The module would look for class requests with a page of the form
*.class
 then intercept the URL and prepare to pass invented input to PHP. The
 Apache configuration parameters can ensure all requests for class go
to
 class and only requests for class to class. In a mixed class/PHP
 environment, the requested class can go to class and the PHP requests
 can go direct to PHP. There could also be a check in class for a class
 file so that all requests are directed to class and class processes
just
 those with a matching class file.
 
 When class finds a valid class request, class builds a PHP Web page
that
 includes the class file and initiates the class. To make PHP read the
 invented Web page, you could trap PHP's Web page read and substitute
the
 invented page. As PHP has to access files within the constraints of a
 Web server, the access technique could vary from release to release
and
 across Web servers. I will describe two quick implementation
 possibilities.
 
 If PHP reads files via Apache's file read functions (or an equivalent
on
 other web servers), class gets to view all file requests from PHP to
 Apache and monitor all replies. Class can then pass the invented page
 back to PHP without the request reaching Apache. PHP remains untouched
 by class.
 
 Where a Web server does not provide file access functions or PHP
chooses
 to not use those functions, class would need a modification to PHP to
 intercept file reads. The interception depends on the exact
compilation
 of PHP and would be in the form of a wrapper around a file access
 routine in PHP. The wrapper (or interception layer) needs to be at a
 level where the code can see file names and subvert the whole file
read
 process. Interception at this level requires PHP release dependent
 coding and is a step toward the PHP enhancement described next.
 PHP Enhancement
 A PHP enhancement would be an implementation of the invention direct
 within PHP's code so that PHP can react to class requests in
conjunction
 with an external process or without an external process. The ultimate
 enhancement would be to incorporate the whole invention within PHP so
 there are no additional installation steps required.
 
 A PHP enhancement could use a wrapper as described in PHP Wrapper or
the
 Apache 2 filter described next but use those devices just to trigger
 class processing then perform the whole processing within PHP. This
 approach has the advantage that the processing is independent of the
 trigger method and the trigger method is free from processing code