ModelInterface.php #1

  • //
  • guest/
  • perforce_software/
  • chronicle/
  • main/
  • library/
  • P4Cms/
  • ModelInterface.php
  • View
  • Commits
  • Open Download .zip Download (914 B)
<?php
/**
 * Provide a common interface for models.
 *
 * @copyright   2011 Perforce Software. All rights reserved.
 * @license     Please see LICENSE.txt in top-level folder of this distribution.
 * @version     <release>/<patch>
 */
interface P4Cms_ModelInterface
{
    /**
     * Get the model data as an array.
     *
     * @return  array   the model data as an array.
     */
    public function toArray();

    /**
     * Check if given field is valid model field.
     *
     * @param  string  $field  model field to check
     * @return boolean
     */
    public function hasField($field);

    /**
     * Return array with all model fields.
     *
     * @return array
     */
    public function getFields();
    
    /**
     * Return value of given field of the model.
     *
     * @param  string  $field  model field to retrieve
     * @return mixed
     */
    public function getValue($field);
}
# Change User Description Committed
#1 16170 perforce_software Move Chronicle files to follow new path scheme for branching.
//guest/perforce_software/chronicle/library/P4Cms/ModelInterface.php
#1 8972 Matt Attaway Initial add of the Chronicle source code