File modules/cms/generator/target/BaseTarget.class.php

Last commit: Wed Oct 14 23:49:54 2020 +0200	Jan Dankert	Refactoring: Creating the target instance with a Factory (Java style); Asynchronous publishing of files.
1 <?php 2 // OpenRat Content Management System 3 // Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de 4 // 5 // This program is free software; you can redistribute it and/or 6 // modify it under the terms of the GNU General Public License 7 // as published by the Free Software Foundation; either version 2 8 // of the License, or (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program; if not, write to the Free Software 17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 namespace cms\generator\target; 19 20 use util\Url; 21 22 23 /** 24 * Superclass for publication targets. 25 * 26 * @author Jan Dankert 27 */ 28 abstract class BaseTarget implements Target 29 { 30 /** 31 * @var Url 32 */ 33 protected $url; 34 35 public function __construct( $targetUrl ) { 36 $this->url = new Url( $targetUrl ); 37 } 38 39 40 public function open() { 41 42 } 43 44 45 public abstract function put($source, $dest, $timestamp); 46 47 48 /** 49 * Closes the connection. 50 */ 51 public function close() { 52 53 } 54 55 56 public static function isAvailable() { 57 58 return true; 59 } 60 61 }
Download modules/cms/generator/target/BaseTarget.class.php
History Wed, 14 Oct 2020 23:49:54 +0200 Jan Dankert Refactoring: Creating the target instance with a Factory (Java style); Asynchronous publishing of files. Sat, 26 Sep 2020 18:46:36 +0200 Jan Dankert Now compatible with PHP 5.4 again. Mon, 21 Sep 2020 22:50:49 +0200 Jan Dankert Missed 1 class in last commit.