/** * @param podBuilder PodPool; * @return Pod; */ public function __construct(&$anise, &$schemaDef, &$schema) { parent::__construct($schemaDef['name']); $this->fields = array(); foreach ($schemaDef['fields'] as $schemaField) { if ($schemaField['is-list']) { $field = new ListFieldPod($anise, $schemaField, $schema); } else { if ($schemaField['is-set']) { $field = new SetFieldPod($anise, $schemaField, $schema); } else { $field = new FieldPod($anise, $schemaField, $schema); } } $this->fields[$field->st_name] = $field; } $this->st_name = $schemaDef['name']; $this->st_display_name = $schemaDef['display-name']; $this->st_description = $schemaDef['description']; $this->labels = $schemaDef['labels']; $this->custom_post_type_params = isset($schemaDef['custom_post_type_params']) ? $schemaDef['custom_post_type_params'] : array(); $this->f_struct = $schemaDef['is-struct']; $this->st_title_template = $schemaDef['title']; $this->rg_index_columns = $schemaDef['index-columns']; }
/** * @param schmea array; */ function __construct(&$anise, &$schemaField, &$schema) { parent::__construct($schemaField['name']); $this->anise = $anise; $this->fRequired = $schemaField['required']; $this->st_display_name = $schemaField['display-name']; $this->st_description = $schemaField['description']; $this->type = $schemaField['type']; $schemaType = $schema[$this->type]; if ($schemaType && !$schemaType['is-struct']) { $this->podImpl = new ReferencePod($schemaType); } }
function __construct(&$schemaDef) { parent::__construct('ref_to_' . $schemaDef['name']); $this->type = $schemaDef['name']; }