<?php namespace Intellex\Pixabay\Data;

use Intellex\Pixabay\Validation\ClassMemberValidator;

abstract class DataAbstract {

	/**
	 * Define the validation rules.
	 *
	 * @return array The list of rules for validation;
	 */
	abstract protected function validationRules();

	/**
	 * Validate a complete object.
	 */
	protected function validate() {
		ClassMemberValidator::validate($this, $this->validationRules());
	}

}
