File "PostCastable.php"
Full path: /home/kosmetik/public_html/wp-content/plugins/woo-license-keys/vendor/10quality/wpmvc-mvc/src/Contracts/PostCastable.php
File
size: 722 B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
namespace WPMVC\MVC\Contracts;
/**
* Interface contract for object that can be casted to or from WP_Post.
*
* @author Alejandro Mostajo <http://about.me/amostajo>
* @copyright 10Quality <http://www.10quality.com>
* @license MIT
* @package WPMVC\MVC
* @version 1.0.0
*/
interface PostCastable
{
/**
* Constructs object based on passed object.
* Should be an array of attributes or a WP_Post.
* @since 1.0.0
*
* @param mixed $object Array of attributes or a WP_Post.
*/
public function from_post( $object );
/**
* Cast object into a WP_Post.
* @since 1.0.0
*
* @return object
*/
public function to_post();
}