Bug #29694
\TYPO3\FLOW3\Resource\Resource is missing the __toString Method
Status: | Resolved | Start date: | 2011-09-12 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Resource | |||
Target version: | TYPO3 Flow Base Distribution - 1.0.5 | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | FLOW3 1.0.0 |
Description
Hi,
the __toString method mentioned here:
http://flow3.typo3.org/fileadmin/manual/nightly/TheDefinitiveGuide/PartIII/ResourceManagement.html
is currently not present.
Would be great if someone could add this:
public function __toString() { return (string)$this->getResourcePointer(); }
So the described functionality
file_get_contents('resource://' . $resource);
will work.
Associated revisions
[FEATURE] Add __toString() and make Resource use more convenient
To use a Resource with file operations, one can use the
resource:// scheme and the __toString() method of any
ResourcePointer.
To make this a little easier, this change adds two new
methods to the Resource class:
__toString() returns the SHA1 of the ResourcePointer the
Resource is holding (as is documented for ages).
getUri() returns a ready-to-use resource://<sha1> URI of
the ResourcePointer the Resource is holding.
Change-Id: Ie3cb01214c924c8e79ae5a997dc15e3679940e86
Fixes: #29694
Resolves: #34177
Releases: 1.0, 1.1
[FEATURE] Add __toString() and make Resource use more convenient
To use a Resource with file operations, one can use the
resource:// scheme and the __toString() method of any
ResourcePointer.
To make this a little easier, this change adds two new
methods to the Resource class:
__toString() returns the SHA1 of the ResourcePointer the
Resource is holding (as is documented for ages).
getUri() returns a ready-to-use resource://<sha1> URI of
the ResourcePointer the Resource is holding.
Change-Id: Iec342eae0662b89eaf1d281fcab26ebb94ef7c61
Fixes: #29694
Resolves: #34177
Releases: 1.0, 1.1
History
#1 Updated by Karsten Dambekalns almost 4 years ago
- Affected Flow version set to FLOW3 1.0.0
#2 Updated by Karsten Dambekalns over 3 years ago
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
- Target version set to 1.0.3
- Has patch set to No
#3 Updated by Gerrit Code Review over 3 years ago
- Status changed from Accepted to Under Review
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9145
#4 Updated by Karsten Dambekalns over 3 years ago
- Target version changed from 1.0.3 to 1.0.4
#5 Updated by Karsten Dambekalns over 3 years ago
- Target version changed from 1.0.4 to 1.0.5
#6 Updated by Gerrit Code Review about 3 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9145
#7 Updated by Gerrit Code Review about 3 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9145
#8 Updated by Karsten Dambekalns about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8cdaae41c0af199402358e2171766af14f9379e9.
#9 Updated by Gerrit Code Review about 3 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/11106
#10 Updated by Karsten Dambekalns about 3 years ago
- Status changed from Under Review to Resolved
Applied in changeset 8c7ec51b5a0e90a859c102fde6f5f0859babed1a.