http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70139

Revision: 70139
Author:   jeroendedauw
Date:     2010-07-29 15:02:26 +0000 (Thu, 29 Jul 2010)

Log Message:
-----------
Work on repository and package definitions

Modified Paths:
--------------
    trunk/extensions/Deployment/includes/ExtensionInstaller.php
    trunk/extensions/Deployment/includes/PackageRepository.php
    trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php
    trunk/extensions/Deployment/includes/filesystems/FtpFilesystem.php
    trunk/extensions/Deployment/includes/filesystems/Ssh2Filesystem.php

Added Paths:
-----------
    trunk/extensions/Deployment/includes/PackageDescriptorParser.php
    trunk/extensions/Deployment/includes/PackageDescriptorProcessor.php

Removed Paths:
-------------
    trunk/extensions/Deployment/includes/PackageDescriptiorProcessor.php

Modified: trunk/extensions/Deployment/includes/ExtensionInstaller.php
===================================================================
--- trunk/extensions/Deployment/includes/ExtensionInstaller.php 2010-07-29 
13:56:08 UTC (rev 70138)
+++ trunk/extensions/Deployment/includes/ExtensionInstaller.php 2010-07-29 
15:02:26 UTC (rev 70139)
@@ -20,9 +20,11 @@
        
        
        /**
-        * Constructor
+        * Constructor.
         */
        public function __construct() {
+               parent::__construct();
+               
                // TODO
        }       
        

Deleted: trunk/extensions/Deployment/includes/PackageDescriptiorProcessor.php
===================================================================
--- trunk/extensions/Deployment/includes/PackageDescriptiorProcessor.php        
2010-07-29 13:56:08 UTC (rev 70138)
+++ trunk/extensions/Deployment/includes/PackageDescriptiorProcessor.php        
2010-07-29 15:02:26 UTC (rev 70139)
@@ -1,22 +0,0 @@
-<?php
-
-/**
- * File holding the PackageDescriptorProcessor class.
- * Partly based on DeployDescriptorProcessor from Ontoprises Deployment 
Framework.
- *
- * @file PackageDescriptorProcessor.php
- * @ingroup Deployment
- *
- * @author Jeroen De Dauw
- * @author Kai Kühn
- */
-
-/**
- * Package description processing class.
- * 
- * @author Jeroen De Dauw
- * @author Kai Kühn
- */
-class PackageDescriptorProcessor {
-       
-}
\ No newline at end of file

Added: trunk/extensions/Deployment/includes/PackageDescriptorParser.php
===================================================================
--- trunk/extensions/Deployment/includes/PackageDescriptorParser.php            
                (rev 0)
+++ trunk/extensions/Deployment/includes/PackageDescriptorParser.php    
2010-07-29 15:02:26 UTC (rev 70139)
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * File holding the PackageDescriptorParser class.
+ * Partly based on DeployDescriptor from Ontoprises Deployment Framework.
+ *
+ * @file PackageDescriptor.php
+ * @ingroup Deployment
+ *
+ * @author Jeroen De Dauw
+ * @author Kai Kühn
+ */
+
+/**
+ * Base package description parsing class. Deriving classes
+ * can parse a package description in a certain format to a
+ * PackageDescriptor object.
+ * 
+ * @author Jeroen De Dauw
+ * @author Kai Kühn
+ */
+abstract class PackageDescriptorParser {
+       
+       /**
+        * Constructor.
+        */
+       public function __construct() {
+               // TODO
+       }       
+       
+}
+
+/**
+ * Parsing class for package desciprtions in XML.
+ * @see PackageDescriptorParser
+ * 
+ * @author Jeroen De Dauw
+ * @author Kai Kühn
+ * 
+ * TODO: move to it's own file
+ */
+class XMLDescriptorParser extends PackageDescriptorParser {
+       
+       /**
+        * Constructor.
+        */
+       public function __construct() {
+               parent::__construct();
+               
+               // TODO
+       }               
+       
+}
+
+/**
+ * Parsing class for package desciprtions in CPAN.
+ * @see PackageDescriptorParser
+ * 
+ * @author Jeroen De Dauw
+ * 
+ * TODO: move to it's own file
+ */
+class CPANDescriptorParser extends PackageDescriptorParser {
+       
+       /**
+        * Constructor.
+        */
+       public function __construct() {
+               parent::__construct();
+               
+               // TODO
+       }               
+       
+}
\ No newline at end of file

Added: trunk/extensions/Deployment/includes/PackageDescriptorProcessor.php
===================================================================
--- trunk/extensions/Deployment/includes/PackageDescriptorProcessor.php         
                (rev 0)
+++ trunk/extensions/Deployment/includes/PackageDescriptorProcessor.php 
2010-07-29 15:02:26 UTC (rev 70139)
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * File holding the PackageDescriptorProcessor class.
+ * Partly based on DeployDescriptorProcessor from Ontoprises Deployment 
Framework.
+ *
+ * @file PackageDescriptorProcessor.php
+ * @ingroup Deployment
+ *
+ * @author Jeroen De Dauw
+ * @author Kai Kühn
+ */
+
+/**
+ * Package description processing class.
+ * 
+ * @author Jeroen De Dauw
+ * @author Kai Kühn
+ */
+class PackageDescriptorProcessor {
+       
+}
\ No newline at end of file

Modified: trunk/extensions/Deployment/includes/PackageRepository.php
===================================================================
--- trunk/extensions/Deployment/includes/PackageRepository.php  2010-07-29 
13:56:08 UTC (rev 70138)
+++ trunk/extensions/Deployment/includes/PackageRepository.php  2010-07-29 
15:02:26 UTC (rev 70139)
@@ -10,10 +10,42 @@
  */
 
 /**
- * Package description processing class.
+ * Base repository class. Deriving classes handle interaction with
+ * package repositories of the type they support.
  * 
  * @author Jeroen De Dauw
  */
-class PackageRepository {
+abstract class PackageRepository {
        
-}
\ No newline at end of file
+       /**
+        * Constructor.
+        */
+       public function __construct() {
+               // TODO
+       }               
+       
+}
+
+/**
+ * Class for interaction with the Ontoprise repository.
+ * @see PackageRepository
+ * 
+ * @author Jeroen De Dauw
+ * 
+ * TODO: move to it's own file
+ */
+class OntopriseRepository extends PackageRepository {
+       
+       /**
+        * Constructor.
+        */
+       public function __construct() {
+               parent::__construct();
+               
+               // TODO
+       }               
+       
+}
+
+// TODO: if the ontoprise repository structure is acceptable for general use, 
rename the class,
+// if it's not, design a more general repository structure and create a new 
PackageRepository class to handle.
\ No newline at end of file

Modified: trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php
===================================================================
--- trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php       
2010-07-29 13:56:08 UTC (rev 70138)
+++ trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php       
2010-07-29 15:02:26 UTC (rev 70139)
@@ -21,7 +21,9 @@
         * Constructor.
         */
        public function __construct() {
+               parent::__construct();
                
+               // TODO
        }
        
        /**

Modified: trunk/extensions/Deployment/includes/filesystems/FtpFilesystem.php
===================================================================
--- trunk/extensions/Deployment/includes/filesystems/FtpFilesystem.php  
2010-07-29 13:56:08 UTC (rev 70138)
+++ trunk/extensions/Deployment/includes/filesystems/FtpFilesystem.php  
2010-07-29 15:02:26 UTC (rev 70139)
@@ -37,6 +37,8 @@
         * @param array $options
         */
        public function __construct( array $options ) {
+               parent::__construct();
+               
                // Check if possible to use ftp functions.
                if ( !extension_loaded( 'ftp' ) ) {
                        $this->addError( 'deploy-ftp-not-loaded' );

Modified: trunk/extensions/Deployment/includes/filesystems/Ssh2Filesystem.php
===================================================================
--- trunk/extensions/Deployment/includes/filesystems/Ssh2Filesystem.php 
2010-07-29 13:56:08 UTC (rev 70138)
+++ trunk/extensions/Deployment/includes/filesystems/Ssh2Filesystem.php 
2010-07-29 15:02:26 UTC (rev 70139)
@@ -51,6 +51,8 @@
         * @param array $options
         */
        public function __construct( array $options ) {
+               parent::__construct();
+               
                // Check if possible to use ssh2 functions.
                if ( !extension_loaded( 'ssh2' ) ) {
                        $this->addError( 'deploy-ssh2-not-loaded' );



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to