src/Charcoal/Property/ImageProperty.php
public function setApplyEffects($event)
    {
        if ($event === false) {
            $this->applyEffects = self::EFFECTS_EVENT_NEVER;
            return $this;
        }

        if ($event === null || $event === '') {
            $this->applyEffects = self::EFFECTS_EVENT_SAVE;
            return $this;
        }

        if (!in_array($event, $this->acceptedEffectsEvents())) {
            if (!is_string($event)) {
                $event = (is_object($event) ? get_class($event) : gettype($event));
            }
            throw new OutOfBoundsException(sprintf(
                'Unsupported image property event "%s" provided',
                $event
            ));
        }

        $this->applyEffects = $event;

        return $this;
    }
public function setApplyEffects($event)
    {
        if ($event === false) {
            $this->applyEffects = self::EFFECTS_EVENT_NEVER;
            return $this;
        }

        if ($event === null || $event === '') {
            $this->applyEffects = self::EFFECTS_EVENT_SAVE;
            return $this;
        }

        if (!in_array($event, $this->acceptedEffectsEvents())) {
            if (!is_string($event)) {
                $event = (is_object($event) ? get_class($event) : gettype($event));
            }
            throw new OutOfBoundsException(sprintf(
                'Unsupported image property event "%s" provided',
                $event
            ));
        }

        $this->applyEffects = $event;

        return $this;
    }
public function setApplyEffects ( $ event ) { if ( $ event === false ) { $ this -> applyEffects = self :: EFFECTS_EVENT_NEVER ; return $ this ; } if ( $ event === null || $ event === '' ) { $ this -> applyEffects = self :: EFFECTS_EVENT_SAVE ; return $ this ; } if ( ! in_array ( $ event , $ this -> acceptedEffectsEvents ( ) ) ) { if ( ! is_string ( $ event ) ) { $ event = ( is_object ( $ event ) ? get_class ( $ event ) : gettype ( $ event ) ) ; } throw new OutOfBoundsException ( sprintf ( 'Unsupported image property event "%s" provided' , $ event ) ) ; } $ this -> applyEffects = $ event ; return $ this ; }
Set whether effects should be applied.

@param  mixed $event When to apply affects.
@throws OutOfBoundsException If the effects event does not exist.
@return ImageProperty Chainable
Set whether effects should be applied .