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

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

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

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

        return $permission;
    }
protected function updatePermission($permission, $description = '', $ruleName = null, $data = null)
    {
        if (is_string($permission)) {
            $permission = $this->findPermission($permission);
        }

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

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

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

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

@param  string|Permission $permission
@param  string            $description
@param  string            $ruleName
@param  mixed             $data
@return Permission
Updates permission .