News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Community News:
PHP-FIG Proposal - Resource Location
June 19, 2013 @ 10:55:29

A new proposal has been made to the PHP-FIG group that would provide resource locator functionality as a standard part of an application's structure.

This specification proposes to refer to files and directories through URIs. [...] These URIs can have different schemes ("classpath", "file" etc.), but only the scheme "file" is specified in this document. The resource locator is able to turn URIs into file paths which can be read or included by PHP code. The general goal of this PSR is to locate files (PHP, XML, YAML, INI, JPG, etc.) and directories in a generic way. For example, there should be a unified notation to refer to the file of a class ABCD and other files located in the same directory (or nested directories).

Code snippets are included showing a pseudo-code interface to this locator with five requirements:

  • Locate files relative to classes
  • Locate both directories and files
  • Short identifiers when the context is known
  • Locate resources independent from PHP classes
  • Support resource overriding

There's also some definition as to what is meant by a "resource location" and how the URIs should be structured and located.

0 comments voice your opinion now!
phpfig proposal resource location framework interoperability standard psr

Link: https://github.com/bschussek/fig-standards/blob/master/proposed/resource-location.md

blog comments powered by Disqus

Similar Posts

Chris Hartjes' Blog: The Devilís In The Details (or, Handling Sequences in Postgres in CakePHP)

IBM developerWorks: Understanding the Zend Framework (Parts 5 & 6)

Joshua Thijssen: @MultiParamConverter for Symfony2

Mike Naberezny's Blog: Introducing Zend Framework (PDF)

Matthew Turland's Blog: New SPL Features in PHP 5.3


Community Events





Don't see your event here?
Let us know!


version laravel composer introduction framework release podcast application opinion tool series security language library community voicesoftheelephpant update interview package symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework