Skip to content

Instantly share code, notes, and snippets.

@fabioluciano
Created September 14, 2011 00:01
Show Gist options
  • Save fabioluciano/1215515 to your computer and use it in GitHub Desktop.
Save fabioluciano/1215515 to your computer and use it in GitHub Desktop.
<?php
interface iFactory {
public function image_convert($img);
}
abstract class Convert_Abstraction_Factory implements iFactory {
const IMG_PATH = './img';
const TMP_PATH = './tmp';
const CONV_PATH = './conv';
protected function __construct() {}
protected function to_pnm($img) {
$time = time();
exec('anytopnm ' . self::IMG_PATH . DIRECTORY_SEPARATOR . $img . ' > ' . self::TMP_PATH . DIRECTORY_SEPARATOR . $time . '.pnm');
return $time;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment