// Import framework stuff
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Generic\FrameworkInterface;
// Import framework stuff
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Generic\FrameworkInterface;
public function assignFieldWithFilter ($fieldName, $filterMethod) {
// Get the value
$fieldValue = $this->getValueField($fieldName);
public function assignFieldWithFilter ($fieldName, $filterMethod) {
// Get the value
$fieldValue = $this->getValueField($fieldName);
// Now filter it through the value through the filter method
$filteredValue = call_user_func_array(array($this, 'doFilter' . self::convertToClassName($filterMethod)), array($fieldValue));
// Now filter it through the value through the filter method
$filteredValue = call_user_func_array(array($this, 'doFilter' . self::convertToClassName($filterMethod)), array($fieldValue));
* @throws NullPointerException If recovery of requested value instance failed
*/
public function prefetchValueInstance ($registryKey, $extraKey = NULL) {
* @throws NullPointerException If recovery of requested value instance failed
*/
public function prefetchValueInstance ($registryKey, $extraKey = NULL) {
try {
// Get the required instance
$this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
} catch (NullPointerException $e) {
// Not set in registry
// @TODO Try to log it here
try {
// Get the required instance
$this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
} catch (NullPointerException $e) {
// Not set in registry
// @TODO Try to log it here
if ($this->getValueInstance()->isFieldSet($fieldName)) {
// Get the field value
$fieldValue = $this->getValueInstance()->getField($fieldName);
if ($this->getValueInstance()->isFieldSet($fieldName)) {
// Get the field value
$fieldValue = $this->getValueInstance()->getField($fieldName);
} elseif ((!is_null($this->extraInstance)) && ($this->extraInstance->isFieldSet($fieldName))) {
// So try the extra instance
$fieldValue = $this->extraInstance->getField($fieldName);
} elseif ((!is_null($this->extraInstance)) && ($this->extraInstance->isFieldSet($fieldName))) {
// So try the extra instance
$fieldValue = $this->extraInstance->getField($fieldName);