/** * Validate and set static values * * @param array $init Configuration values. */ public function __construct($init) { // Validate argument is_dir($init['galleryPath']) or $this->errorMessage('The gallery dir is not a valid directory.'); // Set static values self::$galleryPath = $init['galleryPath']; self::$galleryBaseurl = $init['galleryBaseurl']; }