<?php

namespace Fab\Model;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * Initiate plugins
 *
 * @package    Fab
 * @subpackage Fab/Model
 */
class Model {

    /**
     * The name of post_type
     *
     * @access   protected
     * @var      string    $name    The name of post_type
     */
    protected $name;

    /**
     * Post type args
     *
     * @access   protected
     * @var      array    $args    Post type args
     */
    protected $args;

    /**
     * The taxonomies for this model
     *
     * @access   protected
     * @var      array    $taxonomies    The taxonomies for this model
     */
    protected $taxonomies;

    /**
     * The hooks for this model
     *
     * @access   protected
     * @var      array    $hooks    The hooks for this model
     */
    protected $hooks;

    /**
     * The metas for this model
     *
     * @access   protected
     * @var      array    $metas    The metas for this model
     */
    protected $metas;

    // Load plugin traits.
    use \Fab\Plugin\Helper\Singleton;

    /**
     * Construct type
     *
     * @return void
     * @var    object $plugin Plugin configuration
     * @pattern prototype
     */
    public function __construct() {
        $this->name           = substr( strrchr( get_called_class(), '\\' ), 1 );
        $this->name           = strtolower( $this->name );
        $this->taxonomies     = array();
        $this->hooks          = array();
        $this->metas          = array();
        $this->args           = array();
        $this->args['public'] = true;
        $this->args['labels'] = array( 'name' => ucwords( $this->name ) );
    }
}
