migrations/Migration.php
protected function updateRole($role, $description = '', $ruleName = null, $data = null)
    {
        if (is_string($role)) {
            $role = $this->findRole($role);
        }

        echo "    > update role $role->name ...";
        $time = microtime(true);

        $role->description = $description;
        $role->ruleName    = $ruleName;
        $role->data        = $data;

        $this->authManager->update($role->name, $role);
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";

        return $role;
    }
protected function updateRole($role, $description = '', $ruleName = null, $data = null)
    {
        if (is_string($role)) {
            $role = $this->findRole($role);
        }

        echo "    > update role $role->name ...";
        $time = microtime(true);

        $role->description = $description;
        $role->ruleName    = $ruleName;
        $role->data        = $data;

        $this->authManager->update($role->name, $role);
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";

        return $role;
    }
protected function updateRole ( $ role , $ description = '' , $ ruleName = null , $ data = null ) { if ( is_string ( $ role ) ) { $ role = $ this -> findRole ( $ role ) ; } echo "    > update role $role->name ..." ; $ time = microtime ( true ) ; $ role -> description = $ description ; $ role -> ruleName = $ ruleName ; $ role -> data = $ data ; $ this -> authManager -> update ( $ role -> name , $ role ) ; echo ' done (time: ' . sprintf ( '%.3f' , microtime ( true ) - $ time ) . "s)\n" ; return $ role ; }
Updates role.

@param  string|Role $role
@param  string      $description
@param  string      $ruleName
@param  mixed       $data
@return Role
Updates role .