Example #1
0
	/**
	 * Create a new SecurePoll_Context with an XML file as the storage backend.
	 * Returns false if there was a problem with the file, like a parse error.
	 */
	static function newFromXmlFile( $fileName ) {
		$context = new self;
		$store = new SecurePoll_XMLStore( $fileName );
		$context->setStore( $store );
		$success = $store->readFile();
		if ( $success ) {
			return $context;
		} else {
			return false;
		}
	}