I want to use zenphoto with my symfony2 website. I would do so by making calls to zenphoto to retrieve images. Here's a non-symfony2 coding example from another one of my sites that it would use as a basis:
<?php
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/zp-core/template-functions.php");
$currentPage = $_SERVER["PHP_SELF"];
$imageNum = 0;
if (isset($_GET['imageNum']))
$imageNum = $_GET['imageNum'];
$gallery = new Gallery();
$numAlbums = $gallery->getNumAlbums();
$gallery->getAlbums();
for ($i = 0 ; $i < $numAlbums; $i++)
{
$album = $gallery->getAlbum($i);
$title = $album->getTitle();
if ($title == "Overview") break;
}
$album->getImages();
$totalImages = $album->getNumImages() - 1;
$image = $album->getImage($imageNum);
$sizedImage = $image->getSizedImage(600);
?>
There's more code buried in the HTML. All the code would end up in a controller. My question is how to best integrate zenphoto if at all. I could just install the code independent of the framework, but I imagine there's a better way.
There's a whole front end for uploading and managing images as well as admin functions. These web pages would be independent of Symfony as it doesn't seem possible to integrate them.