Created
September 14, 2011 00:01
-
-
Save fabioluciano/1215515 to your computer and use it in GitHub Desktop.
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 | |
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