<?php

/**
 * Modelo de Enum para controller e view
 * @author fabricio
 * 
 * na View:
 * echo $this->Form->input('type', array('options' => CreditType::types()))
 * 
 * no Controller:
 * if ($this->data['CreditType']['type'] == CreditType::SMS)) {...}
 * 
 */
class CreditType extends Component {

	const PORTABILITY = 0; 
	const SMS = 1;
	
	/* 
	 * @access static
	 */
	public static function types($value = null) {
		$options = array(
				self::PORTABILITY => __('Portability',true),
				self::SMS => __('SMS',true),
		);
		return parent::enum($value, $options);
	}
	
}