File_Infopath
[ class tree: File_Infopath ] [ index: File_Infopath ] [ all elements ]

Class: File_Infopath

Source Location: /File_Infopath-0.1.0/Infopath.php

Class Overview


Microsoft Infopath file format reader.


Author(s):

Version:

  • @package_version@

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 72]
Microsoft Infopath file format reader.


[ Top ]


Class Variables

$treatGroupedCboxesAsSelects =  true

[line 106]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 153]

File_Infopath __construct( string $filename)

Constructor
  • Access: public

Parameters:

string   $filename   —  Infopath file's name

[ Top ]

convertFieldNames   [line 506]

string convertFieldNames( string $field_name)

Default callback for converting hyphens (which are illegal in php variable names)
  • Return: The converted field name
  • Access: public

Parameters:

string   $field_name   —  The infopath field name to convert

[ Top ]

convertTemplate   [line 448]

string convertTemplate( string $html, [callback $field_name_converter = array('File_Infopath', 'convertFieldNames')])

Generate a Savant template with DB_DataObject_FormBuilder hooks given the html from a view.
  • Return: A Savant template with hooks for DB_DataObject_FormBuilder
  • Access: public

Parameters:

string   $html   —  The raw view html received from getView()
callback   $field_name_converter   —  A callback to remove underscores from field names.

[ Top ]

extract   [line 434]

string extract( filename $filename)

Extract a file from the Cabinet. Useful to retrieve a view's images.
  • Return: File contents
  • Access: public

Parameters:

filename   $filename   —  Name of file to extract

[ Top ]

getSchema   [line 205]

array getSchema( )

Return the schema in a php friendly format. The schema will be given as an associative array in the following format:

'type' => The type of the field, 'default' => The default value as was given from Infopath, 'required' => True/false depending on whether this was selected in Infopath, 'size' => The size of the field, 'options' => If this field has specific options, they will be listed here 'option_type' => One of either: select/multiselect/radio/checkbox

  • Return: An associative array describing the schema.
  • Access: public

[ Top ]

getView   [line 362]

HTML getView( string $name, [array $form_attrs = null])

Get a view given a view's name. The views are stored as HTML.
  • Return: The view
  • Access: public

Parameters:

string   $name   —  The view name
array   $form_attrs   —  If null, the view will be left as is. If true, the submit attributes from Infopath will be used. Otherwise pass an associative array of <form> attributes.

[ Top ]

listViews   [line 346]

array listViews( )

List the names of the views available
  • Return: An array of view names
  • Access: public

[ Top ]

saveForm   [line 517]

void saveForm( $filename, $data)

Given a list of values save the file in the appropriate xml format.
  • Todo:
  • Access: public

Parameters:

   $filename   — 
   $data   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:16:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.