Skip to content

Instantly share code, notes, and snippets.

@alanpich
Created November 28, 2012 20:41
Show Gist options
  • Save alanpich/4164268 to your computer and use it in GitHub Desktop.
Save alanpich/4164268 to your computer and use it in GitHub Desktop.
pmsPackage Interface
<?php
/**
* Interface definition for pms packages
*
* @package pms
* @author Alan Pich <alan@alanpich.com>
* @copyright (c) 2013, Alan Pich
* @date 28-Nov-2012
*/
interface pmsPackageInterface {
/**
* Return name of package
* @return string
*/
public function getName();
/**
* Get last package commit time
* @return int Timestamp
*/
public function mtime();
/**
* Has the package changed since last commit?
* @return boolean
*/
public function isDirty();
/**
* Load package data
* @return boolean Success
*/
public function load();
/**
* Inject package data into modx
* @return boolean Success
*/
public function inject();
/**
* Commit any changes to the package
* @return boolean Success
*/
public function commit();
/**
* Add an object to package
* @param string $classKey MODx class name
* @param int $id MODx object pk id
* @return boolean Success
*/
public function add($classKey,$id);
/**
* Return array of added objects
* @return array Altered Objects
*/
public function status();
}// end interface pmsPackageInterface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment