protected function protectAttribute($key, &$value)
    {
        if (!is_null($value) && $this->protectedView && in_array($key, $this->getProtectable())) {
            $value = $this->protectionMask;

            return true;
        }

        return false;
    }
protected function protectAttribute($key, &$value)
    {
        if (!is_null($value) && $this->protectedView && in_array($key, $this->getProtectable())) {
            $value = $this->protectionMask;

            return true;
        }

        return false;
    }
protected function protectAttribute ( $ key , & $ value ) { if ( ! is_null ( $ value ) && $ this -> protectedView && in_array ( $ key , $ this -> getProtectable ( ) ) ) { $ value = $ this -> protectionMask ; return true ; } return false ; }
Check if the attribute is marked protected, if so return the mask, not the value.

@param string $key   Attribute name
@param mixed  $value Value of the attribute $key, updated to mask if protected
@return bool Whether or not the attribute is being protected
Check if the attribute is marked protected if so return the mask not the value .