public function deserialize($attributes)
    {
        if (isset($attributes['className'])) {
            $className = $attributes['className'];
            $job = new $className();
            unset($attributes['className']);
            $job->setType($attributes['type']);
            unset($attributes['type']);
            $job->setAttributes($attributes);
            return $job;
        }
    }
public function deserialize($attributes)
    {
        if (isset($attributes['className'])) {
            $className = $attributes['className'];
            $job = new $className();
            unset($attributes['className']);
            $job->setType($attributes['type']);
            unset($attributes['type']);
            $job->setAttributes($attributes);
            return $job;
        }
    }
public function deserialize ( $ attributes ) { if ( isset ( $ attributes [ 'className' ] ) ) { $ className = $ attributes [ 'className' ] ; $ job = new $ className ( ) ; unset ( $ attributes [ 'className' ] ) ; $ job -> setType ( $ attributes [ 'type' ] ) ; unset ( $ attributes [ 'type' ] ) ; $ job -> setAttributes ( $ attributes ) ; return $ job ; } }
Convert an array provided by a backend into a Job instance.
@param array $attributes
@return \Emphloyer\Job
Convert an array provided by a backend into a Job instance .