# Class BaMLResource

### Direct known subclasses

`Catapult\BaML`

Abstract
Namespace: Catapult
Located at baml/BaML.php

## Methods summary

`public` | # `__construct( data: $data = null )` Generate the parser object and tie to xml_set_object Generate the parser object and tie to xml_set_object #### Parameters $data string when set use parsing otherwise treat as creation
`public` | # `register( valid: $element, $container = false )` valid will check if this is valid according to BaML valid will check if this is valid according to BaML #### Parameters $element xml struct item with level, name and attributes $container
`public` | # `parse( text: $text )` parse the provided text. generate a parser here we usually wouldnt need to have one initialized with the object. parse the provided text. generate a parser here we usually wouldnt need to have one initialized with the object. #### Parameters $text BaML markup
`public` | # `getAsStream( file: $file )` reads a file, transferings into a BaML object reads a file, transferings into a BaML object #### Parameters $file or relative filepath
`public` | # `addData( data: $object )` add data to an existing BaML object add data to an existing BaML object #### Parameters $object or BaMLText or BaMLVerb
`public` | # `generate( )` stub. goto __toString stub. goto __toString
`public` | # `get( )` get the contents for this baml object get the contents for this baml object
`public` | # `__toString( )` Things to consider when generating toString parameters will always be located as a member of this instance Things to consider when generating toString parameters will always be located as a member of this instance parameters should be in xml mode and according to schema either wrap in Response|Request

## Properties summary

`public static array` | $options | # `array( BAML_XML_OPTIONS::BAML_XML_ENCODING => "UTF-8" )`
`public` | $parser primary parser * primary parser * | # ``
`public` | $fileHandler | # ``
`public` | $data primary data * primary data * | # ``