<?php

namespace App\QcRules;

abstract class FieldsAbstract
{
	/**
	 * The current user id (always filled in).
	 * @var Int
	 */
	public $idCurrentUser = CURRENT_ID_USER;

	/**
	 * The current office id (always filled in).
	 * @var Int
	 */
	public $idCurrentOffice = CURRENT_ID_OFFICE;

	/**
	 * The current department id (always filled in).
	 * @var Int
	 */
	public $idCurrentDepartment = CURRENT_ID_DEPT;


	/**
	 * Return the entity of the current fields object.
	 * @return String
	 */
	public function getEntity()
	{
		list($entity,) = explode('_', stripClassNamespace(get_called_class())); // eg. Invoice_Fields
		return $entity;
	}

}

