<?php

/**
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class CustomFields extends BaseCustomFields {
    
    const FIELD_TYPE_STRING = 0;
    const FIELD_TYPE_SELECT = 1;
    const MAX_FIELD_NUM = 10;

    public function getOptions() {
            $options = array();

            if (($this->type == self::FIELD_TYPE_SELECT) && !empty($this->extra_data)) {
                    $options = explode(',', $this->extra_data);
            }

            for ($i=0; $i<count($options); $i++) {
                    $options[$i] = trim($options[$i]);
            }
            
            sort($options);

            return $options;
    }
}