first commit
This commit is contained in:
70
wp-content/plugins/brizy/admin/post/abstract-monitor.php
Normal file
70
wp-content/plugins/brizy/admin/post/abstract-monitor.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
|
||||
abstract class Brizy_Admin_Post_AbstractMonitor {
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $postType;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $postMetaKeys;
|
||||
|
||||
/**
|
||||
* @param $postId
|
||||
* @param $postType
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract public function shouldStoreMetaRevision( $postId, $postType );
|
||||
|
||||
/**
|
||||
* Brizy_Admin_Post_AbstractMonitor constructor.
|
||||
*
|
||||
* @param $postType
|
||||
* @param array $postMetaKeys
|
||||
*/
|
||||
public function __construct( $postType, $postMetaKeys = array() ) {
|
||||
$this->postType = $postType;
|
||||
$this->postMetaKeys = $postMetaKeys;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPostType() {
|
||||
return $this->postType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $postType
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPostType( $postType ) {
|
||||
$this->postType = $postType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPostMetaKeys() {
|
||||
return $this->postMetaKeys;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $postMetaKeys
|
||||
*
|
||||
* @return Brizy_Admin_Post_AbstractMonitor
|
||||
*/
|
||||
public function setPostMetaKeys( $postMetaKeys ) {
|
||||
$this->postMetaKeys = $postMetaKeys;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user