lib/Software.php
protected function __valueSet($key, $value) {
        if ($key === "exploits") {
            $casted = [];
            foreach ($value as $exploit) {
                $casted[] = new Exploit($this->patrol, $exploit);
            }
            return $casted;
        }

        return $value;
    }
protected function __valueSet($key, $value) {
        if ($key === "exploits") {
            $casted = [];
            foreach ($value as $exploit) {
                $casted[] = new Exploit($this->patrol, $exploit);
            }
            return $casted;
        }

        return $value;
    }
protected function __valueSet ( $ key , $ value ) { if ( $ key === "exploits" ) { $ casted = [ ] ; foreach ( $ value as $ exploit ) { $ casted [ ] = new Exploit ( $ this -> patrol , $ exploit ) ; } return $ casted ; } return $ value ; }
This is a casting hook, when a new value is set in PatrolModel, this hook will be called,
in this case, when "exploits" are set in the model, cast them to a PatrolSdk\Exploit object

@param string $key
@param object $value

@return object $value Can be casted
This is a casting hook when a new value is set in PatrolModel this hook will be called in this case when exploits are set in the model cast them to a PatrolSdk \ Exploit object