rfc:linking_in_stream_wrappers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:linking_in_stream_wrappers [2014/10/25 11:33] – Mark new functionality thekidrfc:linking_in_stream_wrappers [2021/03/27 14:47] (current) – Move to inactive ilutov
Line 3: Line 3:
   * Date: 2014-10-25   * Date: 2014-10-25
   * Author: Timm Friebe, thekid@php.net   * Author: Timm Friebe, thekid@php.net
-  * Status: Draft+  * Contributor: Frank Kleine, https://github.com/mikey179/ 
 +  * Status: Inactive
   * First Published at: https://wiki.php.net/rfc/linking_in_stream_wrappers   * First Published at: https://wiki.php.net/rfc/linking_in_stream_wrappers
  
Line 81: Line 82:
    *    *
    * @param  string $link    * @param  string $link
-   * @return string The link target or NULL+   * @return string The link target or FALSE if the does not exist
    */    */
   function url_readlink($link) {   function url_readlink($link) {
Line 87: Line 88:
   }   }
 } }
 +</PHP>
 +
 +  * When url_readlink() returns a string, it will be used as readlink()'s return value.
 +  * When url_readlink() returns FALSE, readlink() quietly returns FALSE
 +  * For all other return values of url_readlink(), a warning is raised and readlink() returns FALSE
 +  * When url_readlink() is not implemented, a warning is raised an readlink() returns FALSE.
 +
 +==== Limitations ====
 +
 +It will not be possible to create links between two different stream wrappers like this: 
 +
 +<PHP>
 +symlink('foo://some/resource', 'bar://another/resource'); // will yield a PHP_WARNING and return false
 </PHP> </PHP>
  
Line 122: Line 136:
 ===== Patches and Tests ===== ===== Patches and Tests =====
 TODO: Implement and submit GitHub pull request. TODO: Implement and submit GitHub pull request.
 +https://github.com/thekid/php-src/compare/rfc/linking_in_stream_wrappers
  
 ===== References ===== ===== References =====
-See http://php.net/manual/en/class.streamwrapper.php +  * http://php.net/manual/en/class.streamwrapper.php 
-See https://github.com/mikey179/vfsStream/wiki/Known-Issues +  * [[https://github.com/mikey179/vfsStream/wiki/Known-Issues|List of known issues in vfsStream]] 
 +  * [[https://github.com/mikey179/vfsStream/tree/linking|vfsStream reference userland implementation]]
rfc/linking_in_stream_wrappers.1414236802.txt.gz · Last modified: 2017/09/22 13:28 (external edit)