Fix neutron's comment

This commit is contained in:
Nicolas Le Goff
2014-02-03 18:10:49 +01:00
parent 75fac19e73
commit 52f3baac05
21 changed files with 571 additions and 697 deletions

View File

@@ -1482,4 +1482,22 @@ class databox extends base
{
self::$_xpath_thesaurus = self::$_dom_thesaurus = self::$_thesaurus = self::$_sxml_thesaurus = [];
}
/**
* Tells whether the registration is enable for provided databox or not.
*
* @return boolean
*/
public function isRegistrationEnabled()
{
if (false !== $xml = $this->get_sxml_structure()) {
foreach ($xml->xpath('/record/caninscript') as $canRegister) {
if (false !== (Boolean) (string) $canRegister) {
return true;
}
}
}
return false;
}
}