Hi BobRay,
This is a bit wrong way to work with $modx->getObject in my case, I dont need to work with particular modx resource at all.
I just need to read the property set by user in the modx configuration under "system -> types of content ->html/text ->file extentions". This property is set not for all resorces with html/text extension.
<object class="modContentType" table="content_type" extends="xPDOSimpleObject">
<field key="name" dbtype="varchar" precision="255" phptype="string" null="false" index="unique" />
<field key="description" dbtype="tinytext" phptype="string" null="true" />
<field key="mime_type" dbtype="tinytext" phptype="string" />
<field key="file_extensions" dbtype="tinytext" phptype="string" />
<field key="headers" dbtype="mediumtext" phptype="array" />
<field key="binary" dbtype="tinyint" precision="1" attributes="unsigned" phptype="boolean" null="false" default="0" />
<index alias="name" name="name" primary="false" unique="true" type="BTREE">
<column key="name" length="" collation="A" null="false" />
</index>
<aggregate alias="Resources" class="modResource" local="id" foreign="content_type" owner="local" cardinality="many" />
<validation>
<rule field="name" name="name" type="xPDOValidationRule" rule="xPDOMinLengthValidationRule" value="1" message="content_type_err_ns_name" />
</validation>
</object>
reading the schema of modContentType, something like this should work:
if ($object = $modx->getObject('modContentType',array('name'=>'HTML'))){
$extension = $object->get('file_extensions');
}