Scalr\Model\Entity\Role::getScripts PHP Méthode

getScripts() public méthode

Get scripts of the Role TODO refactor this method to new Entities
public getScripts ( ) : array
Résultat array
    public function getScripts()
    {
        $dbParams = $this->db()->Execute("SELECT role_scripts.*, scripts.name AS script_name FROM role_scripts LEFT JOIN scripts ON role_scripts.script_id = scripts.id WHERE role_id = ?", array($this->id));
        $retval = array();
        while ($script = $dbParams->FetchRow()) {
            $retval[] = array('role_script_id' => (int) $script['id'], 'event_name' => $script['event_name'], 'target' => $script['target'], 'script_id' => (int) $script['script_id'], 'script_name' => $script['script_name'], 'version' => (int) $script['version'], 'timeout' => $script['timeout'], 'isSync' => (int) $script['issync'], 'params' => unserialize($script['params']), 'order_index' => $script['order_index'], 'hash' => $script['hash'], 'script_path' => $script['script_path'], 'run_as' => $script['run_as'], 'script_type' => $script['script_type'], 'os' => $script['os']);
        }
        return $retval;
    }