Location: PHPKode > scripts > PAX > pax/core/interfaces/IModel.intf.php
<?php

/**
 * Page DocBlock definition
 * @package org.zadara.marius.pax
 */

/**
 * Parser model interface.
 * 
 * @author Marius Zadara <hide@address.com>
 * @category Interfaces
 * @copyright (C) 2008-2009 Marius Zadara
 * @license Free for non-comercial use
 * @package org.zadara.marius.pax
 * @see IPAXObject
 * @since 5.0 
 */
interface IModel extends IPAXObject  
{
	/**
	 * Method to extract the model name.
	 * By convention, the model name is the name of the root tag 
	 * from the file being parse
	 *
	 * @param array $data The nodes list
	 * @return mixed
	 */	
	public static function extractModelName(&$data);
	
	/**
	 * Method to update the directories paths using the model name
	 *
	 * @access public
	 * @static 
	 * @param config $directories The PAX config object
	 * @param string $modelName The current model name
	 * @return mixed
	 */
	public static function updateDirectories(&$directories, $modelName);

	/**
	 * Method to extract the namespaces from the nodes.
	 *
	 * @param array $nodes The nodes list
	 * @param config $elements The PAX elements 
	 * @return mixed
	 */
	public static function extractNamespaces(&$nodes, &$elements);

	
	/**
	 * Method to get defined namespaces from the file.
	 * 
	 * @access public
	 * @static 
	 * @param array $rootNodeAttributes The root node attributes
	 * @param config $elements The PAX elements 
	 * @return mixed
	 */
	public static function getDefinedNamespaces($rootNodeAttributes, &$elements);

	
	/**
	 * Method to check the defined namespaces against the used namespaces.
	 *
	 * @param array $definedNamespaces The list with defined namespaces
	 * @param array $usedNamespaces The list with the used namespaces
	 * @return mixed
	 */
	public static function checkNamespaces($definedNamespaces, $usedNamespaces);

	
	/**
	 * Method to validate the namespaces from the file.
	 * Each namespace should be a directory in the 'namespaces' directory.
	 *
	 * @access public
	 * @static 
	 * @param array $namespaces
	 * @param array $pathToNamespaces
	 */
	public static function validateNamespaces(&$namespaces, $pathToNamespaces);

	
	
	/**
	 * Method to see if a value is in a list
	 *
	 * @param string $trueText The value seached for
	 * @param mixed $dictionary The container were to search
	 * @return boolean
	 */
	public static function isInList($trueText, &$dictionary);

	
	
	/**
	 * Method to filter the tags according to the definition file.
	 * Throws exception if error encountered
	 *
	 * @access public
	 * @static 
	 * @param config $config The PAX config object
	 * @param config $elements The PAX elements object
	 * @param config $directories The PAX directories object
	 * @param config $filenames The PAX filenames object
	 * @param array $nodes The array with the current nodes 
	 * @param array $namespaces The array with the current namespaces
	 * @param string $paxNsSeparator The separator used in tag namespace definition
	 * @return void
	 */	
	public static function filterTags(&$config, &$elements, $directories, $filenames, &$nodes, &$namespaces, $paxNsSeparator);

	
	
	/**
	 * Method to filter the tag's attributes according to its definition. 
	 * Throws exception if error encountered.
	 *
	 * @access public
	 * @static 
	 * @param config $config The PAX config object
	 * @param config $elements The PAX elements object
	 * @param config $directories The PAX directories object
	 * @param config $filenames The PAX filenames object
	 * @param array $nodes The nodes array
	 * @param array $attributesDefinitions The attributes definitions array
	 */
	public static function filterTagAttributes(&$config, $elements, $directories, $filenames, &$nodes, &$attributesDefinitions);

	
	/**
	 * Method to filter tag attribute's value.
	 * Throws exception if error encountered.
	 *
	 * @param config $config
	 * @param config $elements
	 * @param config $directories
	 * @param config $filenames
	 * @param array $nodes
	 * @param array $attributesDefinitions
	 */	
	public static function filterTagAttributesValue(&$config, $elements, $directories, $filenames, &$nodes, &$attributesDefinitions);

	
	/**
	 * Method to filter the tag content.
	 * Throws exception in case of error.
	 *
	 * @param config $config The PAX config object
	 * @param config $elements The PAX elements object
	 * @param array $nodes The PAX nodes array
	 */	
	public static function filterTagContent(&$config, $elements, &$nodes);	
	
}

?>
Return current item: PAX