src/Callbacks/AbstractBooleanCallback.php
public function handle(AttributeCodeAndValueAwareObserverInterface $observer)
    {

        // set the observer
        $this->setObserver($observer);

        // load the attribute code and value
        $attributeCode = $observer->getAttributeCode();
        $attributeValue = $observer->getAttributeValue();

        // query whether or not, the passed value can be mapped to a boolean representation
        if (isset($this->booleanValues[strtolower($attributeValue)])) {
            return (boolean) $this->booleanValues[strtolower($attributeValue)];
        }

        // query whether or not we're in debug mode
        if ($this->isDebugMode()) {
            // log a warning and continue with the next value
            $this->getSystemLogger()->warning(
                $this->appendExceptionSuffix(
                    sprintf(
                        'Can\'t map option value "%s" for attribute %s to a boolean representation',
                        $attributeValue,
                        $attributeCode
                    )
                )
            );

            // add the missing option value to the registry
            $this->mergeAttributesRecursive(
                array(
                    RegistryKeys::MISSING_OPTION_VALUES => array(
                        $attributeCode => array(
                            $attributeValue => array(
                                $this->raiseCounter($attributeValue),
                                array($this->getUniqueIdentifier() => true)
                            )
                        )
                    )
                )
            );

            // return NULL, if NO value can be mapped to a boolean representation
            return;
        }

        // throw an exception if the attribute is not available
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf(
                    'Can\'t map option value "%s" for attribute %s to a boolean representation',
                    $attributeValue,
                    $attributeCode
                )
            )
        );
    }
public function handle(AttributeCodeAndValueAwareObserverInterface $observer)
    {

        // set the observer
        $this->setObserver($observer);

        // load the attribute code and value
        $attributeCode = $observer->getAttributeCode();
        $attributeValue = $observer->getAttributeValue();

        // query whether or not, the passed value can be mapped to a boolean representation
        if (isset($this->booleanValues[strtolower($attributeValue)])) {
            return (boolean) $this->booleanValues[strtolower($attributeValue)];
        }

        // query whether or not we're in debug mode
        if ($this->isDebugMode()) {
            // log a warning and continue with the next value
            $this->getSystemLogger()->warning(
                $this->appendExceptionSuffix(
                    sprintf(
                        'Can\'t map option value "%s" for attribute %s to a boolean representation',
                        $attributeValue,
                        $attributeCode
                    )
                )
            );

            // add the missing option value to the registry
            $this->mergeAttributesRecursive(
                array(
                    RegistryKeys::MISSING_OPTION_VALUES => array(
                        $attributeCode => array(
                            $attributeValue => array(
                                $this->raiseCounter($attributeValue),
                                array($this->getUniqueIdentifier() => true)
                            )
                        )
                    )
                )
            );

            // return NULL, if NO value can be mapped to a boolean representation
            return;
        }

        // throw an exception if the attribute is not available
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf(
                    'Can\'t map option value "%s" for attribute %s to a boolean representation',
                    $attributeValue,
                    $attributeCode
                )
            )
        );
    }
Will be invoked by a observer it has been registered for.

@param \TechDivision\Import\Observers\ObserverInterface $observer The observer

@return mixed The modified value