Created
October 10, 2011 12:36
-
-
Save gries/1275200 to your computer and use it in GitHub Desktop.
Propel-ORM BLOB access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$object = ObjectQuery::create()->findOneById(1); | |
// load blob content | |
$content = stream_get_content($object->getImage()); | |
// content now holds the image data | |
var_dump($content); | |
// ... | |
// ... | |
// ... | |
$object = ObjectQuery::create()->findOneById(1); | |
// load blob content again | |
$content = stream_get_contents($object->getImage()); | |
// content now is "" because the stream was read before | |
var_dump($content); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment